From 9f837ad6cdcc8c837a6014abe555909ff9ce094c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 12 Feb 2016 14:55:53 +0100 Subject: [PATCH 01/91] fix typo found by marcello --- src/mint/taler-mint-httpd_validation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mint/taler-mint-httpd_validation.c b/src/mint/taler-mint-httpd_validation.c index 461e88759..8f8ab415e 100644 --- a/src/mint/taler-mint-httpd_validation.c +++ b/src/mint/taler-mint-httpd_validation.c @@ -98,7 +98,7 @@ TMH_VALIDATION_init (const struct GNUNET_CONFIGURATION_Handle *cfg) { (void) GNUNET_asprintf (&lib_name, "libtaler_plugin_wire_%s", - lib_name); + token); p = GNUNET_new (struct Plugin); p->type = GNUNET_strdup (token); p->plugin = GNUNET_PLUGIN_load (lib_name, From e406833eab7ca0835f9779abebada94592a85a7e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 1 Mar 2016 15:21:30 +0100 Subject: [PATCH 02/91] mint->exchange renaming in paper --- doc/paper/taler.tex | 424 ++++++++++++++++++++++---------------------- 1 file changed, 212 insertions(+), 212 deletions(-) diff --git a/doc/paper/taler.tex b/doc/paper/taler.tex index e9c795857..5ad93ec32 100644 --- a/doc/paper/taler.tex +++ b/doc/paper/taler.tex @@ -41,17 +41,17 @@ % 'transaction' already when we talk about taxable % transfers of Taler coins and database 'transactions'. % - wallet = coins at customer -% - reserve = currency entrusted to mint waiting for withdrawal -% - deposit = SEPA to mint -% - withdrawal = mint to customer +% - reserve = currency entrusted to exchange waiting for withdrawal +% - deposit = SEPA to exchange +% - withdrawal = exchange to customer % - spending = customer to merchant -% - redeeming = merchant to mint (and then mint SEPA to merchant) -% - refreshing = customer-mint-customer +% - redeeming = merchant to exchange (and then exchange SEPA to merchant) +% - refreshing = customer-exchange-customer % - dirty coin = coin with exposed public key % - fresh coin = coin that was refreshed or is new -% - coin signing key = mint's online key used to (blindly) sign coin -% - message signing key = mint's online key to sign mint messages -% - mint master key = mint's key used to sign other mint keys +% - coin signing key = exchange's online key used to (blindly) sign coin +% - message signing key = exchange's online key to sign exchange messages +% - exchange master key = exchange's key used to sign other exchange keys % - owner = entity that knows coin private key % - transaction = coin ownership transfer that should be taxed % - sharing = coin copying that should not be taxed @@ -74,7 +74,7 @@ blind signatures that enables anonymous payments while ensuring that entities that receive payments are auditable and thus taxable. Taler differs from Chaum's original proposal in that customers can never defraud anyone, merchants can only fail to deliver the merchandise to -the customer, and mints can be fully audited. Consequently, +the customer, and exchanges can be fully audited. Consequently, enforcement of honest behavior is better and more timely than with Chaum, and is at least as strict as with legacy credit card payment systems that do not provide for privacy. Furthermore, Taler allows @@ -112,11 +112,11 @@ anarchistic economies. The Taler protocol is heavily based on ideas from Chaum~\cite{chaum1983blind} and also follows Chaum's basic architecture of -customer, merchant and mint (Figure~\ref{fig:cmm}). The two designs +customer, merchant and exchange (Figure~\ref{fig:cmm}). The two designs share the key first step where the {\em customer} withdraws digital -{\em coins} from the {\em mint} with unlinkability provided via blind +{\em coins} from the {\em exchange} with unlinkability provided via blind signatures. The coins can then be spent at a {\em merchant} who {\em - deposits} them at the mint. Taler uses online detection of + deposits} them at the exchange. Taler uses online detection of double-spending, thus assuring the merchant instantly that a transaction is valid. @@ -125,17 +125,17 @@ transaction is valid. \begin{tikzpicture} \tikzstyle{def} = [node distance= 5em and 7em, inner sep=1em, outer sep=.3em]; \node (origin) at (0,0) {}; - \node (mint) [def,above=of origin,draw]{Mint}; + \node (exchange) [def,above=of origin,draw]{Exchange}; \node (customer) [def, draw, below left=of origin] {Customer}; \node (merchant) [def, draw, below right=of origin] {Merchant}; \node (auditor) [def, draw, above right=of origin]{Auditor}; \tikzstyle{C} = [color=black, line width=1pt] - \draw [<-, C] (customer) -- (mint) node [midway, above, sloped] (TextNode) {withdraw coins}; - \draw [<-, C] (mint) -- (merchant) node [midway, above, sloped] (TextNode) {deposit coins}; + \draw [<-, C] (customer) -- (exchange) node [midway, above, sloped] (TextNode) {withdraw coins}; + \draw [<-, C] (exchange) -- (merchant) node [midway, above, sloped] (TextNode) {deposit coins}; \draw [<-, C] (merchant) -- (customer) node [midway, above, sloped] (TextNode) {spend coins}; - \draw [<-, C] (mint) -- (auditor) node [midway, above, sloped] (TextNode) {verify}; + \draw [<-, C] (exchange) -- (auditor) node [midway, above, sloped] (TextNode) {verify}; \end{tikzpicture} \caption{Taler's system model for the payment system is based on Chaum~\cite{chaum1983blind}.} @@ -147,7 +147,7 @@ believe needs a payment system with the following properties: \begin{description} \item[Customer Anonymity] - It must be impossible for mints, merchants and even a global active + It must be impossible for exchanges, merchants and even a global active adversary, to trace the spending behavior of a customer. \item[Unlinkability] As a strong form of customer anonymity, it must be infeasible to @@ -170,11 +170,11 @@ believe needs a payment system with the following properties: Nevertheless, customers must never be able to defraud anyone, and merchants must at best be able to defraud their customers by not delivering on the agreed contract. Neither merchants nor customers - should ever be able to commit fraud against the mint. Additionally, + should ever be able to commit fraud against the exchange. Additionally, both customers and merchants must receive cryptographic proofs of - bad behavior in case of protocol violations by the mint. - In this way, only the mint will need to be tightly audited and regulated. - The design must make it easy to audit the finances of the mint. + bad behavior in case of protocol violations by the exchange. + In this way, only the exchange will need to be tightly audited and regulated. + The design must make it easy to audit the finances of the exchange. \item[Ease of Deployment] %The system should be easy to deploy for % real-world applications. In order to lower the entry barrier and % acceptance of the system, a gateway to the existing financial @@ -206,8 +206,8 @@ say a \EUR{0,01} coin and a \EUR{50,00} coin. A merchant cannot simply give the customer their coins in another transaction; however, as this reverses the role of merchant and customer, and our taxability requirement would deanonymize the customer. The customer -also cannot withdraw exact change from his account from the mint, as this -would allow the mint to link the identity of the customer that is revealed +also cannot withdraw exact change from his account from the exchange, as this +would allow the exchange to link the identity of the customer that is revealed during withdrawal to the subsequent deposit operation that follows shortly afterwards. Instead, the customer should obtain new freshly anonymized coins that cannot be @@ -226,9 +226,9 @@ A key contribution of Taler is the {\em refresh} protocol, which enables a customer to exchange the residual value of the exchanged coin for unlinkable freshly anonymized change. -Taler mints ensure that all transactions involving the same coin +Taler exchanges ensure that all transactions involving the same coin do not exceed the total value of the coin simply by -requiring that merchants clear transactions immediately with the mint. +requiring that merchants clear transactions immediately with the exchange. This improves dramatically on systems that support offline merchants with cryptographic threats to deanonymizing customers who double-spend, like restrictive blind signatures~\cite{brands1993efficient}. @@ -308,17 +308,17 @@ Taler avoids include: \item The use of patents to protect the technology; a payment system should be free software (libre) to have a chance for widespread adoption. \item The use of off-line payments and thus deferred detection of - double-spending, which could require the mint to attempt to recover + double-spending, which could require the exchange to attempt to recover funds from customers via the legal system. This creates a - significant business risk for the mint, as the system is not - self-enforcing from the perspective of the mint. In 1983 off-line + significant business risk for the exchange, as the system is not + self-enforcing from the perspective of the exchange. In 1983 off-line payments might have been a necessary feature. However, today requiring network connectivity is feasible and avoids the business risks associated with deferred fraud detection. \item % In addition to the risk of legal disputes with fraudulent % merchants and customers, Chaum's published design does not clearly - limit the financial damage a mint might suffer from the + limit the financial damage a exchange might suffer from the disclosure of its private online signing key. \item Chaum did not support fractional payments or refunds without breaking customer anonymity. @@ -359,16 +359,16 @@ description of the Opencoin protocol is available to date. Peppercoin~\cite{rivest2004peppercoin} is a microdonation protocol. The main idea of the protocol is to reduce transaction costs by minimizing the number of transactions that are processed directly by -the mint. Instead of always paying, the customer ``gambles'' with the +the exchange. Instead of always paying, the customer ``gambles'' with the merchant for each microdonation. Only if the merchant wins, the microdonation is upgraded to a macropayment to be deposited at the -mint. Peppercoin does not provide customer-anonymity. The proposed -statistical method by which mints detect fraudulent cooperation between -customers and merchants at the expense of the mint not only creates -legal risks for the mint, but would also require that the mint learns +exchange. Peppercoin does not provide customer-anonymity. The proposed +statistical method by which exchanges detect fraudulent cooperation between +customers and merchants at the expense of the exchange not only creates +legal risks for the exchange, but would also require that the exchange learns about microdonations where the merchant did not get upgraded to a macropayment. It is therefore unclear how Peppercoin would actually -reduce the computational burden on the mint. +reduce the computational burden on the exchange. \section{Design} @@ -382,32 +382,32 @@ As with Chaum, the Taler system comprises three principal types of actors (Figure~\ref{fig:cmm}): The \emph{customer} is interested in receiving goods or services from the \emph{merchant} in exchange for payment. When making a transaction, both the customer and the -merchant must agree on the same \emph{mint}, which serves as an -intermediary for the financial transaction between the two. The mint +merchant must agree on the same \emph{exchange}, which serves as an +intermediary for the financial transaction between the two. The exchange is responsible for allowing the customer to obtain the anonymous digital currency and for enabling the merchant to convert the digital coins back to some traditional currency. The \emph{auditor} -assures customers and merchants that the mint operates correctly. +assures customers and merchants that the exchange operates correctly. \subsection{Security model} Taler's security model assumes that cryptographic primitives are secure and that each participant is under full control of his system. -The contact information of the mint is known to both customer and +The contact information of the exchange is known to both customer and merchant from the start. Furthermore, the merchant communication's authenticity is assured to the customer, such as by using X.509 certificates~\cite{rfc5280}, and we assume that an anonymous, reliable bi-directional communication channel can be established by the -customer to both the mint and the merchant, such as by using Tor. +customer to both the exchange and the merchant, such as by using Tor. -The mint is trusted to hold funds of its customers and to forward them +The exchange is trusted to hold funds of its customers and to forward them when receiving the respective deposit instructions from the merchants. -Customer and merchant can have some assurances about the mint's -liquidity and operation, as the mint has proven reserves, is subject +Customer and merchant can have some assurances about the exchange's +liquidity and operation, as the exchange has proven reserves, is subject to the law, and can have its business regularly audited by a government or third party. -Regular audits of the mint's accounts should reveal any possible fraud -before the mint is allowed to destroy the corresponding accumulated +Regular audits of the exchange's accounts should reveal any possible fraud +before the exchange is allowed to destroy the corresponding accumulated cryptographic proofs and book its fees as profits. % The merchant is trusted to deliver the service or goods to the @@ -416,7 +416,7 @@ to achieve this, as he must get cryptographic proofs of the contract and that he paid his obligations. % Neither the merchant nor the customer may have any ability to {\em - effectively} defraud the mint or the state collecting taxes. Here, + effectively} defraud the exchange or the state collecting taxes. Here, ``effectively'' means that the expected return for fraud is negative. Note that customers do not need to be trusted in any way, and that in particular it is never necessary for anyone to try to recover funds @@ -455,10 +455,10 @@ thus {\bf not} recorded for taxation. Taler ensures taxability only when some entity acquires exclusive control over the value of digital coins, which requires an interaction -with the mint. For such transactions, the state can obtain information -from the mint, or a bank, that identifies the entity that received the +with the exchange. For such transactions, the state can obtain information +from the exchange, or a bank, that identifies the entity that received the digital coins as well as the exact value of those coins. -Taler also allows the mint, and hence the state, to learn the value of +Taler also allows the exchange, and hence the state, to learn the value of digital coins withdrawn by a customer---but not how, where, or when they were spent. @@ -468,7 +468,7 @@ An anonymous communication channel such as Tor~\cite{tor-design} is used for all communication between the customer and the merchant. Ideally, the customer's anonymity is limited only by this channel; however, the payment system does additionally reveal that the customer -is one of the patrons of the mint. +is one of the patrons of the exchange. There are naturally risks that the customer-merchant business operation may leak identifying information about the customer. At least, customers have some options to defend their privacy against nosey merchants however, @@ -477,7 +477,7 @@ We consider information leakage specific to the business logic to be outside of the scope of the design of Taler. Ideally, customer should use an anonymous communication channel with -the mint to avoid leaking IP address information; however, the mint +the exchange to avoid leaking IP address information; however, the exchange would typically learn the customer's identity from the wire transfer that funds the customer's withdraw anonymous digital coins. In fact, this is desirable as there might be rules and regulations @@ -485,33 +485,33 @@ designed to limit the amount of anonymous digital cash that an individual customer can withdraw in a given time period, similar to how states today sometimes impose limits on cash withdrawals~\cite{france2015cash,greece2015cash}. -Taler is only anonymous with respect to {\em payments}, as the mint +Taler is only anonymous with respect to {\em payments}, as the exchange will be unable to link the known identity of the customer that withdrew anonymous digital currency to the {\em purchase} performed later at the merchant. In this respect, Taler provides exactly the same scheme for unconditional anonymous payments as was proposed by Chaum~\cite{chaum1983blind,chaum1990untraceable} over 30 years ago. -While the customer thus has anonymity for purchases, the mint will +While the customer thus has anonymity for purchases, the exchange will always learn the merchant's identity in order to credit the merchant's account. This is simply necessary for taxation, as Taler is supposed to make information about funds received by any entity transparent to the state. % Technically, the merchant could still -%use an anonymous communication channel to communicate with the mint. -%However, in order to receive the traditional currency the mint will +%use an anonymous communication channel to communicate with the exchange. +%However, in order to receive the traditional currency the exchange will %require (SEPA) account details for the deposit. -%As both the initial transaction between the customer and the mint as -%well as the transactions between the merchant and the mint do not have +%As both the initial transaction between the customer and the exchange as +%well as the transactions between the merchant and the exchange do not have %to be done anonymously, there might be a formal business contract -%between the customer and the mint and the merchant and the mint. Such +%between the customer and the exchange and the merchant and the exchange. Such %a contract may provide customers and merchants some assurance that -%they will actually receive the traditional currency from the mint +%they will actually receive the traditional currency from the exchange %given cryptographic proof about the validity of the transaction(s). %However, given the business overheads for establishing such contracts -%and the natural goal for the mint to establish a reputation and to -%minimize cost, it is more likely that the mint will advertise its +%and the natural goal for the exchange to establish a reputation and to +%minimize cost, it is more likely that the exchange will advertise its %external auditors and proven reserves and thereby try to convince %customers and merchants to trust it without a formal contract. @@ -519,57 +519,57 @@ to the state. \subsection{Coins} A \emph{coin} in Taler is a public-private key pair which derives its -financial value from a signature over the coin's public key by a mint. -The mint is expected to have multiple {\em coin signing key} pairs +financial value from a signature over the coin's public key by a exchange. +The exchange is expected to have multiple {\em coin signing key} pairs available for signing, each representing a different coin denomination. These coin signing keys have an expiration date, before which any coins -signed with it must be spent or refreshed. This allows the mint to +signed with it must be spent or refreshed. This allows the exchange to eventually discard records of old transactions, thus limiting the -records that the mint must retain and search to detect double-spending -attempts. Furthermore, the mint is expected to use each coin signing +records that the exchange must retain and search to detect double-spending +attempts. Furthermore, the exchange is expected to use each coin signing key only for a limited number of coins. % for example by limiting its use to sign coins to a week or a month. In this way, if a private coin signing key were to be compromised, -the mint would detect this once more coins were redeemed than the total +the exchange would detect this once more coins were redeemed than the total that was signed into existence using that coin signing key. -In this case, the mint could allow authentic customers to exchange their +In this case, the exchange could allow authentic customers to exchange their unspent coins that were signed with the compromised private key, while refusing further anonymous transactions involving those coins. As a result, the financial damage of losing a private signing key can be limited to at most twice the amount originally signed with that key. -To ensure that the mint does not enable deanonymization of users by -signing each coin with a fresh coin signing key, the mint must publicly +To ensure that the exchange does not enable deanonymization of users by +signing each coin with a fresh coin signing key, the exchange must publicly announce the coin signing keys in advance. Those announcements are expected to be signed with an off-line long-term private {\em master -signing key} of the mint and the auditor. +signing key} of the exchange and the auditor. -Before a customer can withdraw a coin from the mint, -he has to pay the mint the value of the coin, as well as processing fees. +Before a customer can withdraw a coin from the exchange, +he has to pay the exchange the value of the coin, as well as processing fees. This is done using other means of payments, such as wire transfers or -by having a personal {\em reserve} at the mint, +by having a personal {\em reserve} at the exchange, which is equivalent to a bank account with a positive balance. Taler assumes that the customer has a {\em withdrawal authorization key} to identify himself as authorized to withdraw funds from the reserve. By signing the withdrawal request messages using this withdrawal -authorization key, the customer can prove to the mint that he is the +authorization key, the customer can prove to the exchange that he is the individual authorized to withdraw anonymous digital coins from his reserve. -The mint will record the withdrawal messages with the reserve record as +The exchange will record the withdrawal messages with the reserve record as proof that the anonymous digital coin was created for the correct customer. We note that the specifics of how the customer authenticates -to the mint are orthogonal to the rest of the system, and +to the exchange are orthogonal to the rest of the system, and multiple methods can be supported. %To put it differently, unlike %modern cryptocurrencies like BitCoin, Taler's design simply %acknowledges that primitive accumulation~\cite{engels1844} predates %the system and that a secure method to authenticate owners exists. -After a coin is minted, the customer is the only entity that knows the +After a coin is exchanged, the customer is the only entity that knows the private key of the coin, making him the \emph{owner} of the coin. -The coin can be identified by the mint by its public key; however, due -to the use of blind signatures, the mint does not learn the public key -during the minting process. Knowledge of the private key of the coin +The coin can be identified by the exchange by its public key; however, due +to the use of blind signatures, the exchange does not learn the public key +during the exchange process. Knowledge of the private key of the coin enables the owner to spent the coin. If the private key is shared with others, they also become owners of the coin. @@ -579,10 +579,10 @@ To spend a coin, the coin's owner needs to sign a {\em deposit request} specifying the amount, the merchant's account information and a {\em business transaction-specific hash} using the coin's private key. A merchant can then transfer this permission of the -coin's owner to the mint to obtain the amount in traditional currency. -If the customer is cheating and the coin was already spent, the mint +coin's owner to the exchange to obtain the amount in traditional currency. +If the customer is cheating and the coin was already spent, the exchange provides cryptographic proof of the fraud to the merchant, who will -then refuse the transaction. The mint is typically expected to +then refuse the transaction. The exchange is typically expected to transfer the funds to the merchant using a wire transfer or by crediting the merchant's individual account, depending on what is appropriate to the domain of the traditional currency. @@ -591,7 +591,7 @@ To allow exact payments without requiring the customer to keep a large amount of ``change'' in stock and possibly perform thousands of signatures for larger transactions, the payment systems allows partial spending where just a fraction of a coin's total value is transferred. -Consequently, the mint the must not only store the identifiers of +Consequently, the exchange the must not only store the identifiers of spent coins, but also the fraction of the coin that has been spent. @@ -601,7 +601,7 @@ In this and other scenarios it is thus possible that a customer has revealed the public key of a coin to a merchant, but not ultimately signed over the full value of the coin. If the customer then continues to directly use the coin in other transactions, merchants -and the mint could link the various transactions as they all share the +and the exchange could link the various transactions as they all share the same public key for the coin. The owner of such a {\em dirty} coin might therefore want to exchange it @@ -620,21 +620,21 @@ must assure that owner stays the same. % Meh, this paragraph sucks : We therefore demand two main properties from the refresh protocol: -First, the mint must not be able to link the fresh coin's public key to -the public key of the dirty coin. Second, the mint can ensure that the +First, the exchange must not be able to link the fresh coin's public key to +the public key of the dirty coin. Second, the exchange can ensure that the owner of the dirty coin can determine the private key of the fresh coin, thereby preventing the refresh protocol from being used to construct a transaction. %As with other operations, the refreshing protocol must also protect -%the mint from double-spending; similarly, the customer has to have -%cryptographic evidence if there is any misbehavior by the mint. -%Finally, the mint may choose to charge a transaction fee for +%the exchange from double-spending; similarly, the customer has to have +%cryptographic evidence if there is any misbehavior by the exchange. +%Finally, the exchange may choose to charge a transaction fee for %refreshing by reducing the value of the generated fresh coins %in relation to the value of the melted coins. % %Naturally, all such transaction fees should be clearly stated as part -%of the business contract offered by the mint to customers and +%of the business contract offered by the exchange to customers and %merchants. @@ -642,7 +642,7 @@ construct a transaction. % In this section, we describe the protocols for Taler in detail. -We shall assume for the sake of brevity that a recipient of a signed +We shall assume for the sake of brevity that a recipient of a signed message always first checks that the signature is valid, aborting the operation if not. Additionally, we assume that the receiver of a signed message is either told the public key, or knows it from the @@ -650,10 +650,10 @@ context, and that the signature contains additional identification as to the purpose of the signature, making it impossible to use a signature in a different context. -The mint has an {\em online message signing key} used for signing -messages, as opposed to coins. The mint's long-term offline key is used +The exchange has an {\em online message signing key} used for signing +messages, as opposed to coins. The exchange's long-term offline key is used to certify both the coin signing keys and the online message signing key -of the mint. The mint's long-term offline key is assumed to be known to +of the exchange. The exchange's long-term offline key is assumed to be known to both customers and merchants and is certified by the auditors. As we are dealing with financial transactions, we explicitly describe @@ -665,19 +665,19 @@ information. Keys and thus coins always have a well-known expiration date; information committed to disk can be discarded after the expiration date of the respective public key. Customers can also discard information once the respective coins have been fully spent, -and merchants may discard information once payments from the mint have +and merchants may discard information once payments from the exchange have been received, assuming the records are also no longer needed for tax -purposes. The mint's bank transfers dealing in traditional currency +purposes. The exchange's bank transfers dealing in traditional currency are expected to be recorded for tax authorities to ensure taxability. \subsection{Withdrawal} Let $G$ be the generator of an elliptic curve. To withdraw anonymous digital coins, the customer performs the following interaction with -the mint: +the exchange: \begin{enumerate} - \item The customer identifies a mint with an auditor-approved + \item The customer identifies a exchange with an auditor-approved coin signing public-private key pair $K := (K_s, K_p)$ and randomly generates: \begin{itemize} @@ -685,19 +685,19 @@ the mint: \item coin key $C := (c_s,C_p)$ with private key $c_s$ and public key $C_p := c_s G$, \item blinding factor $b$, and commits $\langle W, C, b \rangle$ to disk. \end{itemize} - \item The customer transfers an amount of money corresponding to at least $K_p$ to the mint, with $W_p$ in the subject line of the transaction. - \item The mint receives the transaction and credits the $W_p$ reserve with the respective amount in its database. - \item The customer sends $S_W(B_b(C_p))$ to the mint to request withdrawal of $C$; here, $B_b$ denotes Chaum-style blinding with blinding factor $b$. - \item The mint checks if the same withdrawal request was issued before; in this case, it sends $S_{K}(B_b(C_p))$ to the customer.\footnote{Here $S_K$ + \item The customer transfers an amount of money corresponding to at least $K_p$ to the exchange, with $W_p$ in the subject line of the transaction. + \item The exchange receives the transaction and credits the $W_p$ reserve with the respective amount in its database. + \item The customer sends $S_W(B_b(C_p))$ to the exchange to request withdrawal of $C$; here, $B_b$ denotes Chaum-style blinding with blinding factor $b$. + \item The exchange checks if the same withdrawal request was issued before; in this case, it sends $S_{K}(B_b(C_p))$ to the customer.\footnote{Here $S_K$ denotes a Chaum-style blind signature with private key $K_s$.} - If this is a fresh withdrawal request, the mint performs the following transaction: + If this is a fresh withdrawal request, the exchange performs the following transaction: \begin{enumerate} \item checks if the reserve $W_p$ has sufficient funds for a coin of value corresponding to $K_p$ \item stores the withdrawal request and response $\langle S_W(B_b(C_p)), S_K(B_b(C_p)) \rangle$ in its database for future reference, \item deducts the amount corresponding to $K_p$ from the reserve, \end{enumerate} and then sends $S_{K}(B_b(C_p))$ to the customer. - If the guards for the transaction fail, the mint sends a descriptive error back to the customer, + If the guards for the transaction fail, the exchange sends a descriptive error back to the customer, with proof that it operated correctly. Assuming the signature was valid, this would involve showing the transaction history for the reserve. \item The customer computes and verifies the unblinded signature $S_K(C_p) = U_b(S_K(B_b(C_p)))$. @@ -705,7 +705,7 @@ the mint: \end{enumerate} We note that the authorization to create and access a reserve using a withdrawal key $W$ is just one way to establish that the customer is -authorized to withdraw funds. If a mint has other ways to securely +authorized to withdraw funds. If a exchange has other ways to securely authenticate customers and establish that they are authorized to withdraw funds, those can also be used with Taler. @@ -713,19 +713,19 @@ withdraw funds, those can also be used with Taler. \subsection{Exact and partial spending} A customer can spend coins at a merchant, under the condition that the -merchant trusts the specific mint that minted the coin. Merchants are +merchant trusts the specific exchange that exchanged the coin. Merchants are identified by their key $M := (m_s, M_p)$ where the public key $M_p$ must be known to the customer a priori. -We now describe the protocol between the customer, merchant, and mint +We now describe the protocol between the customer, merchant, and exchange for a transaction in which the customer spends a coin $C := (c_s, C_p)$ with signature $\widetilde{C} := S_K(C_p)$ - where $K$ is the mint's demonination key. + where $K$ is the exchange's demonination key. \begin{enumerate} \item\label{contract} - Let $\vec{D} := D_1, \ldots, D_n$ be the list of mints accepted by - the merchant where each $D_j$ is a mint's public key. + Let $\vec{D} := D_1, \ldots, D_n$ be the list of exchanges accepted by + the merchant where each $D_j$ is a exchange's public key. The merchant creates a digitally signed contract $\mathcal{A} := S_M(m, f, a, H(p, r), \vec{D})$ where $m$ is an identifier for this transaction, $a$ is data relevant @@ -734,40 +734,40 @@ with signature $\widetilde{C} := S_K(C_p)$ $p$ is the merchant's payment information (e.g. his IBAN number), and $r$ is a random nonce. The merchant commits $\langle \mathcal{A} \rangle$ to disk and sends $\mathcal{A}$ to the customer. -\item\label{deposit} - The customer should already possess a coin minted by a mint that is +\item\label{deposit} + The customer should already possess a coin exchanged by a exchange that is accepted by the merchant, meaning $K$ should be publicly signed by - some $D_j \in \{D_1, D_2, \ldots, D_n\}$, and has a value $\geq f$. + some $D_j \in \{D_1, D_2, \ldots, D_n\}$, and has a value $\geq f$. \item The customer generates a \emph{deposit-permission} $\mathcal{D} := S_c(\widetilde{C}, m, f, H(a), H(p,r), M_p)$ and sends $\langle \mathcal{D}, D_j\rangle$ to the merchant, - where $D_j$ is the mint which signed $K$. -\item The merchant gives $(\mathcal{D}, p, r)$ to the mint, revealing $p$ - only to the mint. -\item The mint validates $\mathcal{D}$ and checks for double spending. + where $D_j$ is the exchange which signed $K$. +\item The merchant gives $(\mathcal{D}, p, r)$ to the exchange, revealing $p$ + only to the exchange. +\item The exchange validates $\mathcal{D}$ and checks for double spending. If the coin has been involved in previous transactions and the new one would exceed its remaining value, it sends an error with the records from the previous transactions back to the merchant. % - If double spending is not found, the mint commits $\langle \mathcal{D} \rangle$ to disk + If double spending is not found, the exchange commits $\langle \mathcal{D} \rangle$ to disk and notifies the merchant that the deposit operation was successful. -\item The merchant commits and forwards the notification from the mint to the +\item The merchant commits and forwards the notification from the exchange to the customer, confirming the success or failure of the operation. \end{enumerate} We have simplified the exposition by assuming that one coin suffices, but -in practice a customer can use multiple coins from the same mint where +in practice a customer can use multiple coins from the same exchange where the total value adds up to $f$ by running the following steps for each of the coins. There is a risk of metadata leakage if a customer acquires a coin in responce to the merchant, or if a customer uses -coings issued by multiple mints together. +coings issued by multiple exchanges together. If a transaction is aborted after Step~\ref{deposit}, subsequent transactions with the same coin could be linked to the coin, but not directly to the coin's owner. The same applies to partially spent coins where $f$ is smaller than the actual value of the coin. To unlink subsequent transactions from a coin, the customer has to -execute the coin refreshing protocol with the mint. +execute the coin refreshing protocol with the exchange. %\begin{figure}[h] %\centering @@ -777,12 +777,12 @@ execute the coin refreshing protocol with the mint. %\node (origin) at (0,0) {}; %\node (offer) [def,below=of origin]{make offer (merchant $\rightarrow$ customer)}; %\node (A) [def,below=of offer]{permit lock (customer $\rightarrow$ merchant)}; -%\node (B) [def,below=of A]{apply lock (merchant $\rightarrow$ mint)}; -%\node (C) [def,below=of B]{confirm (or refuse) lock (mint $\rightarrow$ merchant)}; +%\node (B) [def,below=of A]{apply lock (merchant $\rightarrow$ exchange)}; +%\node (C) [def,below=of B]{confirm (or refuse) lock (exchange $\rightarrow$ merchant)}; %\node (D) [def,below=of C]{sign contract (merchant $\rightarrow$ customer)}; %\node (E) [def,below=of D]{permit deposit (customer $\rightarrow$ merchant)}; -%\node (F) [def,below=of E]{make deposit (merchant $\rightarrow$ mint)}; -%\node (G) [def,below=of F]{transfer confirmation (mint $\rightarrow$ merchant)}; +%\node (F) [def,below=of E]{make deposit (merchant $\rightarrow$ exchange)}; +%\node (G) [def,below=of F]{transfer confirmation (exchange $\rightarrow$ merchant)}; % %\tikzstyle{C} = [color=black, line width=1pt] %\draw [->,C](offer) -- (A); @@ -796,7 +796,7 @@ execute the coin refreshing protocol with the mint. %\draw [->,C, bend right, shorten <=2mm] (E.east) % to[out=-135,in=-45,distance=3.8cm] node[left] {aggregate} (D.east); %\end{tikzpicture} -%\caption{Interactions between a customer, merchant and mint in the coin spending +%\caption{Interactions between a customer, merchant and exchange in the coin spending % protocol} %\label{fig:spending_protocol_interactions} %\end{figure} @@ -804,11 +804,11 @@ execute the coin refreshing protocol with the mint. \subsection{Refreshing} \label{sec:refreshing} -We now describe the refresh protocol whereby a dirty coin $C'$ of +We now describe the refresh protocol whereby a dirty coin $C'$ of denomination $K$ is melted to obtain a fresh coin $\widetilde{C}$ with the same denomination. In practice, Taler uses a natural extension where multiple fresh coins are generated a the same time to -enable giving precise change matching any amount. +enable giving precise change matching any amount. In the protocol, $\kappa \ge 3$ is a security parameter and $G$ is the generator of the elliptic curve. @@ -830,18 +830,18 @@ generator of the elliptic curve. between the private key $c'_s$ of the original coin with the public transfer key $T_p^{(i)}$. \item The customer computes $B^{(i)} := B_{b^{(i)}}(C^{(i)}_p)$ for $i \in \{1,\ldots,\kappa\}$ and sends a commitment - $S_{C'}(\vec{E}, \vec{B}, \vec{T_p})$ to the mint. - \item The mint generates a random $\gamma$ with $1 \le \gamma \le \kappa$ and + $S_{C'}(\vec{E}, \vec{B}, \vec{T_p})$ to the exchange. + \item The exchange generates a random $\gamma$ with $1 \le \gamma \le \kappa$ and marks $C'_p$ as spent by committing $\langle C', \gamma, S_{C'}(\vec{E}, \vec{B}, \vec{T_p}) \rangle$ to disk. Auditing processes should assure that $\gamma$ is unpredictable until - this time to prevent the mint from assisting tax evasion. - \item The mint sends $S_{K'}(C'_p, \gamma)$ to the customer where - $K'$ is the mint's message signing key. + this time to prevent the exchange from assisting tax evasion. + \item The exchange sends $S_{K'}(C'_p, \gamma)$ to the customer where + $K'$ is the exchange's message signing key. \item The customer commits $\langle C', S_K(C'_p, \gamma) \rangle$ to disk. \item The customer computes $\mathfrak{R} := \left(t_s^{(i)}\right)_{i \ne \gamma}$ - and sends $S_{C'}(\mathfrak{R})$ to the mint. - \item \label{step:refresh-ccheck} The mint checks whether $\mathfrak{R}$ is consistent with the commitments; + and sends $S_{C'}(\mathfrak{R})$ to the exchange. + \item \label{step:refresh-ccheck} The exchange checks whether $\mathfrak{R}$ is consistent with the commitments; specifically, it computes for $i \not= \gamma$: \vspace{-2ex} @@ -864,8 +864,8 @@ generator of the elliptic curve. \item \label{step:refresh-done} If the commitments were consistent, - the mint sends the blind signature $\widetilde{C} := - S_{K}(B^{(\gamma)})$ to the customer. Otherwise, the mint responds + the exchange sends the blind signature $\widetilde{C} := + S_{K}(B^{(\gamma)})$ to the customer. Otherwise, the exchange responds with an error indicating the location of the failure. \end{enumerate} @@ -875,7 +875,7 @@ generator of the elliptic curve. \subsection{Linking} -For a coin that was successfully refreshed, the mint responds to a +For a coin that was successfully refreshed, the exchange responds to a request $S_{C'}(\mathtt{link})$ with $(T^{(\gamma)}_p$, $E^{(\gamma)}, \widetilde{C})$. % @@ -883,7 +883,7 @@ This allows the owner of the melted coin to also obtain the private key of the new coin, even if the refreshing protocol was illicitly executed with the help of another party who generated $\vec{c_s}$ and only provided $\vec{C_p}$ and other required information to the old owner. -As a result, linking ensures that access to the new coins minted by +As a result, linking ensures that access to the new coins exchanged by the refresh protocol is always {\em shared} with the owner of the melted coins. This makes it impossible to abuse the refresh protocol for {\em transactions}. @@ -892,7 +892,7 @@ The linking request is not expected to be used at all during ordinary operation of Taler. If the refresh protocol is used by Alice to obtain change as designed, she already knows all of the information and thus has little reason to request it via the linking protocol. -The fundamental reason why the mint must provide the link protocol is +The fundamental reason why the exchange must provide the link protocol is simply to provide a threat: if Bob were to use the refresh protocol for a transaction of funds from Alice to him, Alice may use a link request to gain shared access to Bob's coins. Thus, this threat @@ -903,8 +903,8 @@ exchanging the original private coin keys. This is permitted in our taxation model as with such trust they are assumed to be the same entity. -The auditor can anonymously check if the mint correctly implements the -link request, thus preventing the mint operator from legally disabling +The auditor can anonymously check if the exchange correctly implements the +link request, thus preventing the exchange operator from legally disabling this protocol component. Without the link operation, Taler would devolve into a payment system where both sides can be anonymous, and thus no longer provide taxability. @@ -926,7 +926,7 @@ server indicates that the client is violating the protocol, the client should record the interaction and enable the user to file a bug report. -The second case is a faulty mint service provider. Such faults will +The second case is a faulty exchange service provider. Such faults will be detected because of protocol violations, such as providing a faulty proof or no proof. In this case, the client is expected to notify the auditor, providing a transcript of the interaction. The @@ -935,11 +935,11 @@ provide the now correct response to the client or take appropriate legal action against the faulty provider. The third case are transient failures, such as network failures or -temporary hardware failures at the mint service provider. Here, the +temporary hardware failures at the exchange service provider. Here, the client may receive an explicit protocol indication, such as an HTTP response code 500 ``internal server error'' or simply no response. The appropriate behavior for the client is to automatically retry -after 1s, and twice more at randomized times within 1 minute. +after 1s, and twice more at randomized times within 1 minute. If those three attempts fail, the user should be informed about the delay. The client should then retry another three times within the next 24h, and after that time the auditor be informed about the outage. @@ -947,7 +947,7 @@ next 24h, and after that time the auditor be informed about the outage. Using this process, short term failures should be effectively obscured from the user, while malicious behavior is reported to the auditor who can then presumably rectify the situation, such as by shutting down -the operator and helping customers to regain refunds for coins in +the operator and helping customers to regain refunds for coins in their wallets. To ensure that such refunds are possible, the operator is expected to always provide adequate securities for the amount of coins in circulation as part of the certification process. @@ -961,14 +961,14 @@ details, and having the customer keep the private key of the spent coins on file. Given this, the merchant can simply sign a {\em refund confirmation} -and share it with the mint and the customer. Assuming the mint has +and share it with the exchange and the customer. Assuming the exchange has a way to recover the funds from the merchant, or has not yet performed -the wire transfer, the mint can simply add the value of the refunded -transaction back to the original coin, re-enabling those funds to be +the wire transfer, the exchange can simply add the value of the refunded +transaction back to the original coin, re-enabling those funds to be spent again by the original customer. This anonymous customer can then use the refresh protocol to melt the -refunded coin and create a fresh coin that is unlinkable to the +refunded coin and create a fresh coin that is unlinkable to the refunded transaction. @@ -976,11 +976,11 @@ refunded transaction. Taler's security is largely equivalent to that of Chaum's original design without online checks or the cut-and-choose revelation of -double-spending customers for offline spending. -We specifically note that the digital equivalent of the ``Columbian -Black Market Exchange''~\cite{fatf1997} is a theoretical problem for +double-spending customers for offline spending. +We specifically note that the digital equivalent of the ``Columbian +Black Market Exchange''~\cite{fatf1997} is a theoretical problem for both Chaum and Taler, as individuals with a strong mutual trust -foundation can simply copy electronic coins and thereby establish a +foundation can simply copy electronic coins and thereby establish a limited form of black transfers. However, unlike the situation with physical checks with blank recipients in the Columbian black market, the transitivity is limited as each participant can deposit the electronic @@ -990,11 +990,11 @@ check and not also all previous owners of the physical check. As with any unconditionally anonymous payment system, the ``Perfect Crime'' attack~\cite{solms1992perfect} where blackmail is used to -force the mint to issue anonymous coins also continues to apply in +force the exchange to issue anonymous coins also continues to apply in principle. However, as mentioned Taler does facilitate limits on withdrawals, which we believe is a better trade-off than the problematic escrow systems where the necessary intransparency -actually facilitates voluntary cooperation between the mint and +actually facilitates voluntary cooperation between the exchange and criminals~\cite{sander1999escrow} and where state can selectively deanonymize activists to support the deep state's quest for absolute security. @@ -1002,12 +1002,12 @@ security. \subsection{Offline Payments} Chaum's original proposals for anonymous digital cash avoided the need -for online interactions with the mint to detect double spending by +for online interactions with the exchange to detect double spending by providing a means to deanonymize customers involved in -double-spending. We believe that this is problematic as the mint or +double-spending. We believe that this is problematic as the exchange or the merchant will then still need out-of-band means to recover funds from the customer, which may be impossible in practice. In contrast, -in our design only the mint may try to defraud the other participants +in our design only the exchange may try to defraud the other participants and disappear. While this is still a risk, and regular financial audits are required to protect against it, this is more manageable and significantly cheaper compared to recovering funds via the court @@ -1017,12 +1017,12 @@ Chaum's method for offline payments would also be incompatible with the refreshing protocol (Section~\ref{sec:refreshing}) which enables the crucial feature of giving unlinkable change. The reason is that if the owner's identity were embedded in coins, it would be leaked to -the mint as part of the reveal operation in the cut-and-choose +the exchange as part of the reveal operation in the cut-and-choose operation of the refreshing protocol. %\subsection{Merchant Tax Audits} % -%For a tax audit on the merchant, the mint includes the business +%For a tax audit on the merchant, the exchange includes the business %transaction-specific hash in the transfer of the traditional %currency. A tax auditor can then request the merchant to reveal %(meaningful) details about the business transaction ($\mathcal{D}$, @@ -1048,13 +1048,13 @@ computing base (TCB) is public and free software. %\subsection{System Performance} % %We performed some initial performance measurements for the various -%operations on our mint implementation. The main conclusion was that +%operations on our exchange implementation. The main conclusion was that %the computational and bandwidth cost for transactions described in %this paper is smaller than $10^{-3}$ cent/transaction, and thus -%dwarfed by the other business costs for the mint. However, this +%dwarfed by the other business costs for the exchange. However, this %figure excludes the cost of currency transfers using traditional -%banking, which a mint operator would ultimately have to interact with. -%Here, mint operators should be able to reduce their expenses by +%banking, which a exchange operator would ultimately have to interact with. +%Here, exchange operators should be able to reduce their expenses by %aggregating multiple transfers to the same merchant. @@ -1065,8 +1065,8 @@ computing base (TCB) is public and free software. %citizen's need for privacy and the state's need for taxation. The %coin refreshing protocol makes the design flexible and enables a %variety of payment methods. The current balance and profits of the -%mint are also easily determined, thus audits can be used to ensure -%that the mint operates correctly. The libre implementation and open +%exchange are also easily determined, thus audits can be used to ensure +%that the exchange operates correctly. The libre implementation and open %protocol may finally enable modern society to upgrade to proper %electronic wallets with efficient, secure and privacy-preserving %transactions. @@ -1097,17 +1097,17 @@ certain interactions. However, we note that Taler's transaction costs are expected to be so low that these features are likely not particularly useful in practice: When we performed some initial performance measurements for -the various operations on our mint implementation, the main conclusion +the various operations on our exchange implementation, the main conclusion was that the computational and bandwidth cost for transactions described in this paper is smaller than $10^{-3}$ cent/transaction, -and thus dwarfed by the other business costs for the mint. We note +and thus dwarfed by the other business costs for the exchange. We note that the $10^{-3}$ cent/transaction estimate excludes the cost of wire -transfers using traditional banking, which a mint operator would -ultimately have to interact with. Here, mint operators should be able +transfers using traditional banking, which a exchange operator would +ultimately have to interact with. Here, exchange operators should be able to reduce their expenses by aggregating multiple transfers to the same merchant. -As a result of the low cost of the interaction with the mint in Taler +As a result of the low cost of the interaction with the exchange in Taler today, we expect that transactions with amounts below Taler's internal transaction costs to be economically meaningless. Nevertheless, we document various ways how such transactions could be achieved within @@ -1120,7 +1120,7 @@ Taler. For services that include pay-as-you-go billing, customers can over time sign deposit permissions for an increasing fraction of the value of a coin to be paid to a particular merchant. As checking with the -mint for each increment might be expensive, the coin's owner can +exchange for each increment might be expensive, the coin's owner can instead sign a {\em lock permission}, which allows the merchant to get an exclusive right to redeem deposit permissions for the coin for a limited duration. The merchant uses the lock permission to determine @@ -1128,41 +1128,41 @@ if the coin has already been spent and to ensure that it cannot be spent by another merchant for the {\em duration} of the lock as specified in the lock permission. If the coin has insufficient funds because too much has been spent or is -already locked, the mint provides the owner's deposit or locking +already locked, the exchange provides the owner's deposit or locking request and signature to prove the attempted fraud by the customer. -Otherwise, the mint locks the coin for the expected duration of the +Otherwise, the exchange locks the coin for the expected duration of the transaction (and remembers the lock permission). The merchant and the customer can then finalize the business transaction, possibly exchanging a series of incremental payment permissions for services. -Finally, the merchant then redeems the coin at the mint before the +Finally, the merchant then redeems the coin at the exchange before the lock permission expires to ensure that no other merchant redeems the coin first. \begin{enumerate} \item\label{offer2} The merchant sends an \emph{offer:} $\langle S_M(m, f), \vec{D} \rangle$ containing the price of the offer $f$, a transaction - ID $m$ and the list of mints $D_1, \ldots, D_n$ accepted by the merchant - where each $D_j$ is a mint's public key. + ID $m$ and the list of exchanges $D_1, \ldots, D_n$ accepted by the merchant + where each $D_j$ is a exchange's public key. \item\label{lock2} The customer must possess or acquire a coin $\widetilde{C}$ - signed by a mint that is + signed by a exchange that is accepted by the merchant, i.e. $K$ should be signed by some $D_j \in \{D_1, D_2, \ldots, D_n\}$, and has a value $\geq f$. Customer then generates a \emph{lock-permission} $\mathcal{L} := S_c(\widetilde{C}, t, m, f, M_p)$ where $t$ specifies the time until which the lock is valid and sends $\langle \mathcal{L}, D_j\rangle$ to the merchant, - where $D_j$ is the mint which signed $K$. -\item The merchant asks the mint to apply the lock by sending $\langle - \mathcal{L} \rangle$ to the mint. -\item The mint validates $\widetilde{C}$ and detects double spending + where $D_j$ is the exchange which signed $K$. +\item The merchant asks the exchange to apply the lock by sending $\langle + \mathcal{L} \rangle$ to the exchange. +\item The exchange validates $\widetilde{C}$ and detects double spending in the form of existing \emph{deposit-permission} or lock-permission records for $\widetilde{C}$. If such records exist - and indicate that insufficient funds are left, the mint sends those + and indicate that insufficient funds are left, the exchange sends those records to the merchant, who can then use the records to prove the double spending to the customer. If double spending is not found, - the mint commits $\langle \mathcal{L} \rangle$ to disk + the exchange commits $\langle \mathcal{L} \rangle$ to disk and notifies the merchant that locking was successful. \item\label{contract2} The merchant creates a digitally signed contract $\mathcal{A} := S_M(m, f, a, H(p, r))$ where $a$ is data relevant to the contract @@ -1173,23 +1173,23 @@ coin first. \emph{deposit-permission} $\mathcal{D} := S_c(\widetilde{C}, \widetilde{L}, f, m, M_p, H(a), H(p, r))$, commits $\langle \mathcal{A}, \mathcal{D} \rangle$ to disk and sends $\mathcal{D}$ to the merchant. \item\label{invoice_paid2} The merchant commits the received $\langle \mathcal{D} \rangle$ to disk. -\item The merchant gives $(\mathcal{D}, p, r)$ to the mint, revealing his +\item The merchant gives $(\mathcal{D}, p, r)$ to the exchange, revealing his payment information. -\item The mint verifies $(\mathcal{D}, p, r)$ for its validity and +\item The exchange verifies $(\mathcal{D}, p, r)$ for its validity and checks against double spending, while of course permitting the merchant to withdraw funds from the amount that had been locked for this merchant. \item If $\widetilde{C}$ is valid and no equivalent \emph{deposit-permission} for $\widetilde{C}$ and $\widetilde{L}$ exists on disk, the - mint performs the following transaction: + exchange performs the following transaction: \begin{enumerate} \item $\langle \mathcal{D}, p, r \rangle$ is committed to disk. \item\label{transfer2} transfers an amount of $f$ to the merchant's bank account given in $p$. The subject line of the transaction to $p$ must contain $H(\mathcal{D})$. \end{enumerate} - Finally, the mint sends a confirmation to the merchant. + Finally, the exchange sends a confirmation to the merchant. \item If the deposit record $\langle \mathcal{D}, p, r \rangle$ already exists, - the mint sends the confirmation to the merchant, + the exchange sends the confirmation to the merchant, but does not transfer money to $p$ again. \end{enumerate} @@ -1223,7 +1223,7 @@ incremental amount up to $f_{max}$: For transactions with multiple coins, the steps of the protocol are executed in parallel for each coin. During the time a coin is locked, the locked fraction may not be spent at a different merchant or via a -deposit permission that does not contain $\mathcal{L}$. The mint will +deposit permission that does not contain $\mathcal{L}$. The exchange will release the locks when they expire or are used in a deposit operation. Thus the coins can be used with other merchants once their locks expire, even if the original merchant never executed any deposit for @@ -1234,7 +1234,7 @@ Similarly, if a transaction is aborted after Step 2, subsequent transactions with the same coin can be linked to the coin, but not directly to the coin's owner. The same applies to partially spent coins. Thus, to unlink subsequent transactions from a coin, the -customer has to execute the coin refreshing protocol with the mint. +customer has to execute the coin refreshing protocol with the exchange. %\begin{figure}[h] %\centering @@ -1244,12 +1244,12 @@ customer has to execute the coin refreshing protocol with the mint. %\node (origin) at (0,0) {}; %\node (offer) [def,below=of origin]{make offer (merchant $\rightarrow$ customer)}; %\node (A) [def,below=of offer]{permit lock (customer $\rightarrow$ merchant)}; -%\node (B) [def,below=of A]{apply lock (merchant $\rightarrow$ mint)}; -%\node (C) [def,below=of B]{confirm (or refuse) lock (mint $\rightarrow$ merchant)}; +%\node (B) [def,below=of A]{apply lock (merchant $\rightarrow$ exchange)}; +%\node (C) [def,below=of B]{confirm (or refuse) lock (exchange $\rightarrow$ merchant)}; %\node (D) [def,below=of C]{sign contract (merchant $\rightarrow$ customer)}; %\node (E) [def,below=of D]{permit deposit (customer $\rightarrow$ merchant)}; -%\node (F) [def,below=of E]{make deposit (merchant $\rightarrow$ mint)}; -%\node (G) [def,below=of F]{transfer confirmation (mint $\rightarrow$ merchant)}; +%\node (F) [def,below=of E]{make deposit (merchant $\rightarrow$ exchange)}; +%\node (G) [def,below=of F]{transfer confirmation (exchange $\rightarrow$ merchant)}; % %\tikzstyle{C} = [color=black, line width=1pt] %\draw [->,C](offer) -- (A); @@ -1263,7 +1263,7 @@ customer has to execute the coin refreshing protocol with the mint. %\draw [->,C, bend right, shorten <=2mm] (E.east) % to[out=-135,in=-45,distance=3.8cm] node[left] {aggregate} (D.east); %\end{tikzpicture} -%\caption{Interactions between a customer, merchant and mint in the coin spending +%\caption{Interactions between a customer, merchant and exchange in the coin spending % protocol} %\label{fig:spending_protocol_interactions} %\end{figure} @@ -1274,7 +1274,7 @@ customer has to execute the coin refreshing protocol with the mint. Similar to Peppercoin, Taler supports probabilistic {\em micro}donations of coins to support cost-effective transactions for small amounts. We consider amounts to be ``micro'' if the value of the transaction is close or -even below the business cost of an individual transaction to the mint. +even below the business cost of an individual transaction to the exchange. To support microdonations, an ordinary transaction is performed based on the result of a biased coin flip with a probability related to the @@ -1282,7 +1282,7 @@ desired transaction amount in relation to the value of the coin. More specifically, a microdonation of value $\epsilon$ is upgraded to a macropayment of value $m$ with a probability of $\frac{\epsilon}{m}$. Here, $m$ is chosen such that the business transaction cost at the -mint is small in relation to $m$. The mint is only involved in the +exchange is small in relation to $m$. The exchange is only involved in the tiny fraction of transactions that are upgraded. On average both customers and merchants end up paying (or receiving) the expected amount $\epsilon$ per microdonation. @@ -1290,12 +1290,12 @@ amount $\epsilon$ per microdonation. Unlike Peppercoin, in Taler either the merchant wins and the customer looses the coin, or the merchant looses and the customer keeps the coin. Thus, there is no opportunity for the merchant and the customer -to conspire against the mint. To determine if the coin is to be +to conspire against the exchange. To determine if the coin is to be transferred, merchant and customer execute a secure coin flipping protocol~\cite{blum1981}. The commit values are included in the business contract and are revealed after the contract has been signed using the private key of the coin. If the coin flip is decided in -favor of the merchant, the merchant can redeem the coin at the mint. +favor of the merchant, the merchant can redeem the coin at the exchange. One issue in this protocol is that the customer may use a worthless coin by offering a coin that has already been spent. This kind of @@ -1306,9 +1306,9 @@ already spent coins until the coin flip is in his favor. As with incremental spending, lock permissions could be used to ensure that the customer cannot defraud the merchant by offering a coin that -has already been spent. However, as this means involving the mint +has already been spent. However, as this means involving the exchange even if the merchant looses the coin flip, such a scheme is unsuitable -for microdonations as the transaction costs from involving the mint +for microdonations as the transaction costs from involving the exchange might be disproportionate to the value of the transaction, and thus with locking the probabilistic scheme has no advantage over simply using fractional payments. @@ -1366,7 +1366,7 @@ indicate the application of a function $f$ to one or more arguments. Records of data being committed to disk are represented in between $\langle\rangle$. \begin{description} - \item[$K_s$]{Private (RSA) key of the mint used for coin signing} + \item[$K_s$]{Private (RSA) key of the exchange used for coin signing} \item[$K_p$]{Public (RSA) key corresponding to $K_s$} \item[$K$]{Public-priate (RSA) coin signing key pair $K := (K_s, K_p)$} \item[$b$]{RSA blinding factor for RSA-style blind signatures} @@ -1389,11 +1389,11 @@ data being committed to disk are represented in between $\langle\rangle$. \item[$c_s'$]{Private key of a ``dirty'' coin (otherwise like $c_s$)} \item[$C_p'$]{Public key of a ``dirty'' coin (otherwise like $C_p$)} \item[$C'$]{Dirty coin (otherwise like $C$)} - \item[$\widetilde{C}$]{Mint signature $S_K(C_p)$ indicating validity of a fresh coin (with key $C$)} - \item[$n$]{Number of mints accepted by a merchant} - \item[$j$]{Index into a set of accepted mints, $i \in \{1,\ldots,n\}$} - \item[$D_j$]{Public key of a mint (not used to sign coins)} - \item[$\vec{D}$]{Vector of $D_j$ signifying mints accepted by a merchant} + \item[$\widetilde{C}$]{Exchange signature $S_K(C_p)$ indicating validity of a fresh coin (with key $C$)} + \item[$n$]{Number of exchanges accepted by a merchant} + \item[$j$]{Index into a set of accepted exchanges, $i \in \{1,\ldots,n\}$} + \item[$D_j$]{Public key of a exchange (not used to sign coins)} + \item[$\vec{D}$]{Vector of $D_j$ signifying exchanges accepted by a merchant} \item[$a$]{Complete text of a contract between customer and merchant} \item[$f$]{Amount a customer agrees to pay to a merchant for a contract} \item[$m$]{Unique transaction identifier chosen by the merchant} From b5cba3251053c22bf1df46282f1dd0a4c46f6a38 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 1 Mar 2016 15:35:04 +0100 Subject: [PATCH 03/91] renaming mint->exchange --- README | 48 +- bootstrap | 0 configure.ac | 10 +- contrib/coverage.sh | 2 +- contrib/exchange-template/README | 1 + .../config/exchange-common.conf} | 16 +- .../config/exchange-keyup.conf} | 2 +- contrib/mint-template/README | 1 - doc/Makefile.am | 10 +- doc/coding-style.txt | 12 +- doc/doxygen/Makefile.am | 6 +- doc/doxygen/taler-mint.doxy | 2 +- doc/logos/fonts/OldNewspaperTypes.ttf | Bin doc/paper/rfc.bib | 111 ++-- doc/taler-auditor-sign.1 | 14 +- doc/taler-exchange-dbinit.1 | 29 + doc/taler-exchange-httpd.1 | 39 ++ doc/taler-exchange-keycheck.1 | 29 + doc/taler-exchange-keyup.1 | 38 ++ doc/taler-exchange-reservemod.1 | 35 ++ ...aler-mint-sepa.1 => taler-exchange-sepa.1} | 12 +- doc/taler-mint-dbinit.1 | 29 - doc/taler-mint-httpd.1 | 39 -- doc/taler-mint-keycheck.1 | 29 - doc/taler-mint-keyup.1 | 38 -- doc/taler-mint-reservemod.1 | 35 -- doc/taler.conf.5 | 20 +- src/Makefile.am | 14 +- src/bank-lib/bank_api_context.c | 2 +- src/bank-lib/bank_api_json.h | 4 +- src/exchange-lib/Makefile.am | 62 ++ .../afl-generate.sh | 6 +- .../baseline/admin_add_incoming.req | 0 .../baseline/deposit.req | 0 .../baseline/keys.req | 0 .../baseline/refresh_link.req | 0 .../baseline/refresh_melt.req | 0 .../baseline/refresh_reveal.req | 0 .../baseline/reserve_status.req | 0 .../baseline/reserve_withdraw.req | 0 .../baseline/wire.req | 0 .../baseline/wire_sepa.req | 0 .../baseline/wire_test.req | 0 .../exchange_api_admin.c} | 62 +- .../exchange_api_common.c} | 20 +- .../exchange_api_common.h} | 12 +- .../exchange_api_context.c} | 56 +- .../exchange_api_context.h} | 10 +- .../exchange_api_deposit.c} | 136 ++--- .../exchange_api_deposit_wtid.c} | 90 +-- .../exchange_api_handle.c} | 266 ++++----- .../exchange_api_handle.h} | 24 +- .../exchange_api_json.c} | 6 +- .../exchange_api_json.h} | 4 +- .../exchange_api_refresh.c} | 190 +++--- .../exchange_api_refresh_link.c} | 62 +- .../exchange_api_reserve.c} | 146 ++--- .../exchange_api_wire.c} | 138 ++--- .../exchange_api_wire_deposits.c} | 64 +-- .../config/mint-common.conf | 18 +- .../config/mint-keyup.conf | 2 +- .../test-exchange-home}/master.priv | 0 .../test-exchange-home}/sepa.json | 0 .../test_exchange_api.c} | 240 ++++---- src/exchange-tools/Makefile.am | 81 +++ .../taler-auditor-sign.c | 68 +-- .../taler-exchange-dbinit.c} | 42 +- .../taler-exchange-keycheck.c} | 52 +- .../taler-exchange-keyup.c} | 122 ++-- .../taler-exchange-reservemod.c} | 38 +- .../taler-exchange-sepa.c} | 10 +- src/exchange/.gitignore | 6 + src/exchange/Makefile.am | 59 ++ .../id:000000,orig:admin_add_incoming.req | 0 .../afl-tests/id:000001,orig:deposit.req | 0 ...00001,sig:06,src:000004,op:flip1,pos:21060 | 0 .../afl-tests/id:000002,orig:keys.req | 0 .../afl-tests/id:000003,orig:refresh_link.req | 0 .../afl-tests/id:000004,orig:refresh_melt.req | 0 .../id:000005,orig:refresh_reveal.req | 0 .../id:000006,orig:reserve_status.req | 0 .../id:000007,orig:reserve_withdraw.req | 0 .../afl-tests/id:000008,orig:wire.req | 0 .../afl-tests/id:000009,orig:wire_sepa.req | 0 .../afl-tests/id:000010,orig:wire_test.req | 0 .../id:000011,src:000000,op:flip1,pos:1,+cov | 0 .../id:000011,src:000000,op:flip1,pos:2,+cov | 0 .../id:000012,src:000000,op:flip1,pos:3,+cov | 0 .../id:000012,src:000000,op:flip1,pos:4,+cov | Bin .../id:000013,src:000000,op:flip1,pos:4,+cov | Bin .../id:000013,src:000000,op:flip1,pos:5,+cov | 0 .../id:000014,src:000000,op:flip1,pos:5,+cov | 0 .../id:000015,src:000000,op:flip1,pos:5,+cov | 0 .../id:000015,src:000000,op:flip1,pos:8,+cov | 0 .../id:000016,src:000000,op:flip1,pos:11 | 0 .../id:000016,src:000000,op:flip1,pos:5,+cov | 0 .../id:000017,src:000000,op:flip1,pos:13,+cov | 0 .../id:000017,src:000000,op:flip1,pos:7,+cov | 0 .../id:000018,src:000000,op:flip1,pos:13,+cov | 0 .../id:000018,src:000000,op:flip1,pos:9,+cov | 0 .../id:000019,src:000000,op:flip1,pos:11 | 0 .../id:000019,src:000000,op:flip1,pos:19,+cov | 0 .../id:000020,src:000000,op:flip1,pos:12,+cov | 0 .../id:000020,src:000000,op:flip1,pos:19,+cov | 0 .../id:000021,src:000000,op:flip1,pos:13,+cov | 0 .../id:000021,src:000000,op:flip1,pos:21,+cov | 0 .../id:000022,src:000000,op:flip1,pos:17,+cov | 0 .../id:000022,src:000000,op:flip1,pos:23,+cov | 0 .../id:000023,src:000000,op:flip1,pos:22,+cov | 0 .../id:000023,src:000000,op:flip1,pos:24,+cov | 0 .../id:000024,src:000000,op:flip1,pos:24,+cov | 0 .../id:000025,src:000000,op:flip1,pos:24,+cov | Bin .../id:000026,src:000000,op:flip1,pos:25,+cov | 0 .../id:000027,src:000000,op:flip1,pos:26,+cov | 0 .../id:000028,src:000000,op:flip1,pos:26,+cov | 0 .../id:000029,src:000000,op:flip1,pos:26,+cov | 0 .../id:000029,src:000000,op:flip1,pos:27,+cov | 0 .../id:000030,src:000000,op:flip1,pos:27 | 0 .../id:000030,src:000000,op:flip1,pos:27,+cov | 0 .../id:000031,src:000000,op:flip1,pos:27,+cov | 0 .../id:000031,src:000000,op:flip1,pos:28,+cov | 0 .../id:000032,src:000000,op:flip1,pos:28,+cov | 0 .../id:000032,src:000000,op:flip1,pos:30,+cov | 0 .../id:000033,src:000000,op:flip1,pos:28,+cov | 0 .../id:000033,src:000000,op:flip1,pos:30,+cov | 0 .../id:000034,src:000000,op:flip1,pos:28,+cov | 0 .../id:000034,src:000000,op:flip1,pos:30,+cov | 0 .../id:000035,src:000000,op:flip1,pos:30,+cov | 0 .../id:000036,src:000000,op:flip1,pos:31,+cov | 0 .../id:000037,src:000000,op:flip1,pos:32,+cov | 0 .../id:000038,src:000000,op:flip1,pos:32 | 0 .../id:000038,src:000000,op:flip1,pos:32,+cov | 0 .../id:000039,src:000000,op:flip1,pos:32,+cov | 0 .../id:000039,src:000000,op:flip1,pos:34,+cov | 0 .../id:000040,src:000000,op:flip1,pos:32,+cov | 0 .../id:000040,src:000000,op:flip1,pos:34,+cov | 0 .../id:000041,src:000000,op:flip1,pos:34,+cov | 0 .../id:000041,src:000000,op:flip1,pos:36,+cov | 0 .../id:000042,src:000000,op:flip1,pos:36,+cov | 0 .../id:000043,src:000000,op:flip1,pos:37,+cov | 0 .../id:000043,src:000000,op:flip1,pos:38 | 0 .../id:000044,src:000000,op:flip1,pos:38 | 0 .../id:000044,src:000000,op:flip1,pos:38,+cov | 0 .../id:000045,src:000000,op:flip1,pos:38,+cov | 0 .../id:000045,src:000000,op:flip1,pos:39,+cov | Bin .../id:000046,src:000000,op:flip1,pos:39,+cov | Bin .../id:000047,src:000000,op:flip1,pos:39 | 0 .../id:000047,src:000000,op:flip1,pos:39,+cov | 0 .../id:000048,src:000000,op:flip1,pos:39,+cov | 0 .../id:000048,src:000000,op:flip1,pos:40,+cov | 0 .../id:000049,src:000000,op:flip1,pos:41,+cov | 0 .../id:000050,src:000000,op:flip1,pos:41,+cov | 0 .../id:000050,src:000000,op:flip1,pos:42,+cov | 0 .../id:000051,src:000000,op:flip1,pos:41,+cov | 0 .../id:000051,src:000000,op:flip1,pos:47,+cov | 0 .../id:000052,src:000000,op:flip1,pos:42,+cov | 0 .../id:000052,src:000000,op:flip1,pos:47,+cov | 0 .../id:000053,src:000000,op:flip1,pos:42,+cov | 0 .../id:000053,src:000000,op:flip1,pos:47,+cov | 0 .../id:000054,src:000000,op:flip1,pos:43,+cov | 0 .../id:000054,src:000000,op:flip1,pos:49,+cov | 0 .../id:000055,src:000000,op:flip1,pos:43,+cov | 0 .../id:000055,src:000000,op:flip1,pos:52,+cov | 0 .../id:000056,src:000000,op:flip1,pos:44,+cov | 0 .../id:000056,src:000000,op:flip1,pos:52,+cov | 0 .../id:000057,src:000000,op:flip1,pos:47,+cov | 0 .../id:000057,src:000000,op:flip1,pos:54,+cov | 0 .../id:000058,src:000000,op:flip1,pos:47,+cov | 0 .../id:000058,src:000000,op:flip1,pos:54,+cov | 0 .../id:000059,src:000000,op:flip1,pos:48,+cov | 0 .../id:000059,src:000000,op:flip1,pos:55,+cov | 0 .../id:000060,src:000000,op:flip1,pos:49,+cov | 0 .../id:000060,src:000000,op:flip1,pos:56,+cov | 0 .../id:000061,src:000000,op:flip1,pos:50,+cov | 0 .../id:000061,src:000000,op:flip1,pos:59,+cov | 0 .../id:000062,src:000000,op:flip1,pos:51,+cov | 0 .../id:000062,src:000000,op:flip1,pos:60,+cov | 0 .../id:000063,src:000000,op:flip1,pos:54 | 0 .../id:000063,src:000000,op:flip1,pos:61,+cov | 0 .../id:000064,src:000000,op:flip1,pos:55,+cov | 0 .../id:000064,src:000000,op:flip1,pos:62,+cov | Bin .../id:000065,src:000000,op:flip1,pos:55,+cov | 0 .../id:000065,src:000000,op:flip1,pos:63,+cov | 0 .../id:000066,src:000000,op:flip1,pos:56,+cov | 0 .../id:000066,src:000000,op:flip1,pos:63,+cov | 0 .../id:000067,src:000000,op:flip1,pos:58,+cov | 0 .../id:000067,src:000000,op:flip1,pos:65,+cov | 0 .../id:000068,src:000000,op:flip1,pos:60,+cov | 0 .../id:000068,src:000000,op:flip1,pos:66,+cov | 0 .../id:000069,src:000000,op:flip1,pos:61,+cov | 0 .../id:000069,src:000000,op:flip1,pos:67,+cov | 0 .../id:000070,src:000000,op:flip1,pos:62,+cov | 0 .../id:000070,src:000000,op:flip1,pos:69,+cov | 0 .../id:000071,src:000000,op:flip1,pos:62,+cov | Bin .../id:000071,src:000000,op:flip1,pos:74,+cov | 0 .../id:000072,src:000000,op:flip1,pos:63,+cov | 0 .../id:000072,src:000000,op:flip1,pos:76,+cov | 0 .../id:000073,src:000000,op:flip1,pos:64,+cov | 0 .../id:000073,src:000000,op:flip1,pos:81,+cov | 0 .../id:000074,src:000000,op:flip1,pos:65,+cov | 0 .../id:000074,src:000000,op:flip1,pos:82,+cov | 0 .../id:000075,src:000000,op:flip1,pos:71,+cov | 0 .../id:000075,src:000000,op:flip1,pos:82,+cov | 0 .../id:000076,src:000000,op:flip1,pos:71 | 0 .../id:000076,src:000000,op:flip1,pos:83,+cov | 0 .../id:000077,src:000000,op:flip1,pos:72,+cov | 0 .../id:000077,src:000000,op:flip1,pos:85,+cov | 0 .../id:000078,src:000000,op:flip1,pos:73,+cov | 0 .../id:000078,src:000000,op:flip1,pos:87,+cov | 0 .../id:000079,src:000000,op:flip1,pos:74,+cov | 0 .../id:000079,src:000000,op:flip1,pos:87,+cov | 0 .../id:000080,src:000000,op:flip1,pos:75,+cov | 0 .../id:000080,src:000000,op:flip1,pos:87,+cov | 0 .../id:000081,src:000000,op:flip1,pos:75,+cov | 0 .../id:000081,src:000000,op:flip1,pos:90,+cov | 0 .../id:000082,src:000000,op:flip1,pos:76,+cov | 0 .../id:000082,src:000000,op:flip1,pos:92,+cov | 0 .../id:000083,src:000000,op:flip1,pos:78,+cov | 0 .../id:000083,src:000000,op:flip1,pos:93,+cov | 0 .../id:000084,src:000000,op:flip1,pos:80,+cov | 0 .../id:000084,src:000000,op:flip1,pos:95,+cov | 0 .../id:000085,src:000000,op:flip1,pos:80,+cov | 0 .../id:000085,src:000000,op:flip1,pos:95,+cov | 0 .../id:000086,src:000000,op:flip1,pos:81,+cov | 0 .../id:000086,src:000000,op:flip1,pos:96,+cov | 0 .../id:000087,src:000000,op:flip1,pos:82,+cov | 0 .../id:000087,src:000000,op:flip1,pos:96,+cov | 0 ...id:000088,src:000000,op:flip1,pos:100,+cov | 0 .../id:000088,src:000000,op:flip1,pos:82,+cov | 0 .../id:000089,src:000000,op:flip1,pos:105 | 0 .../id:000089,src:000000,op:flip1,pos:84,+cov | 0 ...id:000090,src:000000,op:flip1,pos:113,+cov | 0 .../id:000090,src:000000,op:flip1,pos:84,+cov | 0 ...id:000091,src:000000,op:flip1,pos:114,+cov | 0 .../id:000091,src:000000,op:flip1,pos:91,+cov | 0 ...id:000092,src:000000,op:flip1,pos:121,+cov | 0 .../id:000092,src:000000,op:flip1,pos:92,+cov | 0 ...id:000093,src:000000,op:flip1,pos:123,+cov | 0 .../id:000093,src:000000,op:flip1,pos:93,+cov | 0 ...id:000094,src:000000,op:flip1,pos:126,+cov | 0 .../id:000094,src:000000,op:flip1,pos:95,+cov | 0 ...id:000095,src:000000,op:flip1,pos:135,+cov | 0 .../id:000095,src:000000,op:flip1,pos:96,+cov | 0 ...id:000096,src:000000,op:flip1,pos:135,+cov | 0 .../id:000096,src:000000,op:flip1,pos:96,+cov | 0 ...id:000097,src:000000,op:flip1,pos:135,+cov | 0 .../id:000097,src:000000,op:flip1,pos:97,+cov | 0 .../id:000098,src:000000,op:flip1,pos:105 | 0 ...id:000098,src:000000,op:flip1,pos:136,+cov | 0 .../id:000099,src:000000,op:flip1,pos:106 | 0 ...id:000099,src:000000,op:flip1,pos:136,+cov | 0 ...id:000100,src:000000,op:flip1,pos:113,+cov | 0 ...id:000100,src:000000,op:flip1,pos:136,+cov | 0 ...id:000101,src:000000,op:flip1,pos:114,+cov | 0 ...id:000101,src:000000,op:flip1,pos:136,+cov | 0 ...id:000102,src:000000,op:flip1,pos:121,+cov | 0 ...id:000102,src:000000,op:flip1,pos:137,+cov | 0 ...id:000103,src:000000,op:flip1,pos:130,+cov | 0 ...id:000103,src:000000,op:flip1,pos:138,+cov | 0 ...id:000104,src:000000,op:flip1,pos:136,+cov | 0 ...id:000104,src:000000,op:flip1,pos:138,+cov | 0 ...id:000105,src:000000,op:flip1,pos:137,+cov | 0 ...id:000105,src:000000,op:flip1,pos:139,+cov | 0 ...id:000106,src:000000,op:flip1,pos:137,+cov | 0 ...id:000106,src:000000,op:flip1,pos:139,+cov | 0 ...id:000107,src:000000,op:flip1,pos:139,+cov | 0 ...id:000107,src:000000,op:flip1,pos:140,+cov | 0 ...id:000108,src:000000,op:flip1,pos:140,+cov | 0 ...id:000108,src:000000,op:flip1,pos:141,+cov | 0 ...id:000109,src:000000,op:flip1,pos:140,+cov | 0 ...id:000109,src:000000,op:flip1,pos:141,+cov | 0 ...id:000110,src:000000,op:flip1,pos:141,+cov | 0 ...id:000110,src:000000,op:flip1,pos:143,+cov | 0 ...id:000111,src:000000,op:flip1,pos:141,+cov | 0 ...id:000111,src:000000,op:flip1,pos:145,+cov | 0 ...id:000112,src:000000,op:flip1,pos:142,+cov | 0 ...id:000112,src:000000,op:flip1,pos:147,+cov | 0 ...id:000113,src:000000,op:flip1,pos:143,+cov | 0 ...id:000113,src:000000,op:flip1,pos:147,+cov | 0 ...id:000114,src:000000,op:flip1,pos:144,+cov | 0 ...id:000114,src:000000,op:flip1,pos:150,+cov | 0 ...id:000115,src:000000,op:flip1,pos:147,+cov | 0 ...id:000115,src:000000,op:flip1,pos:153,+cov | 0 ...id:000116,src:000000,op:flip1,pos:150,+cov | 0 ...id:000116,src:000000,op:flip1,pos:154,+cov | 0 ...id:000117,src:000000,op:flip1,pos:151,+cov | 0 ...id:000117,src:000000,op:flip1,pos:155,+cov | 0 ...id:000118,src:000000,op:flip1,pos:151,+cov | 0 ...id:000118,src:000000,op:flip1,pos:157,+cov | 0 ...id:000119,src:000000,op:flip1,pos:154,+cov | 0 ...id:000119,src:000000,op:flip1,pos:158,+cov | 0 ...id:000120,src:000000,op:flip1,pos:155,+cov | 0 ...id:000120,src:000000,op:flip1,pos:158,+cov | 0 ...id:000121,src:000000,op:flip1,pos:156,+cov | 0 ...id:000121,src:000000,op:flip1,pos:159,+cov | 0 ...id:000122,src:000000,op:flip1,pos:157,+cov | 0 ...id:000122,src:000000,op:flip1,pos:159,+cov | 0 ...id:000123,src:000000,op:flip1,pos:160,+cov | 0 ...id:000123,src:000000,op:flip1,pos:161,+cov | 0 ...id:000124,src:000000,op:flip1,pos:161,+cov | 0 ...id:000124,src:000000,op:flip1,pos:164,+cov | 0 ...id:000125,src:000000,op:flip1,pos:161,+cov | 0 ...id:000125,src:000000,op:flip1,pos:166,+cov | 0 .../id:000126,src:000000,op:flip1,pos:163 | 0 ...id:000126,src:000000,op:flip1,pos:166,+cov | 0 ...id:000127,src:000000,op:flip1,pos:166,+cov | 0 ...id:000127,src:000000,op:flip1,pos:167,+cov | 0 ...id:000128,src:000000,op:flip1,pos:167,+cov | 0 ...id:000128,src:000000,op:flip1,pos:170,+cov | 0 ...id:000129,src:000000,op:flip1,pos:168,+cov | 0 ...id:000129,src:000000,op:flip1,pos:173,+cov | 0 ...id:000130,src:000000,op:flip1,pos:171,+cov | 0 ...id:000130,src:000000,op:flip1,pos:173,+cov | 0 ...id:000131,src:000000,op:flip1,pos:172,+cov | 0 ...id:000131,src:000000,op:flip1,pos:174,+cov | 0 ...id:000132,src:000000,op:flip1,pos:173,+cov | 0 ...id:000132,src:000000,op:flip1,pos:176,+cov | 0 ...id:000133,src:000000,op:flip1,pos:173,+cov | 0 ...id:000133,src:000000,op:flip1,pos:178,+cov | 0 ...id:000134,src:000000,op:flip1,pos:174,+cov | 0 ...id:000134,src:000000,op:flip1,pos:178,+cov | 0 ...id:000135,src:000000,op:flip1,pos:179,+cov | 0 .../id:000135,src:000000,op:flip1,pos:180 | 0 ...id:000136,src:000000,op:flip1,pos:182,+cov | 0 ...id:000136,src:000000,op:flip1,pos:183,+cov | 0 ...id:000137,src:000000,op:flip1,pos:182,+cov | 0 ...id:000137,src:000000,op:flip1,pos:184,+cov | 0 .../id:000138,src:000000,op:flip1,pos:183 | 0 ...id:000138,src:000000,op:flip1,pos:185,+cov | 0 ...id:000139,src:000000,op:flip1,pos:183,+cov | 0 .../id:000139,src:000000,op:flip1,pos:190 | 0 ...id:000140,src:000000,op:flip1,pos:185,+cov | 0 ...id:000140,src:000000,op:flip1,pos:200,+cov | 0 ...id:000141,src:000000,op:flip1,pos:185,+cov | 0 ...id:000141,src:000000,op:flip1,pos:205,+cov | 0 .../id:000142,src:000000,op:flip1,pos:190 | 0 ...id:000142,src:000000,op:flip1,pos:211,+cov | 0 ...id:000143,src:000000,op:flip1,pos:193,+cov | 0 ...id:000143,src:000000,op:flip1,pos:238,+cov | 0 ...id:000144,src:000000,op:flip1,pos:200,+cov | 0 ...id:000144,src:000000,op:flip1,pos:238,+cov | 0 ...id:000145,src:000000,op:flip1,pos:211,+cov | 0 ...id:000145,src:000000,op:flip1,pos:241,+cov | 0 ...id:000146,src:000000,op:flip1,pos:223,+cov | 0 .../id:000146,src:000000,op:flip1,pos:245 | 0 .../id:000147,src:000000,op:flip1,pos:245 | 0 ...id:000147,src:000000,op:flip1,pos:255,+cov | 0 ...id:000148,src:000000,op:flip1,pos:262,+cov | 0 ...id:000149,src:000000,op:flip1,pos:268,+cov | 0 ...id:000149,src:000000,op:flip1,pos:270,+cov | 0 ...id:000150,src:000000,op:flip1,pos:269,+cov | 0 ...id:000150,src:000000,op:flip1,pos:279,+cov | 0 ...id:000151,src:000000,op:flip1,pos:270,+cov | 0 ...id:000151,src:000000,op:flip1,pos:279,+cov | 0 ...id:000152,src:000000,op:flip1,pos:271,+cov | 0 ...id:000152,src:000000,op:flip1,pos:283,+cov | 0 ...id:000153,src:000000,op:flip1,pos:271,+cov | 0 ...id:000153,src:000000,op:flip1,pos:291,+cov | 0 ...id:000154,src:000000,op:flip1,pos:274,+cov | 0 ...id:000154,src:000000,op:flip1,pos:298,+cov | 0 ...id:000155,src:000000,op:flip1,pos:279,+cov | 0 ...id:000155,src:000000,op:flip1,pos:302,+cov | 0 ...id:000156,src:000000,op:flip1,pos:281,+cov | 0 ...id:000156,src:000000,op:flip1,pos:305,+cov | 0 ...id:000157,src:000000,op:flip1,pos:283,+cov | 0 ...id:000157,src:000000,op:flip1,pos:307,+cov | 0 ...id:000158,src:000000,op:flip1,pos:291,+cov | 0 ...id:000158,src:000000,op:flip1,pos:313,+cov | 0 ...id:000159,src:000000,op:flip1,pos:298,+cov | 0 ...id:000159,src:000000,op:flip1,pos:313,+cov | 0 ...id:000160,src:000000,op:flip1,pos:299,+cov | 0 ...id:000160,src:000000,op:flip1,pos:314,+cov | 0 ...id:000161,src:000000,op:flip1,pos:306,+cov | 0 ...id:000161,src:000000,op:flip1,pos:314,+cov | 0 ...id:000162,src:000000,op:flip1,pos:308,+cov | 0 ...id:000162,src:000000,op:flip1,pos:315,+cov | 0 ...id:000163,src:000000,op:flip1,pos:312,+cov | 0 ...id:000163,src:000000,op:flip1,pos:316,+cov | 0 ...id:000164,src:000000,op:flip1,pos:315,+cov | 0 .../id:000164,src:000000,op:flip1,pos:317 | 0 ...id:000165,src:000000,op:flip1,pos:316,+cov | 0 ...id:000165,src:000000,op:flip1,pos:317,+cov | 0 ...id:000166,src:000000,op:flip1,pos:316,+cov | 0 ...id:000166,src:000000,op:flip1,pos:319,+cov | 0 ...id:000167,src:000000,op:flip1,pos:317,+cov | 0 ...id:000167,src:000000,op:flip1,pos:320,+cov | 0 ...id:000168,src:000000,op:flip1,pos:317,+cov | 0 ...id:000168,src:000000,op:flip1,pos:322,+cov | 0 ...id:000169,src:000000,op:flip1,pos:318,+cov | Bin ...id:000169,src:000000,op:flip1,pos:326,+cov | 0 ...id:000170,src:000000,op:flip1,pos:319,+cov | 0 ...id:000170,src:000000,op:flip1,pos:328,+cov | 0 ...id:000171,src:000000,op:flip1,pos:326,+cov | 0 .../id:000171,src:000000,op:flip1,pos:329 | 0 .../id:000172,src:000000,op:flip1,pos:327 | 0 ...id:000172,src:000000,op:flip1,pos:332,+cov | 0 ...id:000173,src:000000,op:flip1,pos:330,+cov | 0 .../id:000173,src:000000,op:flip2,pos:8,+cov | 0 ...id:000174,src:000000,op:flip1,pos:331,+cov | 0 .../id:000174,src:000000,op:flip2,pos:8,+cov | 0 ...id:000175,src:000000,op:flip1,pos:338,+cov | 0 .../id:000175,src:000000,op:flip2,pos:28,+cov | 0 .../id:000176,src:000000,op:flip2,pos:30,+cov | 0 .../id:000176,src:000000,op:flip2,pos:8,+cov | 0 .../id:000177,src:000000,op:flip2,pos:25,+cov | 0 .../id:000177,src:000000,op:flip2,pos:30,+cov | 0 .../id:000178,src:000000,op:flip2,pos:26,+cov | 0 .../id:000178,src:000000,op:flip2,pos:31,+cov | 0 .../id:000179,src:000000,op:flip2,pos:29,+cov | 0 .../id:000179,src:000000,op:flip2,pos:31,+cov | 0 .../id:000180,src:000000,op:flip2,pos:30,+cov | 0 .../id:000180,src:000000,op:flip2,pos:32,+cov | 0 .../id:000181,src:000000,op:flip2,pos:33,+cov | 0 .../id:000181,src:000000,op:flip2,pos:36,+cov | 0 .../id:000182,src:000000,op:flip2,pos:38 | 0 .../id:000183,src:000000,op:flip2,pos:39,+cov | 0 .../id:000184,src:000000,op:flip2,pos:40,+cov | 0 .../id:000184,src:000000,op:flip2,pos:43,+cov | 0 .../id:000185,src:000000,op:flip2,pos:40,+cov | 0 .../id:000185,src:000000,op:flip2,pos:49,+cov | 0 .../id:000186,src:000000,op:flip2,pos:40,+cov | 0 .../id:000186,src:000000,op:flip2,pos:54,+cov | 0 .../id:000187,src:000000,op:flip2,pos:46,+cov | 0 .../id:000187,src:000000,op:flip2,pos:60,+cov | 0 .../id:000188,src:000000,op:flip2,pos:47,+cov | 0 .../id:000188,src:000000,op:flip2,pos:64,+cov | 0 .../id:000189,src:000000,op:flip2,pos:48,+cov | 0 .../id:000189,src:000000,op:flip2,pos:69,+cov | 0 .../id:000190,src:000000,op:flip2,pos:49,+cov | 0 .../id:000190,src:000000,op:flip2,pos:71,+cov | 0 .../id:000191,src:000000,op:flip2,pos:53,+cov | 0 .../id:000191,src:000000,op:flip2,pos:73,+cov | 0 .../id:000192,src:000000,op:flip2,pos:53,+cov | 0 .../id:000192,src:000000,op:flip2,pos:73,+cov | 0 .../id:000193,src:000000,op:flip2,pos:62,+cov | 0 .../id:000193,src:000000,op:flip2,pos:75 | 0 .../id:000194,src:000000,op:flip2,pos:68,+cov | 0 .../id:000194,src:000000,op:flip2,pos:77,+cov | 0 .../id:000195,src:000000,op:flip2,pos:70,+cov | 0 .../id:000195,src:000000,op:flip2,pos:81,+cov | 0 .../id:000196,src:000000,op:flip2,pos:73,+cov | 0 .../id:000196,src:000000,op:flip2,pos:81,+cov | 0 .../id:000197,src:000000,op:flip2,pos:73,+cov | 0 .../id:000197,src:000000,op:flip2,pos:83,+cov | 0 .../id:000198,src:000000,op:flip2,pos:76,+cov | 0 .../id:000198,src:000000,op:flip2,pos:84,+cov | 0 .../id:000199,src:000000,op:flip2,pos:76,+cov | 0 .../id:000199,src:000000,op:flip2,pos:85,+cov | 0 .../id:000200,src:000000,op:flip2,pos:80,+cov | 0 .../id:000200,src:000000,op:flip2,pos:86,+cov | 0 .../id:000201,src:000000,op:flip2,pos:86,+cov | 0 .../id:000201,src:000000,op:flip2,pos:89,+cov | 0 ...id:000202,src:000000,op:flip2,pos:101,+cov | 0 .../id:000202,src:000000,op:flip2,pos:90,+cov | 0 .../id:000203,src:000000,op:flip2,pos:114 | 0 .../id:000203,src:000000,op:flip2,pos:93,+cov | 0 ...id:000204,src:000000,op:flip2,pos:100,+cov | 0 ...id:000204,src:000000,op:flip2,pos:115,+cov | 0 .../id:000205,src:000000,op:flip2,pos:114 | 0 ...id:000205,src:000000,op:flip2,pos:116,+cov | Bin ...id:000206,src:000000,op:flip2,pos:115,+cov | 0 ...id:000206,src:000000,op:flip2,pos:140,+cov | 0 ...id:000207,src:000000,op:flip2,pos:116,+cov | Bin ...id:000207,src:000000,op:flip2,pos:140,+cov | 0 ...id:000208,src:000000,op:flip2,pos:124,+cov | 0 ...id:000208,src:000000,op:flip2,pos:146,+cov | 0 ...id:000209,src:000000,op:flip2,pos:135,+cov | 0 ...id:000209,src:000000,op:flip2,pos:147,+cov | 0 ...id:000210,src:000000,op:flip2,pos:137,+cov | 0 ...id:000210,src:000000,op:flip2,pos:148,+cov | 0 ...id:000211,src:000000,op:flip2,pos:138,+cov | 0 ...id:000211,src:000000,op:flip2,pos:148,+cov | 0 ...id:000212,src:000000,op:flip2,pos:138,+cov | 0 ...id:000212,src:000000,op:flip2,pos:159,+cov | 0 ...id:000213,src:000000,op:flip2,pos:139,+cov | 0 ...id:000213,src:000000,op:flip2,pos:161,+cov | 0 ...id:000214,src:000000,op:flip2,pos:143,+cov | 0 ...id:000214,src:000000,op:flip2,pos:164,+cov | 0 ...id:000215,src:000000,op:flip2,pos:146,+cov | 0 ...id:000215,src:000000,op:flip2,pos:164,+cov | 0 ...id:000216,src:000000,op:flip2,pos:156,+cov | 0 ...id:000216,src:000000,op:flip2,pos:166,+cov | 0 ...id:000217,src:000000,op:flip2,pos:161,+cov | 0 ...id:000217,src:000000,op:flip2,pos:170,+cov | 0 ...id:000218,src:000000,op:flip2,pos:171,+cov | 0 ...id:000218,src:000000,op:flip2,pos:176,+cov | 0 .../id:000219,src:000000,op:flip2,pos:180 | 0 ...id:000219,src:000000,op:flip2,pos:185,+cov | 0 ...id:000220,src:000000,op:flip2,pos:184,+cov | 0 ...id:000220,src:000000,op:flip2,pos:193,+cov | 0 ...id:000221,src:000000,op:flip2,pos:211,+cov | 0 ...id:000221,src:000000,op:flip2,pos:226,+cov | 0 ...id:000222,src:000000,op:flip2,pos:218,+cov | 0 ...id:000222,src:000000,op:flip2,pos:232,+cov | 0 ...id:000223,src:000000,op:flip2,pos:239,+cov | 0 ...id:000223,src:000000,op:flip2,pos:271,+cov | 0 ...id:000224,src:000000,op:flip2,pos:241,+cov | Bin ...id:000224,src:000000,op:flip2,pos:279,+cov | 0 ...id:000225,src:000000,op:flip2,pos:250,+cov | 0 ...id:000225,src:000000,op:flip2,pos:308,+cov | 0 ...id:000226,src:000000,op:flip2,pos:272,+cov | 0 ...id:000226,src:000000,op:flip2,pos:315,+cov | 0 ...id:000227,src:000000,op:flip2,pos:277,+cov | 0 ...id:000227,src:000000,op:flip2,pos:316,+cov | 0 ...id:000228,src:000000,op:flip2,pos:316,+cov | 0 ...id:000228,src:000000,op:flip2,pos:317,+cov | 0 ...id:000229,src:000000,op:flip2,pos:316,+cov | 0 ...id:000229,src:000000,op:flip2,pos:319,+cov | 0 ...id:000230,src:000000,op:flip2,pos:316,+cov | 0 ...id:000230,src:000000,op:flip2,pos:320,+cov | 0 ...id:000231,src:000000,op:flip2,pos:317,+cov | 0 ...id:000231,src:000000,op:flip2,pos:326,+cov | 0 ...id:000232,src:000000,op:flip2,pos:320,+cov | 0 ...id:000232,src:000000,op:flip2,pos:327,+cov | 0 ...id:000233,src:000000,op:flip2,pos:321,+cov | 0 ...id:000233,src:000000,op:flip2,pos:331,+cov | 0 ...id:000234,src:000000,op:flip2,pos:327,+cov | 0 .../id:000234,src:000000,op:flip4,pos:5,+cov | 0 ...id:000235,src:000000,op:flip2,pos:328,+cov | 0 .../id:000235,src:000000,op:flip4,pos:20,+cov | 0 ...id:000236,src:000000,op:flip2,pos:330,+cov | 0 .../id:000236,src:000000,op:flip4,pos:27,+cov | 0 ...id:000237,src:000000,op:flip2,pos:331,+cov | 0 .../id:000237,src:000000,op:flip4,pos:30 | 0 .../id:000238,src:000000,op:flip4,pos:32 | 0 .../id:000238,src:000000,op:flip4,pos:5,+cov | 0 .../id:000239,src:000000,op:flip4,pos:25,+cov | 0 .../id:000239,src:000000,op:flip4,pos:34,+cov | 0 .../id:000240,src:000000,op:flip4,pos:29,+cov | 0 .../id:000240,src:000000,op:flip4,pos:35 | 0 .../id:000241,src:000000,op:flip4,pos:30 | 0 .../id:000241,src:000000,op:flip4,pos:36 | 0 .../id:000242,src:000000,op:flip4,pos:32 | 0 .../id:000242,src:000000,op:flip4,pos:39,+cov | 0 .../id:000243,src:000000,op:flip4,pos:37,+cov | 0 .../id:000243,src:000000,op:flip4,pos:44,+cov | 0 .../id:000244,src:000000,op:flip4,pos:39,+cov | 0 .../id:000244,src:000000,op:flip4,pos:48,+cov | 0 .../id:000245,src:000000,op:flip4,pos:45,+cov | 0 .../id:000245,src:000000,op:flip4,pos:56,+cov | 0 .../id:000246,src:000000,op:flip4,pos:47,+cov | 0 .../id:000246,src:000000,op:flip4,pos:59,+cov | 0 .../id:000247,src:000000,op:flip4,pos:50,+cov | 0 .../id:000247,src:000000,op:flip4,pos:65,+cov | 0 .../id:000248,src:000000,op:flip4,pos:60,+cov | 0 .../id:000248,src:000000,op:flip4,pos:68,+cov | 0 .../id:000249,src:000000,op:flip4,pos:68,+cov | 0 .../id:000250,src:000000,op:flip4,pos:68,+cov | 0 .../id:000250,src:000000,op:flip4,pos:73,+cov | 0 .../id:000251,src:000000,op:flip4,pos:74,+cov | 0 .../id:000251,src:000000,op:flip4,pos:81,+cov | 0 .../id:000252,src:000000,op:flip4,pos:75,+cov | 0 .../id:000252,src:000000,op:flip4,pos:82,+cov | 0 .../id:000253,src:000000,op:flip4,pos:75,+cov | 0 .../id:000253,src:000000,op:flip4,pos:85,+cov | 0 .../id:000254,src:000000,op:flip4,pos:76,+cov | 0 .../id:000254,src:000000,op:flip4,pos:88,+cov | 0 .../id:000255,src:000000,op:flip4,pos:81,+cov | 0 .../id:000255,src:000000,op:flip4,pos:91,+cov | 0 .../id:000256,src:000000,op:flip4,pos:83,+cov | 0 .../id:000256,src:000000,op:flip4,pos:94,+cov | 0 .../id:000257,src:000000,op:flip4,pos:86,+cov | 0 .../id:000257,src:000000,op:flip4,pos:95,+cov | 0 .../id:000258,src:000000,op:flip4,pos:88,+cov | 0 .../id:000258,src:000000,op:flip4,pos:95,+cov | 0 .../id:000259,src:000000,op:flip4,pos:114 | 0 .../id:000259,src:000000,op:flip4,pos:91,+cov | 0 ...id:000260,src:000000,op:flip4,pos:112,+cov | 0 ...id:000260,src:000000,op:flip4,pos:137,+cov | 0 ...id:000261,src:000000,op:flip4,pos:139,+cov | 0 ...id:000261,src:000000,op:flip4,pos:147,+cov | 0 ...id:000262,src:000000,op:flip4,pos:142,+cov | 0 ...id:000262,src:000000,op:flip4,pos:164,+cov | 0 ...id:000263,src:000000,op:flip4,pos:147,+cov | 0 ...id:000263,src:000000,op:flip4,pos:169,+cov | 0 ...id:000264,src:000000,op:flip4,pos:157,+cov | 0 ...id:000264,src:000000,op:flip4,pos:172,+cov | 0 ...id:000265,src:000000,op:flip4,pos:157,+cov | 0 ...id:000265,src:000000,op:flip4,pos:175,+cov | 0 ...id:000266,src:000000,op:flip4,pos:176,+cov | 0 ...id:000266,src:000000,op:flip4,pos:177,+cov | 0 ...id:000267,src:000000,op:flip4,pos:179,+cov | 0 ...id:000267,src:000000,op:flip4,pos:225,+cov | 0 ...id:000268,src:000000,op:flip4,pos:183,+cov | 0 ...id:000268,src:000000,op:flip4,pos:258,+cov | 0 ...id:000269,src:000000,op:flip4,pos:262,+cov | 0 ...id:000269,src:000000,op:flip4,pos:270,+cov | 0 ...id:000270,src:000000,op:flip4,pos:276,+cov | 0 ...id:000270,src:000000,op:flip4,pos:280,+cov | 0 ...id:000271,src:000000,op:flip4,pos:284,+cov | 0 ...id:000271,src:000000,op:flip4,pos:307,+cov | 0 ...id:000272,src:000000,op:flip4,pos:314,+cov | 0 ...id:000272,src:000000,op:flip4,pos:317,+cov | 0 ...id:000273,src:000000,op:flip4,pos:318,+cov | 0 ...id:000273,src:000000,op:flip4,pos:328,+cov | 0 ...id:000274,src:000000,op:flip4,pos:330,+cov | 0 ...id:000275,src:000000,op:flip4,pos:331,+cov | 0 .../id:000275,src:000000,op:flip8,pos:32,+cov | 0 .../id:000276,src:000000,op:flip8,pos:43,+cov | 0 .../id:000276,src:000000,op:flip8,pos:47,+cov | 0 ...id:000277,src:000000,op:flip8,pos:190,+cov | 0 .../id:000277,src:000000,op:flip8,pos:52,+cov | 0 ...id:000278,src:000000,op:flip16,pos:51,+cov | 0 .../id:000278,src:000000,op:flip8,pos:62,+cov | 0 ...d:000279,src:000000,op:flip16,pos:219,+cov | 0 .../id:000279,src:000000,op:flip8,pos:87,+cov | 0 ...id:000280,src:000000,op:flip32,pos:55,+cov | 0 .../id:000280,src:000000,op:flip8,pos:88,+cov | 0 ...id:000281,src:000000,op:flip32,pos:68,+cov | 0 ...id:000281,src:000000,op:flip8,pos:331,+cov | 0 ...:000282,src:000000,op:arith8,pos:4,val:-19 | 0 ...id:000282,src:000000,op:flip16,pos:39,+cov | 0 ...:000283,src:000000,op:arith8,pos:4,val:-22 | 0 ...id:000283,src:000000,op:flip16,pos:85,+cov | 0 ...84,src:000000,op:arith8,pos:5,val:-10,+cov | 0 ...id:000284,src:000000,op:flip32,pos:49,+cov | 0 ...:000285,src:000000,op:arith8,pos:5,val:-34 | 0 .../id:000285,src:000000,op:flip32,pos:62 | 0 ...86,src:000000,op:arith8,pos:6,val:-34,+cov | 0 ...id:000286,src:000000,op:flip32,pos:86,+cov | 0 ...000287,src:000000,op:arith8,pos:11,val:-34 | 0 ...id:000287,src:000000,op:flip32,pos:92,+cov | 0 ...8,src:000000,op:arith8,pos:15,val:-10,+cov | 0 ...:000288,src:000000,op:arith8,pos:4,val:-19 | 0 ...89,src:000000,op:arith8,pos:22,val:+5,+cov | 0 ...:000289,src:000000,op:arith8,pos:4,val:-22 | 0 ...0,src:000000,op:arith8,pos:24,val:+10,+cov | 0 ...90,src:000000,op:arith8,pos:5,val:-10,+cov | 0 ...91,src:000000,op:arith8,pos:25,val:-6,+cov | 0 ...:000291,src:000000,op:arith8,pos:5,val:-34 | 0 ...2,src:000000,op:arith8,pos:25,val:-25,+cov | 0 ...92,src:000000,op:arith8,pos:6,val:-34,+cov | 0 ...3,src:000000,op:arith8,pos:25,val:-29,+cov | 0 ...93,src:000000,op:arith8,pos:7,val:-34,+cov | 0 ...000294,src:000000,op:arith8,pos:11,val:-34 | 0 ...4,src:000000,op:arith8,pos:26,val:+12,+cov | 0 ...5,src:000000,op:arith8,pos:15,val:-10,+cov | 0 ...5,src:000000,op:arith8,pos:26,val:+17,+cov | 0 ...6,src:000000,op:arith8,pos:25,val:+24,+cov | 0 ...6,src:000000,op:arith8,pos:27,val:-29,+cov | 0 ...7,src:000000,op:arith8,pos:27,val:+26,+cov | 0 ...7,src:000000,op:arith8,pos:27,val:+33,+cov | 0 ...8,src:000000,op:arith8,pos:28,val:+13,+cov | 0 ...98,src:000000,op:arith8,pos:28,val:+9,+cov | 0 ...9,src:000000,op:arith8,pos:28,val:-15,+cov | 0 ...000299,src:000000,op:arith8,pos:28,val:-17 | 0 ...0,src:000000,op:arith8,pos:28,val:+27,+cov | 0 ...0,src:000000,op:arith8,pos:28,val:-33,+cov | 0 ...1,src:000000,op:arith8,pos:28,val:-31,+cov | 0 ...1,src:000000,op:arith8,pos:29,val:+14,+cov | 0 ...2,src:000000,op:arith8,pos:29,val:-29,+cov | 0 ...02,src:000000,op:arith8,pos:30,val:+3,+cov | 0 ...3,src:000000,op:arith8,pos:30,val:+18,+cov | 0 ...3,src:000000,op:arith8,pos:30,val:+31,+cov | 0 ...4,src:000000,op:arith8,pos:31,val:+19,+cov | 0 ...4,src:000000,op:arith8,pos:31,val:-33,+cov | 0 ...5,src:000000,op:arith8,pos:31,val:-29,+cov | 0 ...5,src:000000,op:arith8,pos:32,val:+19,+cov | 0 ...6,src:000000,op:arith8,pos:31,val:-33,+cov | 0 ...6,src:000000,op:arith8,pos:33,val:+15,+cov | 0 ...7,src:000000,op:arith8,pos:31,val:+34,+cov | 0 ...7,src:000000,op:arith8,pos:33,val:-15,+cov | 0 ...8,src:000000,op:arith8,pos:32,val:+10,+cov | 0 ...8,src:000000,op:arith8,pos:34,val:-27,+cov | 0 ...9,src:000000,op:arith8,pos:32,val:-20,+cov | 0 ...9,src:000000,op:arith8,pos:34,val:+34,+cov | 0 ...0,src:000000,op:arith8,pos:33,val:+20,+cov | 0 ...0,src:000000,op:arith8,pos:35,val:+18,+cov | 0 ...1,src:000000,op:arith8,pos:33,val:+24,+cov | 0 ...1,src:000000,op:arith8,pos:35,val:-27,+cov | 0 ...12,src:000000,op:arith8,pos:34,val:-3,+cov | 0 ...2,src:000000,op:arith8,pos:35,val:+35,+cov | 0 ...3,src:000000,op:arith8,pos:34,val:+18,+cov | 0 ...3,src:000000,op:arith8,pos:36,val:+13,+cov | 0 ...4,src:000000,op:arith8,pos:34,val:-30,+cov | 0 ...4,src:000000,op:arith8,pos:36,val:+32,+cov | 0 ...5,src:000000,op:arith8,pos:35,val:+17,+cov | 0 ...5,src:000000,op:arith8,pos:37,val:+24,+cov | 0 ...6,src:000000,op:arith8,pos:35,val:-19,+cov | 0 ...6,src:000000,op:arith8,pos:37,val:+32,+cov | 0 ...7,src:000000,op:arith8,pos:36,val:-26,+cov | 0 ...7,src:000000,op:arith8,pos:38,val:-35,+cov | 0 ...8,src:000000,op:arith8,pos:36,val:+27,+cov | 0 ...8,src:000000,op:arith8,pos:39,val:+18,+cov | 0 ...9,src:000000,op:arith8,pos:36,val:+32,+cov | 0 ...9,src:000000,op:arith8,pos:39,val:-23,+cov | 0 ...20,src:000000,op:arith8,pos:37,val:-9,+cov | 0 ...0,src:000000,op:arith8,pos:39,val:-24,+cov | 0 ...000321,src:000000,op:arith8,pos:37,val:+21 | 0 ...1,src:000000,op:arith8,pos:39,val:+25,+cov | 0 ...2,src:000000,op:arith8,pos:37,val:+24,+cov | 0 ...2,src:000000,op:arith8,pos:40,val:-21,+cov | 0 ...3,src:000000,op:arith8,pos:39,val:+13,+cov | 0 ...23,src:000000,op:arith8,pos:41,val:-5,+cov | 0 ...4,src:000000,op:arith8,pos:39,val:-23,+cov | 0 ...4,src:000000,op:arith8,pos:41,val:+13,+cov | 0 ...5,src:000000,op:arith8,pos:40,val:+20,+cov | 0 ...5,src:000000,op:arith8,pos:41,val:+26,+cov | 0 ...6,src:000000,op:arith8,pos:40,val:+27,+cov | 0 ...6,src:000000,op:arith8,pos:41,val:+27,+cov | 0 ...7,src:000000,op:arith8,pos:41,val:-33,+cov | 0 ...7,src:000000,op:arith8,pos:42,val:+29,+cov | 0 ...8,src:000000,op:arith8,pos:41,val:+35,+cov | 0 ...8,src:000000,op:arith8,pos:43,val:-33,+cov | 0 ...29,src:000000,op:arith8,pos:42,val:-6,+cov | 0 ...9,src:000000,op:arith8,pos:44,val:+17,+cov | 0 ...0,src:000000,op:arith8,pos:42,val:+13,+cov | 0 ...30,src:000000,op:arith8,pos:45,val:-5,+cov | 0 ...1,src:000000,op:arith8,pos:42,val:+18,+cov | 0 ...1,src:000000,op:arith8,pos:45,val:-11,+cov | 0 ...2,src:000000,op:arith8,pos:43,val:-23,+cov | 0 ...2,src:000000,op:arith8,pos:45,val:+19,+cov | 0 ...3,src:000000,op:arith8,pos:43,val:+33,+cov | 0 ...3,src:000000,op:arith8,pos:51,val:-12,+cov | 0 ...4,src:000000,op:arith8,pos:44,val:+11,+cov | 0 ...4,src:000000,op:arith8,pos:51,val:+14,+cov | 0 ...5,src:000000,op:arith8,pos:45,val:-24,+cov | 0 ...5,src:000000,op:arith8,pos:51,val:-22,+cov | 0 ...6,src:000000,op:arith8,pos:45,val:-27,+cov | 0 ...6,src:000000,op:arith8,pos:51,val:-23,+cov | 0 ...37,src:000000,op:arith8,pos:46,val:+7,+cov | 0 ...7,src:000000,op:arith8,pos:52,val:-14,+cov | 0 ...8,src:000000,op:arith8,pos:46,val:-21,+cov | 0 ...8,src:000000,op:arith8,pos:52,val:+28,+cov | 0 ...9,src:000000,op:arith8,pos:46,val:+31,+cov | 0 ...39,src:000000,op:arith8,pos:53,val:+9,+cov | 0 ...0,src:000000,op:arith8,pos:49,val:+16,+cov | 0 ...0,src:000000,op:arith8,pos:53,val:-11,+cov | 0 ...1,src:000000,op:arith8,pos:49,val:-26,+cov | 0 ...1,src:000000,op:arith8,pos:53,val:-17,+cov | 0 ...2,src:000000,op:arith8,pos:49,val:+34,+cov | 0 ...2,src:000000,op:arith8,pos:53,val:-18,+cov | 0 ...43,src:000000,op:arith8,pos:50,val:-7,+cov | 0 ...3,src:000000,op:arith8,pos:53,val:-35,+cov | 0 ...4,src:000000,op:arith8,pos:50,val:+22,+cov | 0 ...4,src:000000,op:arith8,pos:54,val:-15,+cov | 0 ...5,src:000000,op:arith8,pos:50,val:+24,+cov | 0 ...5,src:000000,op:arith8,pos:54,val:-22,+cov | 0 ...6,src:000000,op:arith8,pos:50,val:-31,+cov | 0 ...:000346,src:000000,op:arith8,pos:55,val:-7 | 0 ...47,src:000000,op:arith8,pos:51,val:-1,+cov | 0 ...7,src:000000,op:arith8,pos:55,val:-33,+cov | 0 ...8,src:000000,op:arith8,pos:51,val:+18,+cov | 0 ...8,src:000000,op:arith8,pos:55,val:-35,+cov | 0 ...49,src:000000,op:arith8,pos:52,val:-6,+cov | 0 ...9,src:000000,op:arith8,pos:57,val:-14,+cov | 0 ...0,src:000000,op:arith8,pos:52,val:+22,+cov | 0 ...0,src:000000,op:arith8,pos:57,val:+28,+cov | 0 ...1,src:000000,op:arith8,pos:52,val:-31,+cov | 0 ...1,src:000000,op:arith8,pos:57,val:-29,+cov | 0 ...2,src:000000,op:arith8,pos:53,val:-18,+cov | 0 ...2,src:000000,op:arith8,pos:58,val:-29,+cov | 0 ...3,src:000000,op:arith8,pos:53,val:+27,+cov | 0 ...3,src:000000,op:arith8,pos:59,val:+10,+cov | 0 ...4,src:000000,op:arith8,pos:53,val:-27,+cov | 0 ...4,src:000000,op:arith8,pos:59,val:+23,+cov | 0 ...5,src:000000,op:arith8,pos:53,val:-28,+cov | 0 ...55,src:000000,op:arith8,pos:62,val:+9,+cov | 0 ...56,src:000000,op:arith8,pos:55,val:-2,+cov | 0 ...6,src:000000,op:arith8,pos:62,val:-21,+cov | 0 ...:000357,src:000000,op:arith8,pos:55,val:-7 | 0 ...7,src:000000,op:arith8,pos:62,val:-23,+cov | 0 ...8,src:000000,op:arith8,pos:55,val:-33,+cov | 0 ...8,src:000000,op:arith8,pos:62,val:-35,+cov | 0 ...9,src:000000,op:arith8,pos:56,val:-17,+cov | 0 ...59,src:000000,op:arith8,pos:63,val:+3,+cov | 0 ...0,src:000000,op:arith8,pos:56,val:+34,+cov | 0 ...60,src:000000,op:arith8,pos:64,val:-5,+cov | 0 ...1,src:000000,op:arith8,pos:57,val:-23,+cov | 0 ...1,src:000000,op:arith8,pos:64,val:-26,+cov | 0 ...2,src:000000,op:arith8,pos:58,val:+34,+cov | 0 ...2,src:000000,op:arith8,pos:65,val:-10,+cov | 0 ...3,src:000000,op:arith8,pos:60,val:-14,+cov | 0 ...3,src:000000,op:arith8,pos:65,val:-27,+cov | 0 ...4,src:000000,op:arith8,pos:60,val:-15,+cov | 0 ...4,src:000000,op:arith8,pos:65,val:-30,+cov | 0 ...5,src:000000,op:arith8,pos:60,val:-27,+cov | 0 ...5,src:000000,op:arith8,pos:66,val:+13,+cov | 0 ...6,src:000000,op:arith8,pos:62,val:+13,+cov | 0 ...:000366,src:000000,op:arith8,pos:67,val:-9 | 0 ...7,src:000000,op:arith8,pos:62,val:-21,+cov | 0 ...7,src:000000,op:arith8,pos:67,val:+15,+cov | 0 ...8,src:000000,op:arith8,pos:62,val:-23,+cov | 0 ...000368,src:000000,op:arith8,pos:67,val:-35 | 0 ...69,src:000000,op:arith8,pos:63,val:+6,+cov | 0 ...9,src:000000,op:arith8,pos:72,val:+30,+cov | 0 ...0,src:000000,op:arith8,pos:63,val:-18,+cov | 0 ...0,src:000000,op:arith8,pos:72,val:-35,+cov | 0 ...1,src:000000,op:arith8,pos:63,val:-28,+cov | 0 ...71,src:000000,op:arith8,pos:74,val:+5,+cov | 0 ...72,src:000000,op:arith8,pos:64,val:-5,+cov | 0 ...2,src:000000,op:arith8,pos:75,val:-23,+cov | 0 ...3,src:000000,op:arith8,pos:64,val:-13,+cov | 0 ...3,src:000000,op:arith8,pos:75,val:+28,+cov | 0 ...4,src:000000,op:arith8,pos:64,val:-18,+cov | 0 ...74,src:000000,op:arith8,pos:76,val:-5,+cov | 0 ...5,src:000000,op:arith8,pos:64,val:-35,+cov | 0 ...5,src:000000,op:arith8,pos:76,val:-20,+cov | 0 ...6,src:000000,op:arith8,pos:65,val:-27,+cov | 0 ...76,src:000000,op:arith8,pos:77,val:-5,+cov | 0 ...7,src:000000,op:arith8,pos:65,val:+29,+cov | 0 ...7,src:000000,op:arith8,pos:77,val:+25,+cov | 0 ...8,src:000000,op:arith8,pos:66,val:-20,+cov | 0 ...8,src:000000,op:arith8,pos:80,val:+20,+cov | 0 ...9,src:000000,op:arith8,pos:66,val:+28,+cov | 0 ...9,src:000000,op:arith8,pos:81,val:+20,+cov | 0 ...0,src:000000,op:arith8,pos:66,val:-31,+cov | 0 ...80,src:000000,op:arith8,pos:82,val:-5,+cov | 0 ...:000381,src:000000,op:arith8,pos:67,val:-9 | 0 ...1,src:000000,op:arith8,pos:83,val:-18,+cov | 0 ...2,src:000000,op:arith8,pos:67,val:+10,+cov | 0 ...2,src:000000,op:arith8,pos:84,val:+10,+cov | 0 ...3,src:000000,op:arith8,pos:67,val:-15,+cov | 0 ...3,src:000000,op:arith8,pos:84,val:-30,+cov | 0 ...000384,src:000000,op:arith8,pos:67,val:-35 | 0 ...4,src:000000,op:arith8,pos:84,val:+34,+cov | 0 ...5,src:000000,op:arith8,pos:68,val:+32,+cov | 0 ...85,src:000000,op:arith8,pos:86,val:-9,+cov | 0 ...6,src:000000,op:arith8,pos:69,val:+14,+cov | 0 ...6,src:000000,op:arith8,pos:86,val:-19,+cov | 0 ...7,src:000000,op:arith8,pos:70,val:-21,+cov | 0 ...7,src:000000,op:arith8,pos:87,val:+10,+cov | 0 ...:000388,src:000000,op:arith8,pos:71,val:+3 | 0 ...8,src:000000,op:arith8,pos:87,val:+15,+cov | 0 ...89,src:000000,op:arith8,pos:72,val:-7,+cov | 0 ...9,src:000000,op:arith8,pos:87,val:-26,+cov | 0 ...0,src:000000,op:arith8,pos:72,val:+30,+cov | 0 ...90,src:000000,op:arith8,pos:88,val:+9,+cov | 0 ...1,src:000000,op:arith8,pos:73,val:-13,+cov | 0 ...000391,src:000000,op:arith8,pos:88,val:+25 | 0 ...2,src:000000,op:arith8,pos:73,val:-29,+cov | 0 ...2,src:000000,op:arith8,pos:88,val:+26,+cov | 0 ...3,src:000000,op:arith8,pos:73,val:-35,+cov | 0 ...3,src:000000,op:arith8,pos:90,val:-33,+cov | 0 ...4,src:000000,op:arith8,pos:75,val:-20,+cov | 0 ...4,src:000000,op:arith8,pos:91,val:-14,+cov | 0 ...5,src:000000,op:arith8,pos:76,val:+21,+cov | 0 ...000395,src:000000,op:arith8,pos:91,val:+24 | 0 ...6,src:000000,op:arith8,pos:77,val:+24,+cov | 0 ...6,src:000000,op:arith8,pos:92,val:+11,+cov | 0 ...7,src:000000,op:arith8,pos:80,val:-11,+cov | 0 ...7,src:000000,op:arith8,pos:92,val:-23,+cov | 0 ...8,src:000000,op:arith8,pos:80,val:+18,+cov | 0 ...8,src:000000,op:arith8,pos:93,val:+19,+cov | 0 ...9,src:000000,op:arith8,pos:81,val:+22,+cov | 0 ...9,src:000000,op:arith8,pos:93,val:-25,+cov | 0 ...0,src:000000,op:arith8,pos:81,val:-30,+cov | 0 ...0,src:000000,op:arith8,pos:93,val:+35,+cov | 0 ...:000401,src:000000,op:arith8,pos:83,val:-1 | 0 ...01,src:000000,op:arith8,pos:96,val:-5,+cov | 0 ...2,src:000000,op:arith8,pos:83,val:-22,+cov | 0 ...2,src:000000,op:arith8,pos:96,val:+32,+cov | 0 ...3,src:000000,op:arith8,pos:83,val:+35,+cov | 0 ...3,src:000000,op:arith8,pos:96,val:-34,+cov | 0 ...04,src:000000,op:arith8,pos:84,val:+7,+cov | 0 ...4,src:000000,op:arith8,pos:98,val:-34,+cov | 0 ...5,src:000000,op:arith8,pos:84,val:+31,+cov | 0 ...000405,src:000000,op:arith8,pos:98,val:-35 | 0 ...00406,src:000000,op:arith8,pos:113,val:-19 | 0 ...6,src:000000,op:arith8,pos:86,val:-11,+cov | 0 ...00407,src:000000,op:arith8,pos:113,val:-22 | 0 ...7,src:000000,op:arith8,pos:86,val:+22,+cov | 0 ...,src:000000,op:arith8,pos:121,val:-13,+cov | 0 ...000408,src:000000,op:arith8,pos:86,val:-24 | 0 ...,src:000000,op:arith8,pos:135,val:+23,+cov | 0 ...09,src:000000,op:arith8,pos:87,val:-2,+cov | 0 ...0,src:000000,op:arith8,pos:136,val:-9,+cov | 0 ...10,src:000000,op:arith8,pos:87,val:+9,+cov | 0 ...,src:000000,op:arith8,pos:136,val:-21,+cov | 0 ...1,src:000000,op:arith8,pos:87,val:-15,+cov | 0 ...2,src:000000,op:arith8,pos:137,val:+8,+cov | 0 ...2,src:000000,op:arith8,pos:87,val:-24,+cov | 0 ...00413,src:000000,op:arith8,pos:137,val:-11 | 0 ...3,src:000000,op:arith8,pos:88,val:+30,+cov | 0 ...,src:000000,op:arith8,pos:137,val:-19,+cov | 0 ...4,src:000000,op:arith8,pos:89,val:+29,+cov | 0 ...5,src:000000,op:arith8,pos:138,val:+3,+cov | 0 ...5,src:000000,op:arith8,pos:90,val:-21,+cov | 0 ...,src:000000,op:arith8,pos:138,val:-12,+cov | 0 ...6,src:000000,op:arith8,pos:91,val:+28,+cov | 0 ...,src:000000,op:arith8,pos:139,val:-10,+cov | 0 ...7,src:000000,op:arith8,pos:91,val:+34,+cov | 0 ...,src:000000,op:arith8,pos:139,val:-26,+cov | 0 ...8,src:000000,op:arith8,pos:94,val:-23,+cov | 0 ...,src:000000,op:arith8,pos:143,val:+21,+cov | 0 ...19,src:000000,op:arith8,pos:95,val:+3,+cov | 0 ...,src:000000,op:arith8,pos:145,val:+15,+cov | 0 ...0,src:000000,op:arith8,pos:95,val:-23,+cov | 0 ...,src:000000,op:arith8,pos:146,val:-14,+cov | 0 ...1,src:000000,op:arith8,pos:95,val:+31,+cov | 0 ...,src:000000,op:arith8,pos:148,val:+28,+cov | 0 ...000422,src:000000,op:arith8,pos:98,val:-35 | 0 ...,src:000000,op:arith8,pos:100,val:-33,+cov | 0 ...,src:000000,op:arith8,pos:151,val:-35,+cov | 0 ...00424,src:000000,op:arith8,pos:113,val:-19 | 0 ...,src:000000,op:arith8,pos:152,val:-12,+cov | 0 ...00425,src:000000,op:arith8,pos:113,val:-22 | 0 ...,src:000000,op:arith8,pos:152,val:+27,+cov | 0 ...,src:000000,op:arith8,pos:127,val:-20,+cov | 0 ...,src:000000,op:arith8,pos:152,val:+31,+cov | 0 ...,src:000000,op:arith8,pos:131,val:-20,+cov | 0 ...,src:000000,op:arith8,pos:153,val:+20,+cov | 0 ...8,src:000000,op:arith8,pos:132,val:+6,+cov | 0 ...8,src:000000,op:arith8,pos:154,val:+7,+cov | 0 ...,src:000000,op:arith8,pos:135,val:-28,+cov | 0 ...,src:000000,op:arith8,pos:156,val:+18,+cov | 0 ...,src:000000,op:arith8,pos:135,val:-35,+cov | 0 ...,src:000000,op:arith8,pos:156,val:+28,+cov | 0 ...1,src:000000,op:arith8,pos:136,val:+3,+cov | 0 ...,src:000000,op:arith8,pos:159,val:-30,+cov | 0 ...2,src:000000,op:arith8,pos:136,val:-5,+cov | 0 ...,src:000000,op:arith8,pos:160,val:-31,+cov | 0 ...3,src:000000,op:arith8,pos:136,val:-9,+cov | 0 ...3,src:000000,op:arith8,pos:161,val:+5,+cov | 0 ...,src:000000,op:arith8,pos:136,val:+20,+cov | 0 ...,src:000000,op:arith8,pos:161,val:-11,+cov | 0 ...,src:000000,op:arith8,pos:136,val:-29,+cov | 0 ...00435,src:000000,op:arith8,pos:162,val:+22 | 0 ...6,src:000000,op:arith8,pos:137,val:+7,+cov | 0 ...,src:000000,op:arith8,pos:163,val:+19,+cov | 0 ...,src:000000,op:arith8,pos:137,val:+10,+cov | 0 ...,src:000000,op:arith8,pos:164,val:+27,+cov | 0 ...,src:000000,op:arith8,pos:138,val:+19,+cov | 0 ...,src:000000,op:arith8,pos:166,val:+13,+cov | 0 ...,src:000000,op:arith8,pos:139,val:+25,+cov | 0 ...,src:000000,op:arith8,pos:167,val:+33,+cov | 0 ...,src:000000,op:arith8,pos:139,val:-26,+cov | 0 ...,src:000000,op:arith8,pos:168,val:-17,+cov | 0 ...,src:000000,op:arith8,pos:140,val:+20,+cov | 0 ...,src:000000,op:arith8,pos:168,val:+29,+cov | 0 ...2,src:000000,op:arith8,pos:141,val:+6,+cov | 0 ...,src:000000,op:arith8,pos:168,val:+30,+cov | 0 ...,src:000000,op:arith8,pos:141,val:+10,+cov | 0 ...,src:000000,op:arith8,pos:171,val:+22,+cov | 0 ...,src:000000,op:arith8,pos:141,val:+13,+cov | 0 ...,src:000000,op:arith8,pos:171,val:+25,+cov | 0 ...,src:000000,op:arith8,pos:141,val:+20,+cov | 0 ...,src:000000,op:arith8,pos:172,val:-13,+cov | 0 ...6,src:000000,op:arith8,pos:142,val:+6,+cov | 0 ...,src:000000,op:arith8,pos:172,val:+19,+cov | 0 ...,src:000000,op:arith8,pos:142,val:-20,+cov | 0 ...,src:000000,op:arith8,pos:173,val:-15,+cov | 0 ...,src:000000,op:arith8,pos:143,val:+17,+cov | 0 ...,src:000000,op:arith8,pos:174,val:+23,+cov | 0 ...,src:000000,op:arith8,pos:144,val:+28,+cov | 0 ...,src:000000,op:arith8,pos:174,val:+33,+cov | 0 ...,src:000000,op:arith8,pos:145,val:+27,+cov | 0 ...,src:000000,op:arith8,pos:176,val:+20,+cov | 0 ...,src:000000,op:arith8,pos:146,val:-11,+cov | 0 ...,src:000000,op:arith8,pos:177,val:+33,+cov | 0 ...,src:000000,op:arith8,pos:146,val:-13,+cov | 0 ...,src:000000,op:arith8,pos:181,val:+12,+cov | 0 ...,src:000000,op:arith8,pos:146,val:-21,+cov | 0 ...00453,src:000000,op:arith8,pos:181,val:+21 | 0 ...4,src:000000,op:arith8,pos:147,val:-3,+cov | 0 ...,src:000000,op:arith8,pos:181,val:+25,+cov | 0 ...5,src:000000,op:arith8,pos:147,val:-9,+cov | 0 ...000455,src:000000,op:arith8,pos:183,val:-3 | 0 ...,src:000000,op:arith8,pos:147,val:-13,+cov | 0 ...00456,src:000000,op:arith8,pos:184,val:-13 | 0 ...,src:000000,op:arith8,pos:148,val:+12,+cov | 0 ...,src:000000,op:arith8,pos:184,val:-34,+cov | 0 ...8,src:000000,op:arith8,pos:151,val:-7,+cov | 0 ...8,src:000000,op:arith8,pos:185,val:-6,+cov | 0 ...,src:000000,op:arith8,pos:151,val:+15,+cov | 0 ...,src:000000,op:arith8,pos:185,val:+14,+cov | 0 ...0,src:000000,op:arith8,pos:152,val:-7,+cov | 0 ...,src:000000,op:arith8,pos:185,val:+29,+cov | 0 ...,src:000000,op:arith8,pos:152,val:+25,+cov | 0 ...,src:000000,op:arith8,pos:186,val:+23,+cov | 0 ...00462,src:000000,op:arith8,pos:152,val:-30 | 0 ...,src:000000,op:arith8,pos:191,val:-26,+cov | 0 ...,src:000000,op:arith8,pos:153,val:+28,+cov | 0 ...,src:000000,op:arith8,pos:196,val:-18,+cov | 0 ...4,src:000000,op:arith8,pos:157,val:+8,+cov | 0 ...,src:000000,op:arith8,pos:203,val:+22,+cov | 0 ...5,src:000000,op:arith8,pos:157,val:-9,+cov | 0 ...5,src:000000,op:arith8,pos:225,val:-6,+cov | 0 ...,src:000000,op:arith8,pos:157,val:-12,+cov | 0 ...,src:000000,op:arith8,pos:241,val:-26,+cov | 0 ...,src:000000,op:arith8,pos:157,val:-21,+cov | 0 ...7,src:000000,op:arith8,pos:268,val:-4,+cov | 0 ...8,src:000000,op:arith8,pos:158,val:-9,+cov | 0 ...8,src:000000,op:arith8,pos:268,val:+7,+cov | 0 ...,src:000000,op:arith8,pos:158,val:+25,+cov | 0 ...,src:000000,op:arith8,pos:269,val:+11,+cov | 0 ...0,src:000000,op:arith8,pos:159,val:-7,+cov | 0 ...,src:000000,op:arith8,pos:272,val:+29,+cov | 0 ...,src:000000,op:arith8,pos:159,val:+10,+cov | 0 ...,src:000000,op:arith8,pos:273,val:+29,+cov | 0 ...,src:000000,op:arith8,pos:159,val:-11,+cov | 0 ...,src:000000,op:arith8,pos:274,val:+11,+cov | 0 ...,src:000000,op:arith8,pos:160,val:+19,+cov | 0 ...3,src:000000,op:arith8,pos:276,val:+9,+cov | 0 ...,src:000000,op:arith8,pos:161,val:+14,+cov | 0 ...,src:000000,op:arith8,pos:276,val:+19,+cov | 0 ...5,src:000000,op:arith8,pos:162,val:+7,+cov | 0 ...,src:000000,op:arith8,pos:277,val:+35,+cov | 0 ...,src:000000,op:arith8,pos:163,val:+26,+cov | 0 ...6,src:000000,op:arith8,pos:278,val:+5,+cov | 0 ...,src:000000,op:arith8,pos:163,val:+31,+cov | 0 ...,src:000000,op:arith8,pos:305,val:+14,+cov | 0 ...8,src:000000,op:arith8,pos:164,val:+2,+cov | 0 ...,src:000000,op:arith8,pos:306,val:-20,+cov | 0 ...9,src:000000,op:arith8,pos:169,val:+7,+cov | 0 ...,src:000000,op:arith8,pos:314,val:-17,+cov | 0 ...0,src:000000,op:arith8,pos:169,val:-9,+cov | 0 ...,src:000000,op:arith8,pos:315,val:-17,+cov | 0 ...,src:000000,op:arith8,pos:169,val:+19,+cov | 0 ...,src:000000,op:arith8,pos:315,val:-19,+cov | 0 ...2,src:000000,op:arith8,pos:172,val:-3,+cov | 0 ...,src:000000,op:arith8,pos:315,val:-29,+cov | 0 ...,src:000000,op:arith8,pos:172,val:-33,+cov | 0 ...,src:000000,op:arith8,pos:316,val:+14,+cov | 0 ...,src:000000,op:arith8,pos:175,val:+20,+cov | 0 ...,src:000000,op:arith8,pos:316,val:+17,+cov | 0 ...5,src:000000,op:arith8,pos:176,val:+7,+cov | 0 ...,src:000000,op:arith8,pos:316,val:-23,+cov | 0 ...,src:000000,op:arith8,pos:176,val:-28,+cov | 0 ...,src:000000,op:arith8,pos:317,val:-30,+cov | 0 ...,src:000000,op:arith8,pos:177,val:+11,+cov | 0 ...7,src:000000,op:arith8,pos:319,val:-7,+cov | 0 ...,src:000000,op:arith8,pos:177,val:+17,+cov | 0 ...8,src:000000,op:arith8,pos:319,val:+9,+cov | 0 ...,src:000000,op:arith8,pos:177,val:+22,+cov | 0 ...9,src:000000,op:arith8,pos:320,val:-7,+cov | 0 ...0,src:000000,op:arith8,pos:178,val:-5,+cov | 0 ...,src:000000,op:arith8,pos:320,val:-25,+cov | 0 ...,src:000000,op:arith8,pos:178,val:+23,+cov | 0 ...,src:000000,op:arith8,pos:321,val:+11,+cov | 0 ...,src:000000,op:arith8,pos:181,val:-12,+cov | 0 ...,src:000000,op:arith8,pos:321,val:-24,+cov | 0 ...,src:000000,op:arith8,pos:182,val:-15,+cov | 0 ...,src:000000,op:arith8,pos:322,val:-21,+cov | 0 ...,src:000000,op:arith8,pos:182,val:+22,+cov | 0 ...,src:000000,op:arith8,pos:326,val:-20,+cov | 0 ...00495,src:000000,op:arith8,pos:183,val:-11 | 0 ...,src:000000,op:arith8,pos:328,val:+27,+cov | 0 ...,src:000000,op:arith8,pos:183,val:+15,+cov | 0 ...,src:000000,op:arith8,pos:328,val:-27,+cov | 0 ...,src:000000,op:arith8,pos:184,val:-14,+cov | 0 ...7,src:000000,op:arith8,pos:329,val:+5,+cov | 0 ...,src:000000,op:arith8,pos:184,val:+33,+cov | 0 ...,src:000000,op:arith8,pos:329,val:-24,+cov | 0 ...,src:000000,op:arith8,pos:184,val:-35,+cov | 0 ...9,src:000000,op:arith8,pos:330,val:-3,+cov | 0 ...0,src:000000,op:arith8,pos:185,val:+3,+cov | 0 ...,src:000000,op:arith8,pos:331,val:-14,+cov | 0 ...1,src:000000,op:arith8,pos:185,val:+7,+cov | 0 ...,src:000000,op:arith8,pos:332,val:-15,+cov | 0 ...,src:000000,op:arith16,pos:33,val:-12,+cov | 0 ...2,src:000000,op:arith8,pos:192,val:+9,+cov | 0 ...c:000000,op:arith16,pos:65,val:be:-27,+cov | 0 ...,src:000000,op:arith8,pos:237,val:-26,+cov | 0 ...4,src:000000,op:arith8,pos:238,val:+5,+cov | 0 .../id:000504,src:000000,op:int8,pos:6,val:+0 | Bin ...5,src:000000,op:arith8,pos:241,val:+7,+cov | 0 .../id:000505,src:000000,op:int8,pos:7,val:+0 | Bin ...6,src:000000,op:arith8,pos:268,val:-4,+cov | 0 .../id:000506,src:000000,op:int8,pos:9,val:+0 | Bin ...,src:000000,op:arith8,pos:269,val:+19,+cov | 0 ...507,src:000000,op:int8,pos:26,val:+32,+cov | 0 ...,src:000000,op:arith8,pos:271,val:-12,+cov | 0 ...08,src:000000,op:int8,pos:27,val:+127,+cov | 0 ...9,src:000000,op:arith8,pos:272,val:+7,+cov | 0 ...0509,src:000000,op:int8,pos:34,val:+0,+cov | Bin ...,src:000000,op:arith8,pos:274,val:+11,+cov | 0 ...0510,src:000000,op:int8,pos:40,val:+0,+cov | Bin ...,src:000000,op:arith8,pos:274,val:+25,+cov | 0 ...d:000511,src:000000,op:int8,pos:40,val:+32 | 0 ...,src:000000,op:arith8,pos:275,val:-11,+cov | 0 ...0512,src:000000,op:int8,pos:46,val:+1,+cov | 0 ...,src:000000,op:arith8,pos:275,val:-12,+cov | 0 ...id:000513,src:000000,op:int8,pos:51,val:+1 | 0 ...,src:000000,op:arith8,pos:275,val:+27,+cov | 0 ...14,src:000000,op:int8,pos:52,val:-128,+cov | 0 ...,src:000000,op:arith8,pos:277,val:-10,+cov | 0 ...0515,src:000000,op:int8,pos:53,val:-1,+cov | 0 ...,src:000000,op:arith8,pos:277,val:+35,+cov | 0 ...516,src:000000,op:int8,pos:69,val:+32,+cov | 0 ...,src:000000,op:arith8,pos:279,val:+28,+cov | 0 ...517,src:000000,op:int8,pos:70,val:+32,+cov | 0 ...,src:000000,op:arith8,pos:290,val:-28,+cov | 0 ...518,src:000000,op:int8,pos:71,val:+64,+cov | 0 ...9,src:000000,op:arith8,pos:305,val:-3,+cov | 0 ...0519,src:000000,op:int8,pos:74,val:-1,+cov | 0 ...0,src:000000,op:arith8,pos:306,val:+7,+cov | 0 ...520,src:000000,op:int8,pos:115,val:+0,+cov | Bin ...,src:000000,op:arith8,pos:306,val:-12,+cov | 0 ...521,src:000000,op:int8,pos:188,val:+1,+cov | 0 ...,src:000000,op:arith8,pos:306,val:+20,+cov | 0 ...2,src:000000,op:int8,pos:276,val:+100,+cov | 0 ...,src:000000,op:arith8,pos:307,val:+13,+cov | 0 ...23,src:000000,op:int8,pos:307,val:+32,+cov | 0 ...,src:000000,op:arith8,pos:308,val:+19,+cov | 0 ...24,src:000000,op:int8,pos:313,val:+64,+cov | 0 ...,src:000000,op:arith8,pos:308,val:-27,+cov | 0 ...525,src:000000,op:int8,pos:314,val:-1,+cov | 0 ...6,src:000000,op:arith8,pos:312,val:+3,+cov | 0 ...26,src:000000,op:int8,pos:322,val:+32,+cov | 0 ...7,src:000000,op:arith8,pos:312,val:+5,+cov | 0 ...rc:000000,op:int16,pos:25,val:be:+100,+cov | Bin ...,src:000000,op:arith8,pos:312,val:-11,+cov | 0 ...528,src:000000,op:int16,pos:29,val:-1,+cov | 0 ...,src:000000,op:arith8,pos:313,val:-33,+cov | 0 ...src:000000,op:int16,pos:32,val:+32767,+cov | 0 ...0,src:000000,op:arith8,pos:314,val:-3,+cov | 0 ...0,src:000000,op:int16,pos:41,val:-128,+cov | 0 ...,src:000000,op:arith8,pos:314,val:-25,+cov | 0 ...31,src:000000,op:int16,pos:41,val:+32,+cov | Bin ...,src:000000,op:arith8,pos:316,val:+20,+cov | 0 ...32,src:000000,op:int16,pos:42,val:+64,+cov | Bin ...,src:000000,op:arith8,pos:316,val:-23,+cov | 0 ...3,src:000000,op:int16,pos:47,val:+128,+cov | Bin ...,src:000000,op:arith8,pos:316,val:-28,+cov | 0 ...c:000000,op:int16,pos:48,val:be:+1000,+cov | 0 ...,src:000000,op:arith8,pos:317,val:-31,+cov | 0 ...35,src:000000,op:int16,pos:50,val:+16,+cov | Bin ...,src:000000,op:arith8,pos:318,val:+23,+cov | 0 ...c:000000,op:int16,pos:50,val:be:+1024,+cov | Bin ...,src:000000,op:arith8,pos:319,val:-12,+cov | 0 ...7,src:000000,op:int16,pos:52,val:-129,+cov | 0 ...,src:000000,op:arith8,pos:320,val:+17,+cov | 0 ...8,src:000000,op:int16,pos:52,val:+128,+cov | Bin ...,src:000000,op:arith8,pos:320,val:-31,+cov | 0 ...rc:000000,op:int16,pos:52,val:be:+255,+cov | Bin ...,src:000000,op:arith8,pos:321,val:-34,+cov | 0 ...540,src:000000,op:int16,pos:53,val:+0,+cov | Bin ...1,src:000000,op:arith8,pos:322,val:+3,+cov | 0 ...541,src:000000,op:int16,pos:54,val:+1,+cov | Bin ...2,src:000000,op:arith8,pos:322,val:+7,+cov | 0 ...2,src:000000,op:int16,pos:69,val:-129,+cov | 0 ...3,src:000000,op:arith8,pos:326,val:-9,+cov | 0 ...rc:000000,op:int16,pos:74,val:be:-128,+cov | 0 ...,src:000000,op:arith8,pos:326,val:-31,+cov | 0 ...rc:000000,op:int16,pos:78,val:be:+127,+cov | Bin ...,src:000000,op:arith8,pos:326,val:-35,+cov | 0 ...src:000000,op:int16,pos:81,val:+32767,+cov | 0 ...000546,src:000000,op:arith8,pos:327,val:+5 | 0 ...6,src:000000,op:int16,pos:83,val:+127,+cov | Bin ...7,src:000000,op:arith8,pos:327,val:+7,+cov | 0 ...,src:000000,op:int16,pos:86,val:+4096,+cov | Bin ...,src:000000,op:arith8,pos:327,val:+11,+cov | 0 ...48,src:000000,op:int16,pos:87,val:+16,+cov | Bin ...,src:000000,op:arith8,pos:327,val:-24,+cov | 0 ...src:000000,op:int16,pos:87,val:-32768,+cov | Bin ...,src:000000,op:arith8,pos:328,val:+14,+cov | 0 ...0,src:000000,op:int16,pos:90,val:+256,+cov | Bin ...1,src:000000,op:arith8,pos:329,val:+1,+cov | 0 ...51,src:000000,op:int16,pos:91,val:+32,+cov | Bin ...2,src:000000,op:arith8,pos:330,val:+9,+cov | 0 ...2,src:000000,op:int16,pos:91,val:-129,+cov | 0 ...,src:000000,op:arith8,pos:330,val:-24,+cov | 0 ...553,src:000000,op:int16,pos:93,val:+0,+cov | Bin ...src:000000,op:int16,pos:94,val:be:+64,+cov | Bin .../id:000554,src:000000,op:int8,pos:6,val:+0 | Bin ...rc:000000,op:int16,pos:94,val:be:+100,+cov | Bin .../id:000555,src:000000,op:int8,pos:7,val:+0 | Bin ...56,src:000000,op:int16,pos:232,val:+1,+cov | Bin .../id:000556,src:000000,op:int8,pos:9,val:+0 | Bin ...,src:000000,op:int16,pos:254,val:+256,+cov | Bin ...0557,src:000000,op:int8,pos:34,val:+0,+cov | Bin ...src:000000,op:int16,pos:262,val:+1000,+cov | 0 ...0558,src:000000,op:int8,pos:40,val:+0,+cov | Bin ...,src:000000,op:int16,pos:303,val:+128,+cov | Bin ...d:000559,src:000000,op:int8,pos:40,val:+32 | 0 ...560,src:000000,op:int32,pos:3,val:be:+1000 | Bin ...0560,src:000000,op:int8,pos:44,val:-1,+cov | 0 ...src:000000,op:int32,pos:28,val:+32768,+cov | Bin ...0561,src:000000,op:int8,pos:51,val:-1,+cov | 0 ...2,src:000000,op:int32,pos:29,val:-128,+cov | 0 ...62,src:000000,op:int8,pos:62,val:-128,+cov | 0 ...3,src:000000,op:int32,pos:33,val:-128,+cov | 0 ...3,src:000000,op:int8,pos:135,val:+127,+cov | 0 ...,src:000000,op:int32,pos:33,val:+1024,+cov | Bin ...4,src:000000,op:int8,pos:140,val:+100,+cov | 0 ...:000000,op:int32,pos:33,val:be:-32769,+cov | 0 ...5,src:000000,op:int8,pos:178,val:+100,+cov | 0 ...6,src:000000,op:int16,pos:27,val:-128,+cov | 0 ...rc:000000,op:int32,pos:39,val:be:+255,+cov | Bin ...src:000000,op:int16,pos:28,val:be:+32,+cov | Bin ...src:000000,op:int32,pos:40,val:+32767,+cov | Bin ...rc:000000,op:int16,pos:28,val:be:+127,+cov | Bin ...68,src:000000,op:int32,pos:41,val:+16,+cov | Bin ...rc:000000,op:int16,pos:33,val:be:+512,+cov | Bin ...,src:000000,op:int32,pos:41,val:+1024,+cov | Bin ...,src:000000,op:int16,pos:34,val:+1000,+cov | 0 ...src:000000,op:int32,pos:44,val:-32769,+cov | 0 ...1,src:000000,op:int16,pos:44,val:+512,+cov | Bin ...c:000000,op:int32,pos:45,val:be:+1024,+cov | Bin ...2,src:000000,op:int16,pos:46,val:+100,+cov | Bin ...2,src:000000,op:int32,pos:48,val:+256,+cov | Bin ...rc:000000,op:int16,pos:46,val:be:+512,+cov | Bin ...src:000000,op:int32,pos:53,val:+32768,+cov | Bin ...4,src:000000,op:int16,pos:52,val:-128,+cov | 0 ...:000000,op:int32,pos:54,val:be:-32768,+cov | Bin ...5,src:000000,op:int16,pos:54,val:-128,+cov | 0 ...src:000000,op:int32,pos:54,val:-32769,+cov | 0 ...6,src:000000,op:int16,pos:54,val:+100,+cov | Bin ...00000,op:int32,pos:54,val:+2147483647,+cov | 0 ...7,src:000000,op:int16,pos:54,val:+255,+cov | Bin ...577,src:000000,op:int32,pos:63,val:-1,+cov | 0 ...8,src:000000,op:int16,pos:62,val:+255,+cov | Bin ...8,src:000000,op:int32,pos:64,val:-128,+cov | 0 ...79,src:000000,op:int16,pos:63,val:+32,+cov | Bin ...9,src:000000,op:int32,pos:69,val:+128,+cov | Bin ...rc:000000,op:int16,pos:65,val:be:+100,+cov | Bin ...,src:000000,op:int32,pos:80,val:+1024,+cov | Bin ...581,src:000000,op:int16,pos:66,val:+0,+cov | Bin ...src:000000,op:int32,pos:80,val:+65535,+cov | Bin ...,src:000000,op:int16,pos:80,val:+1000,+cov | 0 ...src:000000,op:int32,pos:82,val:be:+16,+cov | Bin ...3,src:000000,op:int16,pos:82,val:+256,+cov | Bin ...3,src:000000,op:int32,pos:83,val:+100,+cov | Bin ...c:000000,op:int16,pos:83,val:be:+1024,+cov | Bin ...84,src:000000,op:int32,pos:84,val:+32,+cov | Bin ...5,src:000000,op:int16,pos:87,val:-128,+cov | 0 ...5,src:000000,op:int32,pos:84,val:+128,+cov | Bin ...src:000000,op:int16,pos:87,val:-32768,+cov | Bin ...:000000,op:int32,pos:87,val:be:-32768,+cov | Bin ...7,src:000000,op:int16,pos:94,val:-129,+cov | 0 ...:000000,op:int32,pos:88,val:be:-32769,+cov | 0 ...000588,src:000000,op:int16,pos:193,val:+16 | Bin ...8,src:000000,op:int32,pos:89,val:-128,+cov | 0 ...89,src:000000,op:int32,pos:0,val:be:+32767 | Bin ...src:000000,op:int32,pos:92,val:+32767,+cov | Bin ...,src:000000,op:int32,pos:164,val:+256,+cov | Bin ...00590,src:000000,op:int32,pos:2,val:+65535 | Bin ...000000,op:int32,pos:178,val:be:-32769,+cov | 0 ...000000,op:int32,pos:7,val:-2147483648,+cov | Bin ...000000,op:int32,pos:232,val:be:+65535,+cov | Bin ...src:000000,op:int32,pos:24,val:be:+32,+cov | Bin ...3,src:000000,op:int32,pos:26,val:+255,+cov | Bin ...93,src:000000,op:int32,pos:313,val:+1,+cov | Bin ...,src:000000,op:int32,pos:27,val:be:+1,+cov | Bin ...c:000000,op:int32,pos:333,val:be:+255,+cov | Bin ...id:000595,src:000000,op:ext_AO,pos:26,+cov | 0 ...,src:000000,op:int32,pos:29,val:+1000,+cov | Bin ...id:000596,src:000000,op:ext_AO,pos:43,+cov | 0 ...0596,src:000000,op:int32,pos:30,val:be:+32 | Bin ...id:000597,src:000000,op:ext_AO,pos:49,+cov | 0 ...rc:000000,op:int32,pos:30,val:be:+512,+cov | Bin ...id:000598,src:000000,op:ext_AO,pos:52,+cov | 0 ...,src:000000,op:int32,pos:39,val:be:+1,+cov | Bin ...id:000599,src:000000,op:ext_AO,pos:56,+cov | 0 ...,src:000000,op:int32,pos:40,val:+1024,+cov | Bin ...id:000600,src:000000,op:ext_AO,pos:64,+cov | 0 ...src:000000,op:int32,pos:42,val:be:+16,+cov | Bin ...id:000601,src:000000,op:ext_AO,pos:65,+cov | 0 ...000000,op:int32,pos:48,val:+100663045,+cov | 0 ...id:000602,src:000000,op:ext_AO,pos:65,+cov | 0 ...c:000000,op:int32,pos:49,val:be:+4096,+cov | Bin ...id:000603,src:000000,op:ext_AO,pos:69,+cov | 0 ...3,src:000000,op:int32,pos:51,val:+128,+cov | Bin ...id:000604,src:000000,op:ext_AO,pos:69,+cov | 0 ...4,src:000000,op:int32,pos:53,val:-128,+cov | 0 ...id:000605,src:000000,op:ext_AO,pos:72,+cov | 0 ...5,src:000000,op:int32,pos:53,val:+128,+cov | Bin ...id:000606,src:000000,op:ext_AO,pos:72,+cov | 0 ...,src:000000,op:int32,pos:53,val:+1024,+cov | Bin ...id:000607,src:000000,op:ext_AO,pos:76,+cov | 0 ...7,src:000000,op:int32,pos:64,val:+256,+cov | Bin ...id:000608,src:000000,op:ext_AO,pos:81,+cov | 0 ...608,src:000000,op:int32,pos:65,val:+1,+cov | Bin ...id:000609,src:000000,op:ext_AO,pos:90,+cov | 0 ...src:000000,op:int32,pos:65,val:be:+64,+cov | Bin ...d:000610,src:000000,op:ext_AO,pos:111,+cov | 0 ...10,src:000000,op:int32,pos:66,val:+16,+cov | Bin ...d:000611,src:000000,op:ext_AO,pos:135,+cov | 0 ...000000,op:int32,pos:73,val:+100663045,+cov | 0 ...d:000612,src:000000,op:ext_AO,pos:135,+cov | 0 ...612,src:000000,op:int32,pos:81,val:+0,+cov | Bin ...d:000613,src:000000,op:ext_AO,pos:135,+cov | 0 ...src:000000,op:int32,pos:82,val:+32767,+cov | Bin ...d:000614,src:000000,op:ext_AO,pos:135,+cov | 0 ...c:000000,op:int32,pos:83,val:be:+1000,+cov | Bin ...d:000615,src:000000,op:ext_AO,pos:135,+cov | 0 ...5,src:000000,op:int32,pos:84,val:-129,+cov | 0 ...d:000616,src:000000,op:ext_AO,pos:136,+cov | 0 ...src:000000,op:int32,pos:84,val:+65536,+cov | Bin ...d:000617,src:000000,op:ext_AO,pos:136,+cov | 0 ...rc:000000,op:int32,pos:85,val:be:+255,+cov | Bin ...d:000618,src:000000,op:ext_AO,pos:137,+cov | 0 ...src:000000,op:int32,pos:85,val:-32769,+cov | 0 ...d:000619,src:000000,op:ext_AO,pos:137,+cov | 0 ...:000000,op:int32,pos:88,val:be:-32768,+cov | Bin ...d:000620,src:000000,op:ext_AO,pos:138,+cov | 0 ...0,src:000000,op:int32,pos:91,val:+127,+cov | Bin ...d:000621,src:000000,op:ext_AO,pos:142,+cov | 0 ...src:000000,op:int32,pos:92,val:-32768,+cov | Bin ...d:000622,src:000000,op:ext_AO,pos:143,+cov | 0 ...2,src:000000,op:int32,pos:98,val:-129,+cov | 0 ...d:000623,src:000000,op:ext_AO,pos:144,+cov | 0 ...rc:000000,op:int32,pos:128,val:-32769,+cov | 0 ...d:000624,src:000000,op:ext_AO,pos:144,+cov | 0 ...c:000000,op:int32,pos:160,val:be:+512,+cov | Bin ...d:000625,src:000000,op:ext_AO,pos:145,+cov | 0 ...src:000000,op:int32,pos:203,val:be:+1,+cov | Bin ...d:000626,src:000000,op:ext_AO,pos:146,+cov | 0 ...26,src:000000,op:int32,pos:263,val:+0,+cov | Bin ...d:000627,src:000000,op:ext_AO,pos:146,+cov | 0 ...000000,op:int32,pos:264,val:be:-32769,+cov | 0 ...d:000628,src:000000,op:ext_AO,pos:147,+cov | 0 ...00000,op:int32,pos:285,val:+100663045,+cov | 0 ...d:000629,src:000000,op:ext_AO,pos:147,+cov | 0 ...id:000629,src:000000,op:ext_AO,pos:34,+cov | 0 ...d:000630,src:000000,op:ext_AO,pos:148,+cov | 0 ...id:000630,src:000000,op:ext_AO,pos:34,+cov | 0 .../id:000631,src:000000,op:ext_AO,pos:148 | 0 ...id:000631,src:000000,op:ext_AO,pos:37,+cov | 0 ...d:000632,src:000000,op:ext_AO,pos:149,+cov | 0 ...id:000632,src:000000,op:ext_AO,pos:39,+cov | 0 ...d:000633,src:000000,op:ext_AO,pos:152,+cov | 0 ...id:000633,src:000000,op:ext_AO,pos:49,+cov | 0 .../id:000634,src:000000,op:ext_AO,pos:154 | 0 ...id:000634,src:000000,op:ext_AO,pos:51,+cov | 0 ...d:000635,src:000000,op:ext_AO,pos:155,+cov | 0 ...id:000635,src:000000,op:ext_AO,pos:52,+cov | 0 ...d:000636,src:000000,op:ext_AO,pos:156,+cov | 0 ...id:000636,src:000000,op:ext_AO,pos:52,+cov | 0 .../id:000637,src:000000,op:ext_AO,pos:157 | 0 ...id:000637,src:000000,op:ext_AO,pos:58,+cov | 0 ...d:000638,src:000000,op:ext_AO,pos:159,+cov | 0 ...id:000638,src:000000,op:ext_AO,pos:64,+cov | 0 ...d:000639,src:000000,op:ext_AO,pos:161,+cov | 0 ...id:000639,src:000000,op:ext_AO,pos:86,+cov | 0 ...d:000640,src:000000,op:ext_AO,pos:166,+cov | 0 ...id:000640,src:000000,op:ext_AO,pos:88,+cov | 0 ...d:000641,src:000000,op:ext_AO,pos:168,+cov | 0 ...id:000641,src:000000,op:ext_AO,pos:93,+cov | 0 ...d:000642,src:000000,op:ext_AO,pos:135,+cov | 0 ...d:000642,src:000000,op:ext_AO,pos:169,+cov | 0 ...d:000643,src:000000,op:ext_AO,pos:136,+cov | 0 ...d:000643,src:000000,op:ext_AO,pos:173,+cov | 0 ...d:000644,src:000000,op:ext_AO,pos:138,+cov | 0 ...d:000644,src:000000,op:ext_AO,pos:174,+cov | 0 ...d:000645,src:000000,op:ext_AO,pos:140,+cov | 0 ...d:000645,src:000000,op:ext_AO,pos:174,+cov | 0 ...d:000646,src:000000,op:ext_AO,pos:143,+cov | 0 ...d:000646,src:000000,op:ext_AO,pos:184,+cov | 0 ...d:000647,src:000000,op:ext_AO,pos:144,+cov | 0 ...d:000647,src:000000,op:ext_AO,pos:191,+cov | 0 ...d:000648,src:000000,op:ext_AO,pos:155,+cov | 0 ...d:000648,src:000000,op:ext_AO,pos:216,+cov | 0 ...d:000649,src:000000,op:ext_AO,pos:166,+cov | 0 ...d:000649,src:000000,op:ext_AO,pos:236,+cov | 0 ...d:000650,src:000000,op:ext_AO,pos:166,+cov | 0 ...d:000650,src:000000,op:ext_AO,pos:270,+cov | 0 ...d:000651,src:000000,op:ext_AO,pos:173,+cov | 0 ...d:000651,src:000000,op:ext_AO,pos:270,+cov | 0 ...d:000652,src:000000,op:ext_AO,pos:175,+cov | 0 ...d:000652,src:000000,op:ext_AO,pos:272,+cov | 0 ...d:000653,src:000000,op:ext_AO,pos:176,+cov | 0 ...d:000653,src:000000,op:ext_AO,pos:283,+cov | 0 ...d:000654,src:000000,op:ext_AO,pos:177,+cov | 0 ...d:000654,src:000000,op:ext_AO,pos:305,+cov | 0 ...d:000655,src:000000,op:ext_AO,pos:177,+cov | 0 ...d:000655,src:000000,op:ext_AO,pos:305,+cov | 0 ...d:000656,src:000000,op:ext_AO,pos:177,+cov | 0 ...d:000656,src:000000,op:ext_AO,pos:313,+cov | 0 ...d:000657,src:000000,op:ext_AO,pos:180,+cov | 0 ...d:000657,src:000000,op:ext_AO,pos:315,+cov | 0 ...d:000658,src:000000,op:ext_AO,pos:182,+cov | 0 .../id:000658,src:000000,op:ext_AO,pos:326 | 0 ...d:000659,src:000000,op:ext_AO,pos:269,+cov | 0 .../id:000659,src:000000,op:havoc,rep:4 | 0 ...d:000660,src:000000,op:ext_AO,pos:270,+cov | 0 .../id:000660,src:000000,op:havoc,rep:32 | Bin ...d:000661,src:000000,op:ext_AO,pos:271,+cov | 0 .../id:000661,src:000000,op:havoc,rep:4 | Bin ...d:000662,src:000000,op:ext_AO,pos:274,+cov | 0 .../id:000662,src:000000,op:havoc,rep:128 | Bin ...d:000663,src:000000,op:ext_AO,pos:275,+cov | 0 .../id:000663,src:000000,op:havoc,rep:32 | Bin ...d:000664,src:000000,op:ext_AO,pos:305,+cov | 0 .../id:000664,src:000000,op:havoc,rep:128 | Bin ...d:000665,src:000000,op:ext_AO,pos:312,+cov | 0 .../id:000665,src:000000,op:havoc,rep:16,+cov | Bin ...d:000666,src:000000,op:ext_AO,pos:314,+cov | 0 .../id:000666,src:000000,op:havoc,rep:64 | Bin ...d:000667,src:000000,op:ext_AO,pos:319,+cov | 0 .../id:000667,src:000000,op:havoc,rep:16 | Bin ...d:000668,src:000000,op:ext_AO,pos:328,+cov | 0 .../id:000668,src:000000,op:havoc,rep:128 | Bin .../id:000669,src:000000,op:havoc,rep:16 | Bin .../id:000669,src:000000,op:havoc,rep:64 | Bin .../id:000670,src:000000,op:havoc,rep:32 | Bin .../id:000671,src:000000,op:havoc,rep:16 | Bin .../id:000671,src:000000,op:havoc,rep:8 | 0 .../id:000672,src:000000,op:havoc,rep:16 | Bin .../id:000672,src:000000,op:havoc,rep:32 | Bin .../id:000673,src:000000,op:havoc,rep:128 | Bin .../id:000673,src:000000,op:havoc,rep:16 | Bin .../id:000674,src:000000,op:havoc,rep:32 | Bin .../id:000675,src:000000,op:havoc,rep:128 | Bin .../id:000675,src:000000,op:havoc,rep:8 | 0 .../id:000676,src:000000,op:havoc,rep:32 | Bin .../id:000677,src:000000,op:havoc,rep:64 | Bin .../id:000677,src:000000,op:havoc,rep:8 | Bin .../id:000678,src:000000,op:havoc,rep:16 | Bin .../id:000678,src:000000,op:havoc,rep:4 | 0 .../id:000679,src:000000,op:havoc,rep:128 | Bin .../id:000679,src:000000,op:havoc,rep:16,+cov | 0 ...id:000680,src:000000,op:havoc,rep:128,+cov | Bin .../id:000680,src:000000,op:havoc,rep:32 | Bin .../id:000681,src:000000,op:havoc,rep:16 | Bin .../id:000681,src:000000,op:havoc,rep:32 | Bin .../id:000682,src:000000,op:havoc,rep:16 | 0 .../id:000682,src:000000,op:havoc,rep:64,+cov | Bin .../id:000683,src:000000,op:havoc,rep:16,+cov | Bin .../id:000683,src:000000,op:havoc,rep:32,+cov | Bin .../id:000684,src:000000,op:havoc,rep:16,+cov | 0 .../id:000684,src:000000,op:havoc,rep:8 | 0 .../id:000685,src:000000,op:havoc,rep:16 | Bin .../id:000685,src:000000,op:havoc,rep:16,+cov | Bin ...id:000686,src:000000,op:havoc,rep:128,+cov | Bin .../id:000686,src:000000,op:havoc,rep:16,+cov | Bin .../id:000687,src:000000,op:havoc,rep:16 | Bin .../id:000687,src:000000,op:havoc,rep:32,+cov | 0 .../id:000688,src:000000,op:havoc,rep:128 | Bin ...id:000689,src:000000,op:havoc,rep:128,+cov | Bin .../id:000689,src:000000,op:havoc,rep:64,+cov | Bin .../id:000690,src:000000,op:havoc,rep:32 | Bin .../id:000690,src:000000,op:havoc,rep:64 | 0 .../id:000691,src:000000,op:havoc,rep:64 | Bin .../id:000692,src:000000,op:havoc,rep:4,+cov | 0 .../id:000693,src:000000,op:havoc,rep:16,+cov | Bin .../id:000693,src:000000,op:havoc,rep:4,+cov | 0 .../id:000694,src:000000,op:havoc,rep:2,+cov | 0 .../id:000694,src:000000,op:havoc,rep:32 | Bin ...id:000695,src:000000,op:havoc,rep:128,+cov | Bin .../id:000695,src:000000,op:havoc,rep:64 | Bin .../id:000696,src:000000,op:havoc,rep:16 | 0 .../id:000696,src:000000,op:havoc,rep:2,+cov | Bin .../id:000697,src:000000,op:havoc,rep:64,+cov | Bin .../id:000697,src:000000,op:havoc,rep:8 | 0 .../id:000698,src:000000,op:havoc,rep:128 | Bin .../id:000699,src:000000,op:havoc,rep:2,+cov | 0 .../id:000699,src:000000,op:havoc,rep:32 | Bin ...id:000700,src:000000,op:havoc,rep:128,+cov | Bin .../id:000700,src:000000,op:havoc,rep:32,+cov | Bin .../id:000701,src:000000,op:havoc,rep:16,+cov | 0 .../id:000701,src:000000,op:havoc,rep:2 | Bin .../id:000702,src:000000,op:havoc,rep:128 | Bin .../id:000702,src:000000,op:havoc,rep:8 | Bin .../id:000703,src:000000,op:havoc,rep:32,+cov | Bin .../id:000703,src:000001,op:flip1,pos:34,+cov | 0 .../id:000704,src:000000,op:havoc,rep:64,+cov | Bin .../id:000704,src:000001,op:flip1,pos:50,+cov | 0 .../id:000705,src:000000,op:havoc,rep:2,+cov | 0 .../id:000705,src:000001,op:flip1,pos:61,+cov | 0 .../id:000706,src:000000,op:havoc,rep:32 | Bin .../id:000706,src:000001,op:flip1,pos:91 | 0 ...id:000707,src:000000,op:havoc,rep:128,+cov | Bin ...id:000707,src:000001,op:flip1,pos:103,+cov | 0 .../id:000708,src:000000,op:havoc,rep:2 | 0 ...id:000708,src:000001,op:flip1,pos:120,+cov | 0 .../id:000709,src:000000,op:havoc,rep:64 | Bin ...id:000709,src:000001,op:flip1,pos:129,+cov | 0 .../id:000710,src:000000,op:havoc,rep:8,+cov | Bin ...id:000710,src:000001,op:flip1,pos:129,+cov | 0 .../id:000711,src:000000,op:havoc,rep:2,+cov | 0 ...id:000711,src:000001,op:flip1,pos:131,+cov | 0 .../id:000712,src:000000,op:havoc,rep:2,+cov | 0 ...id:000712,src:000001,op:flip1,pos:139,+cov | 0 .../id:000713,src:000000,op:havoc,rep:64,+cov | Bin ...id:000713,src:000001,op:flip1,pos:197,+cov | 0 .../id:000714,src:000000,op:havoc,rep:8,+cov | 0 ...id:000714,src:000001,op:flip1,pos:243,+cov | 0 .../id:000715,src:000000,op:havoc,rep:8,+cov | 0 ...id:000715,src:000001,op:flip1,pos:365,+cov | 0 .../id:000716,src:000001,op:flip1,pos:2 | 0 ...id:000716,src:000001,op:flip1,pos:456,+cov | 0 .../id:000717,src:000001,op:flip1,pos:50,+cov | 0 .../id:000717,src:000001,op:flip1,pos:596 | 0 .../id:000718,src:000001,op:flip1,pos:55,+cov | 0 ...id:000718,src:000001,op:flip1,pos:614,+cov | 0 ...id:000719,src:000001,op:flip1,pos:629,+cov | 0 .../id:000719,src:000001,op:flip1,pos:95 | 0 ...id:000720,src:000001,op:flip1,pos:102,+cov | 0 ...id:000720,src:000001,op:flip1,pos:635,+cov | 0 ...id:000721,src:000001,op:flip1,pos:107,+cov | 0 ...id:000721,src:000001,op:flip1,pos:683,+cov | 0 ...id:000722,src:000001,op:flip1,pos:118,+cov | 0 ...id:000722,src:000001,op:flip1,pos:730,+cov | 0 ...id:000723,src:000001,op:flip1,pos:124,+cov | 0 ...id:000723,src:000001,op:flip1,pos:786,+cov | 0 ...id:000724,src:000001,op:flip1,pos:133,+cov | 0 .../id:000724,src:000001,op:flip1,pos:796 | 0 ...id:000725,src:000001,op:flip1,pos:133,+cov | 0 ...id:000725,src:000001,op:flip1,pos:915,+cov | 0 ...d:000726,src:000001,op:flip1,pos:1112,+cov | 0 ...id:000726,src:000001,op:flip1,pos:135,+cov | 0 ...d:000727,src:000001,op:flip1,pos:1112,+cov | 0 ...id:000727,src:000001,op:flip1,pos:457,+cov | 0 ...d:000728,src:000001,op:flip1,pos:1114,+cov | 0 ...id:000728,src:000001,op:flip1,pos:469,+cov | 0 ...d:000729,src:000001,op:flip1,pos:1215,+cov | 0 ...id:000729,src:000001,op:flip1,pos:508,+cov | 0 ...d:000730,src:000001,op:flip1,pos:1353,+cov | 0 .../id:000730,src:000001,op:flip1,pos:600 | 0 ...d:000731,src:000001,op:flip1,pos:1453,+cov | 0 ...id:000731,src:000001,op:flip1,pos:618,+cov | 0 ...d:000732,src:000001,op:flip1,pos:1574,+cov | 0 ...id:000732,src:000001,op:flip1,pos:633,+cov | 0 .../id:000733,src:000001,op:flip1,pos:1630 | 0 ...id:000733,src:000001,op:flip1,pos:687,+cov | 0 ...id:000734,src:000001,op:flip1,pos:722,+cov | 0 ...id:000734,src:000001,op:flip2,pos:453,+cov | 0 ...id:000735,src:000001,op:flip1,pos:734,+cov | 0 ...id:000735,src:000001,op:flip2,pos:484,+cov | 0 .../id:000736,src:000001,op:flip1,pos:800 | 0 ...id:000736,src:000001,op:flip2,pos:696,+cov | 0 ...id:000737,src:000001,op:flip1,pos:888,+cov | 0 ...id:000737,src:000001,op:flip2,pos:843,+cov | 0 ...id:000738,src:000001,op:flip1,pos:893,+cov | 0 ...id:000738,src:000001,op:flip2,pos:845,+cov | 0 ...d:000739,src:000001,op:flip1,pos:1116,+cov | 0 ...id:000739,src:000001,op:flip2,pos:917,+cov | 0 ...d:000740,src:000001,op:flip1,pos:1116,+cov | 0 ...id:000740,src:000001,op:flip2,pos:995,+cov | 0 ...d:000741,src:000001,op:flip1,pos:1118,+cov | 0 ...d:000741,src:000001,op:flip2,pos:1031,+cov | 0 ...d:000742,src:000001,op:flip1,pos:1170,+cov | 0 ...d:000742,src:000001,op:flip2,pos:1135,+cov | 0 ...d:000743,src:000001,op:flip1,pos:1205,+cov | 0 ...d:000743,src:000001,op:flip2,pos:1286,+cov | 0 ...d:000744,src:000001,op:flip1,pos:1301,+cov | 0 ...d:000744,src:000001,op:flip2,pos:1655,+cov | 0 ...d:000745,src:000001,op:flip1,pos:1369,+cov | 0 .../id:000745,src:000001,op:flip4,pos:50,+cov | 0 ...d:000746,src:000001,op:flip1,pos:1378,+cov | 0 ...id:000746,src:000001,op:flip4,pos:122,+cov | 0 ...d:000747,src:000001,op:flip1,pos:1474,+cov | 0 ...id:000747,src:000001,op:flip4,pos:351,+cov | 0 ...d:000748,src:000001,op:flip1,pos:1510,+cov | 0 ...id:000748,src:000001,op:flip4,pos:569,+cov | 0 .../id:000749,src:000001,op:flip1,pos:1634 | 0 ...id:000749,src:000001,op:flip4,pos:788,+cov | 0 ...d:000750,src:000001,op:flip1,pos:1657,+cov | 0 ...d:000750,src:000001,op:flip4,pos:1198,+cov | 0 ...d:000751,src:000001,op:flip1,pos:1712,+cov | 0 .../id:000751,src:000001,op:flip8,pos:67,+cov | 0 .../id:000752,src:000001,op:flip2,pos:21,+cov | 0 ...d:000752,src:000001,op:flip8,pos:1661,+cov | 0 ...d:000753,src:000001,op:flip16,pos:390,+cov | 0 .../id:000753,src:000001,op:flip2,pos:39,+cov | 0 ...id:000754,src:000001,op:flip2,pos:105,+cov | 0 ...d:000754,src:000001,op:flip32,pos:339,+cov | 0 ...id:000755,src:000001,op:flip2,pos:890,+cov | 0 ...d:000755,src:000001,op:flip32,pos:975,+cov | 0 ...6,src:000001,op:arith8,pos:10,val:-30,+cov | 0 ...id:000756,src:000001,op:flip2,pos:975,+cov | 0 ...57,src:000001,op:arith8,pos:46,val:+9,+cov | 0 ...d:000757,src:000001,op:flip2,pos:1509,+cov | 0 ...58,src:000001,op:arith8,pos:72,val:+5,+cov | 0 ...d:000758,src:000001,op:flip2,pos:1662,+cov | 0 .../id:000759,src:000001,op:flip4,pos:32,+cov | 0 .../id:000759,src:000002,op:flip1,pos:30 | 0 ...id:000760,src:000001,op:flip4,pos:300,+cov | 0 .../id:000760,src:000002,op:flip1,pos:50 | 0 ...id:000761,src:000001,op:flip4,pos:457,+cov | 0 .../id:000761,src:000002,op:flip1,pos:50,+cov | 0 ...d:000762,src:000001,op:flip4,pos:1507,+cov | 0 .../id:000762,src:000002,op:flip1,pos:63 | 0 ...d:000763,src:000001,op:flip4,pos:1549,+cov | 0 .../id:000763,src:000002,op:flip1,pos:76 | 0 ...d:000764,src:000001,op:flip4,pos:1577,+cov | 0 .../id:000764,src:000002,op:flip1,pos:135 | 0 ...id:000765,src:000001,op:flip8,pos:899,+cov | 0 ...id:000765,src:000002,op:flip1,pos:143,+cov | 0 ...d:000766,src:000001,op:flip8,pos:1457,+cov | 0 .../id:000766,src:000002,op:flip4,pos:8,+cov | 0 ...d:000767,src:000001,op:flip32,pos:301,+cov | 0 ...id:000767,src:000002,op:flip4,pos:117,+cov | 0 ...8,src:000001,op:arith8,pos:18,val:+11,+cov | 0 ...68,src:000002,op:arith8,pos:11,val:-1,+cov | 0 ...9,src:000001,op:arith8,pos:33,val:+17,+cov | 0 ...9,src:000002,op:arith8,pos:20,val:+13,+cov | 0 ...70,src:000002,op:arith8,pos:34,val:-6,+cov | 0 .../id:000770,src:000002,op:flip1,pos:30 | 0 ...,src:000002,op:arith8,pos:105,val:+35,+cov | 0 .../id:000771,src:000002,op:flip1,pos:45,+cov | 0 ...00772,src:000002,op:arith8,pos:109,val:-35 | 0 .../id:000772,src:000002,op:flip1,pos:50 | 0 ...3,src:000002,op:arith8,pos:131,val:+5,+cov | 0 .../id:000773,src:000002,op:flip1,pos:63 | 0 ...4,src:000002,op:arith8,pos:137,val:+9,+cov | 0 .../id:000774,src:000002,op:flip1,pos:76 | 0 ...,src:000002,op:arith16,pos:55,val:-29,+cov | 0 ...id:000775,src:000002,op:flip1,pos:107,+cov | 0 .../id:000776,src:000002,op:flip1,pos:135 | 0 ...76,src:000002,op:int16,pos:27,val:+16,+cov | Bin .../id:000777,src:000002,op:flip2,pos:56,+cov | 0 ...:000777,src:000002,op:int16,pos:96,val:+32 | Bin ...id:000778,src:000002,op:flip2,pos:113,+cov | 0 ...:000002,op:int32,pos:53,val:be:+32767,+cov | Bin ...id:000779,src:000002,op:ext_AO,pos:22,+cov | 0 .../id:000779,src:000002,op:flip4,pos:15,+cov | 0 ...80,src:000002,op:arith8,pos:10,val:-7,+cov | 0 ...d:000780,src:000002,op:ext_AO,pos:130,+cov | 0 ...1,src:000002,op:arith8,pos:29,val:+21,+cov | 0 .../id:000781,src:000002,op:havoc,rep:8 | 0 ...00782,src:000002,op:arith8,pos:109,val:-35 | 0 .../id:000782,src:000002,op:havoc,rep:2 | 0 ...,src:000002,op:arith8,pos:132,val:+34,+cov | 0 .../id:000783,src:000002,op:havoc,rep:4 | 0 .../id:000784,src:000002,op:havoc,rep:64,+cov | Bin ...4,src:000002,op:int16,pos:20,val:-129,+cov | 0 .../id:000785,src:000002,op:havoc,rep:64 | Bin ...85,src:000002,op:int16,pos:82,val:+64,+cov | Bin .../id:000786,src:000002,op:havoc,rep:16 | Bin ...:000786,src:000002,op:int16,pos:96,val:+32 | Bin .../id:000787,src:000002,op:havoc,rep:64 | Bin ...c:000002,op:int16,pos:112,val:be:-128,+cov | 0 .../id:000788,src:000002,op:havoc,rep:16 | 0 ...src:000002,op:int32,pos:26,val:+65536,+cov | Bin .../id:000789,src:000002,op:havoc,rep:16 | Bin ...89,src:000002,op:int32,pos:54,val:+32,+cov | Bin ...id:000790,src:000002,op:ext_AO,pos:95,+cov | 0 .../id:000790,src:000002,op:havoc,rep:64 | Bin ...id:000791,src:000002,op:ext_AO,pos:98,+cov | 0 .../id:000791,src:000002,op:havoc,rep:4 | 0 ...d:000792,src:000002,op:ext_AO,pos:130,+cov | 0 .../id:000792,src:000002,op:havoc,rep:8 | Bin ...d:000793,src:000002,op:ext_AO,pos:135,+cov | 0 .../id:000793,src:000002,op:havoc,rep:64 | Bin ...d:000794,src:000002,op:ext_AO,pos:138,+cov | 0 .../id:000794,src:000002,op:havoc,rep:64 | Bin .../id:000795,src:000002,op:havoc,rep:4 | 0 .../id:000795,src:000002,op:havoc,rep:8 | Bin .../id:000796,src:000002,op:havoc,rep:16 | Bin .../id:000796,src:000002,op:havoc,rep:32,+cov | Bin .../id:000797,src:000002,op:havoc,rep:16 | 0 .../id:000797,src:000002,op:havoc,rep:2 | 0 .../id:000798,src:000002,op:havoc,rep:16 | Bin .../id:000798,src:000002,op:havoc,rep:64 | Bin .../id:000799,src:000002,op:havoc,rep:16 | 0 .../id:000799,src:000002,op:havoc,rep:64 | 0 .../id:000800,src:000002,op:havoc,rep:4 | 0 .../id:000801,src:000002,op:havoc,rep:128 | Bin .../id:000801,src:000002,op:havoc,rep:64 | Bin .../id:000802,src:000002,op:havoc,rep:16 | Bin .../id:000802,src:000002,op:havoc,rep:4 | 0 ...id:000803,src:000002,op:havoc,rep:128,+cov | Bin .../id:000803,src:000002,op:havoc,rep:2 | 0 .../id:000804,src:000002,op:havoc,rep:32 | Bin .../id:000804,src:000002,op:havoc,rep:64 | 0 .../id:000805,src:000002,op:havoc,rep:4 | 0 .../id:000805,src:000003,op:flip1,pos:0,+cov | 0 .../id:000806,src:000002,op:havoc,rep:32 | Bin .../id:000806,src:000003,op:flip1,pos:13,+cov | 0 .../id:000807,src:000002,op:havoc,rep:128 | Bin .../id:000807,src:000003,op:flip1,pos:18,+cov | 0 .../id:000808,src:000002,op:havoc,rep:16 | Bin .../id:000808,src:000003,op:flip1,pos:27,+cov | 0 .../id:000809,src:000002,op:havoc,rep:16 | Bin .../id:000809,src:000003,op:flip1,pos:27,+cov | 0 .../id:000810,src:000002,op:havoc,rep:32,+cov | Bin .../id:000810,src:000003,op:flip1,pos:30,+cov | 0 .../id:000811,src:000002,op:havoc,rep:2,+cov | 0 .../id:000811,src:000003,op:flip1,pos:30,+cov | 0 .../id:000812,src:000002,op:havoc,rep:4,+cov | 0 .../id:000812,src:000003,op:flip1,pos:32,+cov | 0 .../id:000813,src:000002,op:havoc,rep:16 | 0 .../id:000813,src:000003,op:flip1,pos:34,+cov | 0 .../id:000814,src:000002,op:havoc,rep:16,+cov | Bin .../id:000814,src:000003,op:flip1,pos:40,+cov | 0 .../id:000815,src:000002,op:havoc,rep:16 | 0 .../id:000815,src:000003,op:flip1,pos:42,+cov | 0 .../id:000816,src:000002,op:havoc,rep:16 | Bin .../id:000816,src:000003,op:flip1,pos:43,+cov | 0 .../id:000817,src:000002,op:havoc,rep:16 | 0 .../id:000817,src:000003,op:flip1,pos:48,+cov | 0 .../id:000818,src:000002,op:havoc,rep:16 | Bin .../id:000818,src:000003,op:flip1,pos:50,+cov | 0 .../id:000819,src:000002,op:havoc,rep:16,+cov | Bin .../id:000819,src:000003,op:flip1,pos:61,+cov | 0 .../id:000820,src:000002,op:havoc,rep:2 | 0 .../id:000820,src:000003,op:flip1,pos:67,+cov | 0 .../id:000821,src:000003,op:flip1,pos:18,+cov | 0 .../id:000821,src:000003,op:flip1,pos:70 | 0 .../id:000822,src:000003,op:flip1,pos:27,+cov | 0 .../id:000822,src:000003,op:flip1,pos:73,+cov | 0 .../id:000823,src:000003,op:flip1,pos:27,+cov | 0 .../id:000823,src:000003,op:flip1,pos:77,+cov | 0 .../id:000824,src:000003,op:flip1,pos:27,+cov | 0 .../id:000824,src:000003,op:flip1,pos:83,+cov | 0 .../id:000825,src:000003,op:flip1,pos:28,+cov | 0 .../id:000825,src:000003,op:flip1,pos:85,+cov | 0 .../id:000826,src:000003,op:flip1,pos:28,+cov | 0 .../id:000826,src:000003,op:flip1,pos:85,+cov | 0 .../id:000827,src:000003,op:flip1,pos:29,+cov | 0 .../id:000827,src:000003,op:flip1,pos:88,+cov | 0 .../id:000828,src:000003,op:flip1,pos:29,+cov | 0 .../id:000828,src:000003,op:flip1,pos:89 | 0 .../id:000829,src:000003,op:flip1,pos:29,+cov | 0 .../id:000829,src:000003,op:flip1,pos:91,+cov | 0 .../id:000830,src:000003,op:flip1,pos:30,+cov | 0 .../id:000830,src:000003,op:flip1,pos:93,+cov | 0 .../id:000831,src:000003,op:flip1,pos:32,+cov | 0 .../id:000831,src:000003,op:flip1,pos:93,+cov | 0 .../id:000832,src:000003,op:flip1,pos:34,+cov | 0 .../id:000832,src:000003,op:flip1,pos:97,+cov | 0 ...id:000833,src:000003,op:flip1,pos:109,+cov | 0 .../id:000833,src:000003,op:flip1,pos:36,+cov | 0 ...id:000834,src:000003,op:flip1,pos:111,+cov | 0 .../id:000834,src:000003,op:flip1,pos:39 | 0 ...id:000835,src:000003,op:flip1,pos:113,+cov | 0 .../id:000835,src:000003,op:flip1,pos:39,+cov | 0 ...id:000836,src:000003,op:flip1,pos:114,+cov | 0 .../id:000836,src:000003,op:flip1,pos:40,+cov | 0 ...id:000837,src:000003,op:flip1,pos:119,+cov | 0 .../id:000837,src:000003,op:flip1,pos:41,+cov | 0 ...id:000838,src:000003,op:flip1,pos:120,+cov | 0 .../id:000838,src:000003,op:flip1,pos:44,+cov | 0 ...id:000839,src:000003,op:flip1,pos:128,+cov | 0 .../id:000839,src:000003,op:flip1,pos:46,+cov | 0 ...id:000840,src:000003,op:flip1,pos:141,+cov | 0 .../id:000840,src:000003,op:flip1,pos:48,+cov | 0 ...id:000841,src:000003,op:flip1,pos:145,+cov | 0 .../id:000841,src:000003,op:flip1,pos:48,+cov | 0 ...id:000842,src:000003,op:flip1,pos:147,+cov | 0 .../id:000842,src:000003,op:flip1,pos:51 | 0 ...id:000843,src:000003,op:flip1,pos:150,+cov | 0 .../id:000843,src:000003,op:flip1,pos:51,+cov | 0 ...id:000844,src:000003,op:flip1,pos:150,+cov | 0 .../id:000844,src:000003,op:flip1,pos:54,+cov | 0 .../id:000845,src:000003,op:flip1,pos:58,+cov | 0 .../id:000845,src:000003,op:flip2,pos:65,+cov | 0 .../id:000846,src:000003,op:flip1,pos:64,+cov | 0 .../id:000846,src:000003,op:flip2,pos:84,+cov | 0 .../id:000847,src:000003,op:flip1,pos:64,+cov | 0 .../id:000847,src:000003,op:flip2,pos:99,+cov | 0 .../id:000848,src:000003,op:flip1,pos:66,+cov | 0 ...id:000848,src:000003,op:flip2,pos:102,+cov | 0 .../id:000849,src:000003,op:flip1,pos:67,+cov | 0 ...id:000849,src:000003,op:flip2,pos:115,+cov | 0 .../id:000850,src:000003,op:flip1,pos:67,+cov | 0 ...id:000850,src:000003,op:flip2,pos:132,+cov | 0 .../id:000851,src:000003,op:flip1,pos:74,+cov | 0 ...id:000851,src:000003,op:flip2,pos:133,+cov | 0 .../id:000852,src:000003,op:flip1,pos:76,+cov | 0 ...id:000852,src:000003,op:flip2,pos:139,+cov | 0 .../id:000853,src:000003,op:flip1,pos:78,+cov | 0 ...id:000853,src:000003,op:flip2,pos:139,+cov | 0 ...id:000854,src:000003,op:flip2,pos:145,+cov | 0 .../id:000854,src:000003,op:flip2,pos:28,+cov | 0 ...id:000855,src:000003,op:flip2,pos:147,+cov | 0 .../id:000855,src:000003,op:flip2,pos:29,+cov | 0 ...id:000856,src:000003,op:flip2,pos:151,+cov | 0 .../id:000856,src:000003,op:flip2,pos:29,+cov | 0 .../id:000857,src:000003,op:flip2,pos:30,+cov | 0 ...id:000857,src:000003,op:flip4,pos:110,+cov | 0 .../id:000858,src:000003,op:flip2,pos:35 | 0 ...id:000858,src:000003,op:flip4,pos:120,+cov | 0 .../id:000859,src:000003,op:flip2,pos:37,+cov | 0 ...id:000859,src:000003,op:flip4,pos:123,+cov | 0 .../id:000860,src:000003,op:flip2,pos:41,+cov | 0 ...id:000860,src:000003,op:flip4,pos:124,+cov | 0 .../id:000861,src:000003,op:flip2,pos:42,+cov | 0 ...id:000861,src:000003,op:flip4,pos:124,+cov | 0 .../id:000862,src:000003,op:flip2,pos:43,+cov | 0 ...id:000862,src:000003,op:flip4,pos:124,+cov | 0 .../id:000863,src:000003,op:flip2,pos:43,+cov | 0 ...id:000863,src:000003,op:flip4,pos:129,+cov | 0 .../id:000864,src:000003,op:flip2,pos:43 | 0 ...id:000864,src:000003,op:flip4,pos:138,+cov | 0 .../id:000865,src:000003,op:flip2,pos:45,+cov | 0 ...id:000865,src:000003,op:flip8,pos:118,+cov | 0 .../id:000866,src:000003,op:flip2,pos:47,+cov | 0 ...id:000866,src:000003,op:flip8,pos:129,+cov | 0 .../id:000867,src:000003,op:flip2,pos:49,+cov | 0 ...id:000867,src:000003,op:flip8,pos:130,+cov | 0 .../id:000868,src:000003,op:flip2,pos:54,+cov | 0 ...id:000868,src:000003,op:flip8,pos:132,+cov | 0 ...000869,src:000003,op:arith8,pos:17,val:-31 | 0 .../id:000869,src:000003,op:flip2,pos:62,+cov | 0 ...0,src:000003,op:arith8,pos:27,val:+26,+cov | 0 .../id:000870,src:000003,op:flip2,pos:63,+cov | 0 ...1,src:000003,op:arith8,pos:29,val:+11,+cov | 0 .../id:000871,src:000003,op:flip2,pos:68,+cov | 0 ...000872,src:000003,op:arith8,pos:29,val:+33 | 0 ...3,src:000003,op:arith8,pos:30,val:-14,+cov | 0 ...4,src:000003,op:arith8,pos:30,val:+28,+cov | 0 ...5,src:000003,op:arith8,pos:35,val:+18,+cov | 0 ...6,src:000003,op:arith8,pos:35,val:+26,+cov | 0 ...7,src:000003,op:arith8,pos:36,val:-23,+cov | 0 ...8,src:000003,op:arith8,pos:37,val:+20,+cov | 0 ...9,src:000003,op:arith8,pos:37,val:-27,+cov | 0 ...0,src:000003,op:arith8,pos:42,val:+31,+cov | 0 ...1,src:000003,op:arith8,pos:46,val:+26,+cov | 0 ...2,src:000003,op:arith8,pos:47,val:-35,+cov | 0 ...83,src:000003,op:arith8,pos:49,val:-2,+cov | 0 ...4,src:000003,op:arith8,pos:51,val:+15,+cov | 0 ...5,src:000003,op:arith8,pos:52,val:+11,+cov | 0 ...000886,src:000003,op:arith8,pos:61,val:+34 | 0 ...7,src:000003,op:arith8,pos:62,val:-18,+cov | 0 ...8,src:000003,op:arith8,pos:68,val:+21,+cov | 0 ...9,src:000003,op:arith8,pos:71,val:-12,+cov | 0 ...0,src:000003,op:arith8,pos:75,val:+15,+cov | 0 ...1,src:000003,op:arith8,pos:77,val:+13,+cov | 0 ...2,src:000003,op:arith8,pos:80,val:-17,+cov | 0 ...3,src:000003,op:arith8,pos:80,val:-23,+cov | 0 ...94,src:000003,op:arith8,pos:81,val:-9,+cov | 0 ...5,src:000003,op:arith8,pos:83,val:-18,+cov | 0 ...6,src:000003,op:arith8,pos:83,val:+25,+cov | 0 ...7,src:000003,op:arith8,pos:84,val:-18,+cov | 0 ...8,src:000003,op:arith8,pos:86,val:+11,+cov | 0 ...9,src:000003,op:arith8,pos:86,val:+27,+cov | 0 ...0,src:000003,op:arith8,pos:87,val:-23,+cov | 0 ...1,src:000003,op:arith8,pos:88,val:+35,+cov | 0 ...2,src:000003,op:arith8,pos:89,val:-14,+cov | 0 ...3,src:000003,op:arith8,pos:89,val:-33,+cov | 0 ...4,src:000003,op:arith8,pos:90,val:-25,+cov | 0 ...5,src:000003,op:arith8,pos:92,val:-25,+cov | 0 ...6,src:000003,op:arith8,pos:96,val:+10,+cov | 0 ...7,src:000003,op:arith8,pos:96,val:-19,+cov | 0 ...8,src:000003,op:arith8,pos:96,val:+25,+cov | 0 ...9,src:000003,op:arith8,pos:97,val:-17,+cov | 0 ...,src:000003,op:arith8,pos:100,val:-15,+cov | 0 ...,src:000003,op:arith8,pos:102,val:-27,+cov | 0 ...,src:000003,op:arith8,pos:102,val:-34,+cov | 0 ...3,src:000003,op:arith8,pos:103,val:-9,+cov | 0 ...00914,src:000003,op:arith8,pos:103,val:+12 | 0 ...,src:000003,op:arith8,pos:103,val:+20,+cov | 0 ...,src:000003,op:arith8,pos:103,val:+22,+cov | 0 ...,src:000003,op:arith8,pos:103,val:+29,+cov | 0 ...,src:000003,op:arith8,pos:103,val:+33,+cov | 0 ...,src:000003,op:arith8,pos:104,val:-10,+cov | 0 ...,src:000003,op:arith8,pos:104,val:-12,+cov | 0 ...,src:000003,op:arith8,pos:104,val:+34,+cov | 0 ...2,src:000003,op:arith8,pos:106,val:+5,+cov | 0 ...,src:000003,op:arith8,pos:106,val:-13,+cov | 0 ...,src:000003,op:arith8,pos:110,val:+15,+cov | 0 ...,src:000003,op:arith8,pos:112,val:-13,+cov | 0 ...,src:000003,op:arith8,pos:113,val:+34,+cov | 0 ...7,src:000003,op:arith8,pos:114,val:+5,+cov | 0 ...,src:000003,op:arith8,pos:114,val:+26,+cov | 0 ...,src:000003,op:arith8,pos:114,val:-27,+cov | 0 ...,src:000003,op:arith8,pos:118,val:-28,+cov | 0 ...,src:000003,op:arith8,pos:119,val:+12,+cov | 0 ...,src:000003,op:arith8,pos:119,val:+27,+cov | 0 ...3,src:000003,op:arith8,pos:122,val:-4,+cov | 0 ...,src:000003,op:arith8,pos:122,val:-26,+cov | 0 ...,src:000003,op:arith8,pos:122,val:+35,+cov | 0 ...,src:000003,op:arith8,pos:123,val:-11,+cov | 0 ...,src:000003,op:arith8,pos:124,val:-14,+cov | 0 ...8,src:000003,op:arith8,pos:128,val:+5,+cov | 0 ...,src:000003,op:arith8,pos:129,val:+21,+cov | 0 ...0,src:000003,op:arith8,pos:133,val:-7,+cov | 0 ...,src:000003,op:arith8,pos:133,val:+20,+cov | 0 ...,src:000003,op:arith8,pos:135,val:-26,+cov | 0 ...3,src:000003,op:arith8,pos:141,val:+1,+cov | 0 ...4,src:000003,op:arith8,pos:143,val:-5,+cov | 0 ...,src:000003,op:arith8,pos:145,val:+21,+cov | 0 ...6,src:000003,op:arith8,pos:147,val:-9,+cov | 0 ...,src:000003,op:arith8,pos:147,val:+31,+cov | 0 ...8,src:000003,op:arith8,pos:148,val:+3,+cov | 0 ...,src:000003,op:arith8,pos:148,val:-11,+cov | 0 ...,src:000003,op:arith8,pos:149,val:-18,+cov | 0 ...,src:000003,op:arith8,pos:151,val:-21,+cov | 0 ...,src:000003,op:arith8,pos:151,val:+26,+cov | 0 ...,src:000003,op:arith8,pos:151,val:-30,+cov | 0 ...,src:000003,op:arith16,pos:88,val:-16,+cov | 0 ...src:000003,op:arith16,pos:109,val:-19,+cov | 0 ...src:000003,op:arith16,pos:109,val:-26,+cov | 0 ...src:000003,op:arith16,pos:109,val:-33,+cov | 0 ...src:000003,op:arith16,pos:121,val:-34,+cov | 0 ...959,src:000003,op:int8,pos:80,val:+16,+cov | 0 ...0960,src:000003,op:int8,pos:83,val:+1,+cov | 0 ...61,src:000003,op:int8,pos:101,val:+64,+cov | 0 ...2,src:000003,op:int8,pos:120,val:-128,+cov | 0 ...63,src:000003,op:int8,pos:139,val:+16,+cov | 0 ...4,src:000003,op:int16,pos:81,val:+127,+cov | Bin ...965,src:000003,op:int16,pos:95,val:+1,+cov | Bin ...rc:000003,op:int16,pos:97,val:be:+127,+cov | Bin ...967,src:000003,op:int16,pos:98,val:+1,+cov | Bin ...68,src:000003,op:int16,pos:100,val:-1,+cov | 0 ...c:000003,op:int16,pos:102,val:be:+127,+cov | Bin ...,src:000003,op:int16,pos:107,val:-128,+cov | 0 ...c:000003,op:int16,pos:108,val:be:+127,+cov | Bin ...c:000003,op:int16,pos:109,val:be:+100,+cov | Bin ...src:000003,op:int16,pos:125,val:+1000,+cov | 0 ...rc:000003,op:int16,pos:137,val:be:+32,+cov | Bin ...c:000003,op:int16,pos:150,val:be:+255,+cov | Bin ...76,src:000003,op:int32,pos:1,val:be:+65535 | Bin ...src:000003,op:int32,pos:54,val:+32768,+cov | Bin ...:000003,op:int32,pos:80,val:be:+32767,+cov | Bin ...src:000003,op:int32,pos:84,val:+2147483647 | 0 ...c:000003,op:int32,pos:89,val:be:+4096,+cov | Bin ...1,src:000003,op:int32,pos:98,val:-129,+cov | 0 ...src:000003,op:int32,pos:99,val:-32769,+cov | 0 ...000003,op:int32,pos:99,val:+100663045,+cov | 0 ...4,src:000003,op:int32,pos:101,val:+64,+cov | Bin ...rc:000003,op:int32,pos:102,val:be:+32,+cov | Bin ...c:000003,op:int32,pos:105,val:be:+512,+cov | Bin ...,src:000003,op:int32,pos:106,val:+100,+cov | Bin ...00003,op:int32,pos:109,val:-100663046,+cov | Bin ...,src:000003,op:int32,pos:120,val:+255,+cov | Bin ...src:000003,op:int32,pos:121,val:+1000,+cov | Bin ...00003,op:int32,pos:121,val:-100663046,+cov | Bin ...000003,op:int32,pos:121,val:be:+65535,+cov | Bin ...00003,op:int32,pos:130,val:+100663045,+cov | 0 ...rc:000003,op:int32,pos:135,val:be:+32,+cov | Bin ...c:000003,op:int32,pos:136,val:be:+127,+cov | Bin ...96,src:000003,op:int32,pos:138,val:+1,+cov | Bin ...c:000003,op:int32,pos:147,val:be:+127,+cov | Bin ...id:000998,src:000003,op:ext_AO,pos:29,+cov | 0 ...id:000999,src:000003,op:ext_AO,pos:31,+cov | 0 ...id:001000,src:000003,op:ext_AO,pos:37,+cov | 0 ...id:001001,src:000003,op:ext_AO,pos:40,+cov | 0 ...id:001002,src:000003,op:ext_AO,pos:44,+cov | 0 ...id:001003,src:000003,op:ext_AO,pos:44,+cov | 0 ...id:001004,src:000003,op:ext_AO,pos:51,+cov | 0 ...id:001005,src:000003,op:ext_AO,pos:54,+cov | 0 ...id:001006,src:000003,op:ext_AO,pos:55,+cov | 0 ...id:001007,src:000003,op:ext_AO,pos:61,+cov | 0 ...id:001008,src:000003,op:ext_AO,pos:64,+cov | 0 ...id:001009,src:000003,op:ext_AO,pos:66,+cov | 0 ...id:001010,src:000003,op:ext_AO,pos:67,+cov | 0 ...id:001011,src:000003,op:ext_AO,pos:71,+cov | 0 ...id:001012,src:000003,op:ext_AO,pos:80,+cov | 0 ...id:001013,src:000003,op:ext_AO,pos:84,+cov | 0 ...id:001014,src:000003,op:ext_AO,pos:84,+cov | 0 ...id:001015,src:000003,op:ext_AO,pos:85,+cov | 0 ...id:001016,src:000003,op:ext_AO,pos:86,+cov | 0 ...id:001017,src:000003,op:ext_AO,pos:89,+cov | 0 ...id:001018,src:000003,op:ext_AO,pos:90,+cov | 0 ...id:001019,src:000003,op:ext_AO,pos:90,+cov | 0 ...d:001020,src:000003,op:ext_AO,pos:101,+cov | 0 ...d:001021,src:000003,op:ext_AO,pos:102,+cov | 0 ...d:001022,src:000003,op:ext_AO,pos:103,+cov | 0 ...d:001023,src:000003,op:ext_AO,pos:106,+cov | 0 ...d:001024,src:000003,op:ext_AO,pos:107,+cov | 0 ...d:001025,src:000003,op:ext_AO,pos:109,+cov | 0 ...d:001026,src:000003,op:ext_AO,pos:109,+cov | 0 ...d:001027,src:000003,op:ext_AO,pos:113,+cov | 0 ...d:001028,src:000003,op:ext_AO,pos:117,+cov | 0 ...d:001029,src:000003,op:ext_AO,pos:122,+cov | 0 ...d:001030,src:000003,op:ext_AO,pos:122,+cov | 0 ...d:001031,src:000003,op:ext_AO,pos:124,+cov | 0 ...d:001032,src:000003,op:ext_AO,pos:125,+cov | 0 ...d:001033,src:000003,op:ext_AO,pos:125,+cov | 0 ...d:001034,src:000003,op:ext_AO,pos:126,+cov | 0 ...d:001035,src:000003,op:ext_AO,pos:126,+cov | 0 ...d:001036,src:000003,op:ext_AO,pos:129,+cov | 0 ...d:001037,src:000003,op:ext_AO,pos:129,+cov | 0 ...d:001038,src:000003,op:ext_AO,pos:130,+cov | 0 ...d:001039,src:000003,op:ext_AO,pos:135,+cov | 0 ...d:001040,src:000003,op:ext_AO,pos:136,+cov | 0 ...d:001041,src:000003,op:ext_AO,pos:140,+cov | 0 ...d:001042,src:000003,op:ext_AO,pos:142,+cov | 0 ...d:001043,src:000003,op:ext_AO,pos:142,+cov | 0 ...d:001044,src:000003,op:ext_AO,pos:145,+cov | 0 ...d:001045,src:000003,op:ext_AO,pos:147,+cov | 0 ...d:001046,src:000003,op:ext_AO,pos:149,+cov | 0 .../id:001047,src:000004,op:flip1,pos:0,+cov | 0 .../id:001048,src:000004,op:flip1,pos:4,+cov | 0 .../id:001049,src:000004,op:flip1,pos:4 | Bin .../id:001050,src:000004,op:flip1,pos:18 | Bin .../id:001051,src:000004,op:flip1,pos:55,+cov | 0 .../id:001052,src:000004,op:flip1,pos:59 | 0 .../id:001053,src:000004,op:flip1,pos:87,+cov | 0 .../id:001054,src:000004,op:flip1,pos:89 | 0 ...id:001055,src:000004,op:flip1,pos:106,+cov | 0 .../id:001056,src:000004,op:flip1,pos:108 | 0 .../id:001057,src:000004,op:flip1,pos:108 | 0 .../id:001058,src:000004,op:flip1,pos:110 | 0 ...id:001059,src:000004,op:flip1,pos:111,+cov | 0 .../id:001060,src:000004,op:flip1,pos:112 | 0 ...id:001061,src:000004,op:flip1,pos:134,+cov | 0 ...id:001062,src:000004,op:flip1,pos:138,+cov | 0 ...id:001063,src:000004,op:flip1,pos:152,+cov | 0 ...id:001064,src:000004,op:flip1,pos:154,+cov | 0 ...id:001065,src:000004,op:flip1,pos:475,+cov | 0 ...id:001066,src:000004,op:flip1,pos:651,+cov | 0 ...id:001067,src:000004,op:flip1,pos:783,+cov | 0 .../id:001068,src:000004,op:flip1,pos:1150 | 0 ...d:001069,src:000004,op:flip1,pos:1278,+cov | 0 .../id:001070,src:000004,op:flip1,pos:1649 | 0 ...d:001071,src:000004,op:flip1,pos:1662,+cov | 0 .../id:001072,src:000004,op:flip1,pos:2148 | 0 ...d:001073,src:000004,op:flip1,pos:2437,+cov | 0 .../id:001074,src:000004,op:flip1,pos:2647 | 0 .../id:001075,src:000004,op:flip1,pos:3146 | 0 ...d:001076,src:000004,op:flip1,pos:3205,+cov | 0 .../id:001077,src:000004,op:flip1,pos:3645 | 0 ...d:001078,src:000004,op:flip1,pos:3980,+cov | 0 .../id:001079,src:000004,op:flip1,pos:4144 | 0 ...d:001080,src:000004,op:flip1,pos:4198,+cov | 0 ...d:001081,src:000004,op:flip1,pos:4249,+cov | 0 ...d:001082,src:000004,op:flip1,pos:4291,+cov | 0 ...d:001083,src:000004,op:flip1,pos:4673,+cov | 0 ...d:001084,src:000004,op:flip1,pos:5206,+cov | 0 ...d:001085,src:000004,op:flip1,pos:5361,+cov | 0 .../id:001086,src:000004,op:flip1,pos:5362 | 0 ...d:001087,src:000004,op:flip1,pos:5507,+cov | 0 .../id:001088,src:000004,op:flip1,pos:6639 | 0 .../id:001089,src:000004,op:flip1,pos:7138 | 0 ...d:001090,src:000004,op:flip1,pos:8027,+cov | 0 .../id:001091,src:000004,op:flip1,pos:8136 | 0 .../id:001092,src:000004,op:flip1,pos:8636 | 0 ...d:001093,src:000004,op:flip1,pos:8655,+cov | 0 .../id:001094,src:000004,op:flip1,pos:8712 | 0 .../id:001095,src:000004,op:flip1,pos:8768 | 0 .../id:001096,src:000004,op:flip1,pos:8825 | 0 ...d:001097,src:000004,op:flip1,pos:8840,+cov | 0 ...d:001098,src:000004,op:flip1,pos:8869,+cov | 0 ...d:001099,src:000004,op:flip1,pos:8882,+cov | 0 ...d:001100,src:000004,op:flip1,pos:8910,+cov | 0 ...d:001101,src:000004,op:flip1,pos:9001,+cov | 0 ...d:001102,src:000004,op:flip1,pos:9584,+cov | 0 ...d:001103,src:000004,op:flip1,pos:9658,+cov | 0 ...d:001104,src:000004,op:flip1,pos:9808,+cov | 0 ...d:001105,src:000004,op:flip1,pos:9954,+cov | 0 ...:001106,src:000004,op:flip1,pos:10093,+cov | 0 .../id:001107,src:000004,op:flip1,pos:10417 | 0 ...:001108,src:000004,op:flip1,pos:10430,+cov | 0 .../id:001109,src:000004,op:flip1,pos:10639 | 0 .../id:001110,src:000004,op:flip1,pos:10846 | 0 ...:001111,src:000004,op:flip1,pos:10957,+cov | 0 .../id:001112,src:000004,op:flip1,pos:11055 | 0 ...:001113,src:000004,op:flip1,pos:11176,+cov | 0 .../id:001114,src:000004,op:flip1,pos:11262 | 0 .../id:001115,src:000004,op:flip1,pos:11471 | 0 .../id:001116,src:000004,op:flip1,pos:11887 | 0 ...:001117,src:000004,op:flip1,pos:11996,+cov | 0 .../id:001118,src:000004,op:flip1,pos:12094 | 0 .../id:001119,src:000004,op:flip1,pos:12302 | 0 .../id:001120,src:000004,op:flip1,pos:12511 | 0 ...:001121,src:000004,op:flip1,pos:12567,+cov | 0 ...:001122,src:000004,op:flip1,pos:12660,+cov | 0 .../id:001123,src:000004,op:flip1,pos:13342 | 0 .../id:001124,src:000004,op:flip1,pos:13550 | 0 .../id:001125,src:000004,op:flip1,pos:13758 | 0 .../id:001126,src:000004,op:flip1,pos:13968 | 0 ...:001127,src:000004,op:flip1,pos:14134,+cov | 0 ...:001128,src:000004,op:flip1,pos:14599,+cov | 0 .../id:001129,src:000004,op:flip1,pos:14603 | 0 ...:001130,src:000004,op:flip1,pos:15122,+cov | 0 ...:001131,src:000004,op:flip1,pos:15271,+cov | 0 ...:001132,src:000004,op:flip1,pos:15295,+cov | 0 ...:001133,src:000004,op:flip1,pos:16328,+cov | 0 .../id:001134,src:000004,op:flip1,pos:17507 | 0 ...:001135,src:000004,op:flip1,pos:17983,+cov | 0 ...:001136,src:000004,op:flip1,pos:18109,+cov | 0 ...:001137,src:000004,op:flip1,pos:19291,+cov | 0 ...:001138,src:000004,op:flip1,pos:20068,+cov | 0 ...:001139,src:000004,op:flip1,pos:20075,+cov | 0 ...:001140,src:000004,op:flip1,pos:20264,+cov | 0 ...:001141,src:000004,op:flip1,pos:20372,+cov | 0 ...:001142,src:000004,op:flip1,pos:20845,+cov | 0 .../id:001143,src:000004,op:flip1,pos:21044 | 0 ...:001144,src:000004,op:flip1,pos:21072,+cov | 0 ...:001145,src:000004,op:flip1,pos:22111,+cov | 0 ...:001146,src:000004,op:flip1,pos:22404,+cov | 0 ...:001147,src:000004,op:flip1,pos:23777,+cov | 0 ...:001148,src:000004,op:flip1,pos:24046,+cov | 0 ...:001149,src:000004,op:flip1,pos:27360,+cov | 0 ...:001150,src:000004,op:flip1,pos:27547,+cov | 0 ...:001151,src:000004,op:flip1,pos:28206,+cov | 0 ...:001152,src:000004,op:flip1,pos:29132,+cov | 0 ...:001153,src:000004,op:flip1,pos:29181,+cov | 0 ...:001154,src:000004,op:flip1,pos:30141,+cov | 0 ...:001155,src:000004,op:flip1,pos:30860,+cov | 0 ...:001156,src:000004,op:flip1,pos:31016,+cov | 0 ...:001157,src:000004,op:flip1,pos:31260,+cov | 0 ...:001158,src:000004,op:flip1,pos:32301,+cov | 0 ...:001159,src:000004,op:flip1,pos:32476,+cov | 0 ...:001160,src:000004,op:flip1,pos:33475,+cov | 0 .../id:001161,src:000004,op:flip2,pos:108 | 0 ...id:001162,src:000004,op:flip2,pos:272,+cov | 0 ...id:001163,src:000004,op:flip2,pos:501,+cov | 0 ...d:001164,src:000004,op:flip2,pos:1593,+cov | 0 ...d:001165,src:000004,op:flip2,pos:1877,+cov | 0 ...d:001166,src:000004,op:flip2,pos:2863,+cov | 0 ...d:001167,src:000004,op:flip2,pos:3189,+cov | 0 ...d:001168,src:000004,op:flip2,pos:5916,+cov | 0 ...d:001169,src:000004,op:flip2,pos:6474,+cov | 0 ...d:001170,src:000004,op:flip2,pos:8695,+cov | 0 ...d:001171,src:000004,op:flip2,pos:9101,+cov | 0 ...d:001172,src:000004,op:flip2,pos:9350,+cov | 0 ...d:001173,src:000004,op:flip2,pos:9675,+cov | 0 ...d:001174,src:000004,op:flip2,pos:9779,+cov | 0 ...:001175,src:000004,op:flip2,pos:10123,+cov | 0 ...:001176,src:000004,op:flip2,pos:10486,+cov | 0 ...:001177,src:000004,op:flip2,pos:11222,+cov | 0 ...:001178,src:000004,op:flip2,pos:11504,+cov | 0 ...:001179,src:000004,op:flip2,pos:13892,+cov | 0 ...:001180,src:000004,op:flip2,pos:14104,+cov | 0 ...:001181,src:000004,op:flip2,pos:16451,+cov | 0 ...:001182,src:000004,op:flip2,pos:17186,+cov | 0 ...:001183,src:000004,op:flip2,pos:18869,+cov | 0 ...:001184,src:000004,op:flip2,pos:20039,+cov | 0 ...:001185,src:000004,op:flip2,pos:20319,+cov | 0 ...:001186,src:000004,op:flip2,pos:20987,+cov | 0 ...:001187,src:000004,op:flip2,pos:22115,+cov | 0 ...:001188,src:000004,op:flip2,pos:22139,+cov | 0 ...:001189,src:000004,op:flip2,pos:22530,+cov | 0 ...:001190,src:000004,op:flip2,pos:22871,+cov | 0 ...:001191,src:000004,op:flip2,pos:22878,+cov | 0 ...:001192,src:000004,op:flip2,pos:23586,+cov | 0 ...:001193,src:000004,op:flip2,pos:24806,+cov | 0 ...:001194,src:000004,op:flip2,pos:25248,+cov | 0 ...:001195,src:000004,op:flip2,pos:26529,+cov | 0 ...:001196,src:000004,op:flip2,pos:28158,+cov | 0 ...:001197,src:000004,op:flip2,pos:29113,+cov | 0 ...:001198,src:000004,op:flip2,pos:29233,+cov | 0 ...:001199,src:000004,op:flip2,pos:31755,+cov | 0 ...:001200,src:000004,op:flip2,pos:32441,+cov | 0 ...:001201,src:000004,op:flip2,pos:32888,+cov | 0 ...:001202,src:000004,op:flip2,pos:33869,+cov | 0 ...id:001203,src:000004,op:flip4,pos:399,+cov | 0 ...d:001204,src:000004,op:flip4,pos:1377,+cov | 0 ...d:001205,src:000004,op:flip4,pos:1830,+cov | 0 ...d:001206,src:000004,op:flip4,pos:3239,+cov | 0 ...d:001207,src:000004,op:flip4,pos:3591,+cov | 0 ...d:001208,src:000004,op:flip4,pos:3708,+cov | 0 ...d:001209,src:000004,op:flip4,pos:4350,+cov | 0 ...d:001210,src:000004,op:flip4,pos:4487,+cov | 0 ...d:001211,src:000004,op:flip4,pos:4584,+cov | 0 ...d:001212,src:000004,op:flip4,pos:5470,+cov | 0 ...d:001213,src:000004,op:flip4,pos:6559,+cov | 0 ...d:001214,src:000004,op:flip4,pos:6626,+cov | 0 ...d:001215,src:000004,op:flip4,pos:7110,+cov | 0 ...d:001216,src:000004,op:flip4,pos:7148,+cov | 0 ...d:001217,src:000004,op:flip4,pos:7168,+cov | 0 ...d:001218,src:000004,op:flip4,pos:7715,+cov | 0 ...d:001219,src:000004,op:flip4,pos:9108,+cov | 0 ...d:001220,src:000004,op:flip4,pos:9386,+cov | 0 ...d:001221,src:000004,op:flip4,pos:9592,+cov | 0 ...d:001222,src:000004,op:flip4,pos:9878,+cov | 0 ...d:001223,src:000004,op:flip4,pos:9972,+cov | 0 ...:001224,src:000004,op:flip4,pos:10287,+cov | 0 ...:001225,src:000004,op:flip4,pos:10737,+cov | 0 ...:001226,src:000004,op:flip4,pos:12260,+cov | 0 ...:001227,src:000004,op:flip4,pos:15195,+cov | 0 ...:001228,src:000004,op:flip4,pos:15571,+cov | 0 ...:001229,src:000004,op:flip4,pos:19500,+cov | 0 ...:001230,src:000004,op:flip4,pos:20444,+cov | 0 ...:001231,src:000004,op:flip4,pos:22249,+cov | 0 ...:001232,src:000004,op:flip4,pos:22380,+cov | 0 ...:001233,src:000004,op:flip4,pos:25459,+cov | 0 ...:001234,src:000004,op:flip4,pos:27094,+cov | 0 ...:001235,src:000004,op:flip4,pos:28097,+cov | 0 ...:001236,src:000004,op:flip4,pos:28763,+cov | 0 ...:001237,src:000004,op:flip4,pos:28897,+cov | 0 ...:001238,src:000004,op:flip4,pos:29158,+cov | 0 ...:001239,src:000004,op:flip4,pos:29314,+cov | 0 ...:001240,src:000004,op:flip4,pos:29379,+cov | 0 ...:001241,src:000004,op:flip4,pos:30828,+cov | 0 ...:001242,src:000004,op:flip4,pos:31450,+cov | 0 ...:001243,src:000004,op:flip4,pos:32113,+cov | 0 ...:001244,src:000004,op:flip4,pos:32563,+cov | 0 ...:001245,src:000004,op:flip4,pos:32844,+cov | 0 ...:001246,src:000004,op:flip4,pos:33202,+cov | 0 .../taler-exchange-aggregator.c} | 98 ++-- .../taler-exchange-httpd.c} | 110 ++-- .../taler-exchange-httpd.h} | 28 +- .../taler-exchange-httpd_admin.c} | 12 +- .../taler-exchange-httpd_admin.h} | 8 +- .../taler-exchange-httpd_db.c} | 134 ++--- .../taler-exchange-httpd_db.h} | 24 +- .../taler-exchange-httpd_deposit.c} | 22 +- .../taler-exchange-httpd_deposit.h} | 8 +- .../taler-exchange-httpd_keystate.c} | 88 +-- .../taler-exchange-httpd_keystate.h} | 28 +- .../taler-exchange-httpd_mhd.c} | 14 +- .../taler-exchange-httpd_mhd.h} | 8 +- .../taler-exchange-httpd_parsing.c} | 10 +- .../taler-exchange-httpd_parsing.h} | 8 +- .../taler-exchange-httpd_refresh.c} | 40 +- .../taler-exchange-httpd_refresh.h} | 8 +- .../taler-exchange-httpd_reserve.c} | 14 +- .../taler-exchange-httpd_reserve.h} | 8 +- .../taler-exchange-httpd_responses.c} | 88 +-- .../taler-exchange-httpd_responses.h} | 34 +- .../taler-exchange-httpd_test.c} | 14 +- .../taler-exchange-httpd_test.h} | 10 +- .../taler-exchange-httpd_tracking.c} | 10 +- .../taler-exchange-httpd_tracking.h} | 8 +- .../taler-exchange-httpd_validation.c} | 10 +- .../taler-exchange-httpd_validation.h} | 6 +- .../taler-exchange-httpd_wire.c} | 24 +- .../taler-exchange-httpd_wire.h} | 8 +- .../test-exchange-home}/master.priv | 0 .../test_taler_exchange_httpd.sh} | 12 +- .../test_taler_exchange_httpd_afl.sh} | 12 +- .../test_taler_mint_httpd.data | 2 +- src/exchangedb/Makefile.am | 110 ++++ .../exchangedb_keyio.c} | 88 +-- .../exchangedb_plugin.c} | 20 +- .../perf_taler_exchangedb.c} | 258 ++++----- .../perf_taler_exchangedb_init.c} | 154 ++--- src/exchangedb/perf_taler_exchangedb_init.h | 257 +++++++++ .../perf_taler_exchangedb_interpreter.c} | 544 +++++++++--------- .../perf_taler_exchangedb_interpreter.h} | 532 ++++++++--------- .../perf_taler_exchangedb_values.h} | 6 +- .../plugin_exchangedb_common.c} | 30 +- .../plugin_exchangedb_postgres.c} | 256 ++++----- .../test-exchange-db-postgres.conf} | 4 +- .../test_exchangedb.c} | 86 +-- .../test_exchangedb_deposits.c} | 32 +- .../test_exchangedb_keyio.c} | 16 +- src/exchangedb/test_perf_taler_exchangedb.c | 182 ++++++ src/include/Makefile.am | 6 +- src/include/taler_crypto_lib.h | 24 +- ...int_service.h => taler_exchange_service.h} | 446 +++++++------- ...er_mintdb_lib.h => taler_exchangedb_lib.h} | 106 ++-- ...tdb_plugin.h => taler_exchangedb_plugin.h} | 258 ++++----- src/include/taler_signatures.h | 200 +++---- src/mint-lib/Makefile.am | 62 -- src/mint-tools/Makefile.am | 81 --- src/mint/.gitignore | 6 - src/mint/Makefile.am | 59 -- src/mintdb/Makefile.am | 110 ---- src/mintdb/perf_taler_mintdb_init.h | 257 --------- src/mintdb/test_perf_taler_mintdb.c | 182 ------ src/util/os_installation.c | 4 +- src/util/wireformats.c | 2 +- src/wire/plugin_wire_sepa.c | 4 +- src/wire/plugin_wire_template.c | 4 +- src/wire/plugin_wire_test.c | 4 +- src/wire/test_sepa_wireformat.c | 2 +- 2225 files changed, 4013 insertions(+), 4006 deletions(-) mode change 100755 => 100644 bootstrap mode change 100755 => 100644 contrib/coverage.sh create mode 100644 contrib/exchange-template/README rename contrib/{mint-template/config/mint-common.conf => exchange-template/config/exchange-common.conf} (55%) rename contrib/{mint-template/config/mint-keyup.conf => exchange-template/config/exchange-keyup.conf} (98%) delete mode 100644 contrib/mint-template/README mode change 100755 => 100644 doc/logos/fonts/OldNewspaperTypes.ttf create mode 100644 doc/taler-exchange-dbinit.1 create mode 100644 doc/taler-exchange-httpd.1 create mode 100644 doc/taler-exchange-keycheck.1 create mode 100644 doc/taler-exchange-keyup.1 create mode 100644 doc/taler-exchange-reservemod.1 rename doc/{taler-mint-sepa.1 => taler-exchange-sepa.1} (56%) delete mode 100644 doc/taler-mint-dbinit.1 delete mode 100644 doc/taler-mint-httpd.1 delete mode 100644 doc/taler-mint-keycheck.1 delete mode 100644 doc/taler-mint-keyup.1 delete mode 100644 doc/taler-mint-reservemod.1 create mode 100644 src/exchange-lib/Makefile.am rename src/{mint-lib => exchange-lib}/afl-generate.sh (86%) rename src/{mint-lib => exchange-lib}/baseline/admin_add_incoming.req (100%) rename src/{mint-lib => exchange-lib}/baseline/deposit.req (100%) rename src/{mint-lib => exchange-lib}/baseline/keys.req (100%) rename src/{mint-lib => exchange-lib}/baseline/refresh_link.req (100%) rename src/{mint-lib => exchange-lib}/baseline/refresh_melt.req (100%) rename src/{mint-lib => exchange-lib}/baseline/refresh_reveal.req (100%) rename src/{mint-lib => exchange-lib}/baseline/reserve_status.req (100%) rename src/{mint-lib => exchange-lib}/baseline/reserve_withdraw.req (100%) rename src/{mint-lib => exchange-lib}/baseline/wire.req (100%) rename src/{mint-lib => exchange-lib}/baseline/wire_sepa.req (100%) rename src/{mint-lib => exchange-lib}/baseline/wire_test.req (100%) rename src/{mint-lib/mint_api_admin.c => exchange-lib/exchange_api_admin.c} (78%) rename src/{mint-lib/mint_api_common.c => exchange-lib/exchange_api_common.c} (92%) rename src/{mint-lib/mint_api_common.h => exchange-lib/exchange_api_common.h} (81%) rename src/{mint-lib/mint_api_context.c => exchange-lib/exchange_api_context.c} (91%) rename src/{mint-lib/mint_api_context.h => exchange-lib/exchange_api_context.h} (95%) rename src/{mint-lib/mint_api_deposit.c => exchange-lib/exchange_api_deposit.c} (81%) rename src/{mint-lib/mint_api_deposit_wtid.c => exchange-lib/exchange_api_deposit_wtid.c} (80%) rename src/{mint-lib/mint_api_handle.c => exchange-lib/exchange_api_handle.c} (76%) rename src/{mint-lib/mint_api_handle.h => exchange-lib/exchange_api_handle.h} (68%) rename src/{mint-lib/mint_api_json.c => exchange-lib/exchange_api_json.c} (99%) rename src/{mint-lib/mint_api_json.h => exchange-lib/exchange_api_json.h} (99%) rename src/{mint-lib/mint_api_refresh.c => exchange-lib/exchange_api_refresh.c} (91%) rename src/{mint-lib/mint_api_refresh_link.c => exchange-lib/exchange_api_refresh_link.c} (87%) rename src/{mint-lib/mint_api_reserve.c => exchange-lib/exchange_api_reserve.c} (85%) rename src/{mint-lib/mint_api_wire.c => exchange-lib/exchange_api_wire.c} (79%) rename src/{mint-lib/mint_api_wire_deposits.c => exchange-lib/exchange_api_wire_deposits.c} (80%) rename src/{mint-lib/test-mint-home => exchange-lib/test-exchange-home}/config/mint-common.conf (56%) rename src/{mint-lib/test-mint-home => exchange-lib/test-exchange-home}/config/mint-keyup.conf (99%) rename src/{mint-lib/test-mint-home => exchange-lib/test-exchange-home}/master.priv (100%) rename src/{mint-lib/test-mint-home => exchange-lib/test-exchange-home}/sepa.json (100%) rename src/{mint-lib/test_mint_api.c => exchange-lib/test_exchange_api.c} (91%) create mode 100644 src/exchange-tools/Makefile.am rename src/{mint-tools => exchange-tools}/taler-auditor-sign.c (82%) rename src/{mint-tools/taler-mint-dbinit.c => exchange-tools/taler-exchange-dbinit.c} (66%) rename src/{mint-tools/taler-mint-keycheck.c => exchange-tools/taler-exchange-keycheck.c} (81%) rename src/{mint-tools/taler-mint-keyup.c => exchange-tools/taler-exchange-keyup.c} (89%) rename src/{mint-tools/taler-mint-reservemod.c => exchange-tools/taler-exchange-reservemod.c} (85%) rename src/{mint-tools/taler-mint-sepa.c => exchange-tools/taler-exchange-sepa.c} (94%) create mode 100644 src/exchange/.gitignore create mode 100644 src/exchange/Makefile.am rename src/{mint => exchange}/afl-tests/id:000000,orig:admin_add_incoming.req (100%) rename src/{mint => exchange}/afl-tests/id:000001,orig:deposit.req (100%) rename src/{mint => exchange}/afl-tests/id:000001,sig:06,src:000004,op:flip1,pos:21060 (100%) rename src/{mint => exchange}/afl-tests/id:000002,orig:keys.req (100%) rename src/{mint => exchange}/afl-tests/id:000003,orig:refresh_link.req (100%) rename src/{mint => exchange}/afl-tests/id:000004,orig:refresh_melt.req (100%) rename src/{mint => exchange}/afl-tests/id:000005,orig:refresh_reveal.req (100%) rename src/{mint => exchange}/afl-tests/id:000006,orig:reserve_status.req (100%) rename src/{mint => exchange}/afl-tests/id:000007,orig:reserve_withdraw.req (100%) rename src/{mint => exchange}/afl-tests/id:000008,orig:wire.req (100%) rename src/{mint => exchange}/afl-tests/id:000009,orig:wire_sepa.req (100%) rename src/{mint => exchange}/afl-tests/id:000010,orig:wire_test.req (100%) rename src/{mint => exchange}/afl-tests/id:000011,src:000000,op:flip1,pos:1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000011,src:000000,op:flip1,pos:2,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000012,src:000000,op:flip1,pos:3,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000012,src:000000,op:flip1,pos:4,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000013,src:000000,op:flip1,pos:4,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000013,src:000000,op:flip1,pos:5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000014,src:000000,op:flip1,pos:5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000015,src:000000,op:flip1,pos:5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000015,src:000000,op:flip1,pos:8,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000016,src:000000,op:flip1,pos:11 (100%) rename src/{mint => exchange}/afl-tests/id:000016,src:000000,op:flip1,pos:5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000017,src:000000,op:flip1,pos:13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000017,src:000000,op:flip1,pos:7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000018,src:000000,op:flip1,pos:13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000018,src:000000,op:flip1,pos:9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000019,src:000000,op:flip1,pos:11 (100%) rename src/{mint => exchange}/afl-tests/id:000019,src:000000,op:flip1,pos:19,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000020,src:000000,op:flip1,pos:12,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000020,src:000000,op:flip1,pos:19,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000021,src:000000,op:flip1,pos:13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000021,src:000000,op:flip1,pos:21,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000022,src:000000,op:flip1,pos:17,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000022,src:000000,op:flip1,pos:23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000023,src:000000,op:flip1,pos:22,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000023,src:000000,op:flip1,pos:24,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000024,src:000000,op:flip1,pos:24,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000025,src:000000,op:flip1,pos:24,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000026,src:000000,op:flip1,pos:25,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000027,src:000000,op:flip1,pos:26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000028,src:000000,op:flip1,pos:26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000029,src:000000,op:flip1,pos:26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000029,src:000000,op:flip1,pos:27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000030,src:000000,op:flip1,pos:27 (100%) rename src/{mint => exchange}/afl-tests/id:000030,src:000000,op:flip1,pos:27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000031,src:000000,op:flip1,pos:27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000031,src:000000,op:flip1,pos:28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000032,src:000000,op:flip1,pos:28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000032,src:000000,op:flip1,pos:30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000033,src:000000,op:flip1,pos:28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000033,src:000000,op:flip1,pos:30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000034,src:000000,op:flip1,pos:28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000034,src:000000,op:flip1,pos:30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000035,src:000000,op:flip1,pos:30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000036,src:000000,op:flip1,pos:31,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000037,src:000000,op:flip1,pos:32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000038,src:000000,op:flip1,pos:32 (100%) rename src/{mint => exchange}/afl-tests/id:000038,src:000000,op:flip1,pos:32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000039,src:000000,op:flip1,pos:32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000039,src:000000,op:flip1,pos:34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000040,src:000000,op:flip1,pos:32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000040,src:000000,op:flip1,pos:34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000041,src:000000,op:flip1,pos:34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000041,src:000000,op:flip1,pos:36,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000042,src:000000,op:flip1,pos:36,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000043,src:000000,op:flip1,pos:37,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000043,src:000000,op:flip1,pos:38 (100%) rename src/{mint => exchange}/afl-tests/id:000044,src:000000,op:flip1,pos:38 (100%) rename src/{mint => exchange}/afl-tests/id:000044,src:000000,op:flip1,pos:38,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000045,src:000000,op:flip1,pos:38,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000045,src:000000,op:flip1,pos:39,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000046,src:000000,op:flip1,pos:39,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000047,src:000000,op:flip1,pos:39 (100%) rename src/{mint => exchange}/afl-tests/id:000047,src:000000,op:flip1,pos:39,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000048,src:000000,op:flip1,pos:39,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000048,src:000000,op:flip1,pos:40,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000049,src:000000,op:flip1,pos:41,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000050,src:000000,op:flip1,pos:41,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000050,src:000000,op:flip1,pos:42,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000051,src:000000,op:flip1,pos:41,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000051,src:000000,op:flip1,pos:47,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000052,src:000000,op:flip1,pos:42,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000052,src:000000,op:flip1,pos:47,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000053,src:000000,op:flip1,pos:42,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000053,src:000000,op:flip1,pos:47,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000054,src:000000,op:flip1,pos:43,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000054,src:000000,op:flip1,pos:49,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000055,src:000000,op:flip1,pos:43,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000055,src:000000,op:flip1,pos:52,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000056,src:000000,op:flip1,pos:44,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000056,src:000000,op:flip1,pos:52,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000057,src:000000,op:flip1,pos:47,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000057,src:000000,op:flip1,pos:54,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000058,src:000000,op:flip1,pos:47,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000058,src:000000,op:flip1,pos:54,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000059,src:000000,op:flip1,pos:48,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000059,src:000000,op:flip1,pos:55,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000060,src:000000,op:flip1,pos:49,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000060,src:000000,op:flip1,pos:56,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000061,src:000000,op:flip1,pos:50,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000061,src:000000,op:flip1,pos:59,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000062,src:000000,op:flip1,pos:51,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000062,src:000000,op:flip1,pos:60,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000063,src:000000,op:flip1,pos:54 (100%) rename src/{mint => exchange}/afl-tests/id:000063,src:000000,op:flip1,pos:61,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000064,src:000000,op:flip1,pos:55,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000064,src:000000,op:flip1,pos:62,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000065,src:000000,op:flip1,pos:55,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000065,src:000000,op:flip1,pos:63,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000066,src:000000,op:flip1,pos:56,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000066,src:000000,op:flip1,pos:63,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000067,src:000000,op:flip1,pos:58,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000067,src:000000,op:flip1,pos:65,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000068,src:000000,op:flip1,pos:60,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000068,src:000000,op:flip1,pos:66,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000069,src:000000,op:flip1,pos:61,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000069,src:000000,op:flip1,pos:67,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000070,src:000000,op:flip1,pos:62,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000070,src:000000,op:flip1,pos:69,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000071,src:000000,op:flip1,pos:62,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000071,src:000000,op:flip1,pos:74,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000072,src:000000,op:flip1,pos:63,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000072,src:000000,op:flip1,pos:76,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000073,src:000000,op:flip1,pos:64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000073,src:000000,op:flip1,pos:81,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000074,src:000000,op:flip1,pos:65,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000074,src:000000,op:flip1,pos:82,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000075,src:000000,op:flip1,pos:71,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000075,src:000000,op:flip1,pos:82,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000076,src:000000,op:flip1,pos:71 (100%) rename src/{mint => exchange}/afl-tests/id:000076,src:000000,op:flip1,pos:83,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000077,src:000000,op:flip1,pos:72,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000077,src:000000,op:flip1,pos:85,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000078,src:000000,op:flip1,pos:73,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000078,src:000000,op:flip1,pos:87,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000079,src:000000,op:flip1,pos:74,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000079,src:000000,op:flip1,pos:87,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000080,src:000000,op:flip1,pos:75,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000080,src:000000,op:flip1,pos:87,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000081,src:000000,op:flip1,pos:75,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000081,src:000000,op:flip1,pos:90,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000082,src:000000,op:flip1,pos:76,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000082,src:000000,op:flip1,pos:92,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000083,src:000000,op:flip1,pos:78,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000083,src:000000,op:flip1,pos:93,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000084,src:000000,op:flip1,pos:80,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000084,src:000000,op:flip1,pos:95,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000085,src:000000,op:flip1,pos:80,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000085,src:000000,op:flip1,pos:95,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000086,src:000000,op:flip1,pos:81,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000086,src:000000,op:flip1,pos:96,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000087,src:000000,op:flip1,pos:82,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000087,src:000000,op:flip1,pos:96,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000088,src:000000,op:flip1,pos:100,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000088,src:000000,op:flip1,pos:82,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000089,src:000000,op:flip1,pos:105 (100%) rename src/{mint => exchange}/afl-tests/id:000089,src:000000,op:flip1,pos:84,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000090,src:000000,op:flip1,pos:113,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000090,src:000000,op:flip1,pos:84,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000091,src:000000,op:flip1,pos:114,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000091,src:000000,op:flip1,pos:91,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000092,src:000000,op:flip1,pos:121,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000092,src:000000,op:flip1,pos:92,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000093,src:000000,op:flip1,pos:123,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000093,src:000000,op:flip1,pos:93,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000094,src:000000,op:flip1,pos:126,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000094,src:000000,op:flip1,pos:95,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000095,src:000000,op:flip1,pos:135,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000095,src:000000,op:flip1,pos:96,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000096,src:000000,op:flip1,pos:135,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000096,src:000000,op:flip1,pos:96,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000097,src:000000,op:flip1,pos:135,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000097,src:000000,op:flip1,pos:97,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000098,src:000000,op:flip1,pos:105 (100%) rename src/{mint => exchange}/afl-tests/id:000098,src:000000,op:flip1,pos:136,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000099,src:000000,op:flip1,pos:106 (100%) rename src/{mint => exchange}/afl-tests/id:000099,src:000000,op:flip1,pos:136,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000100,src:000000,op:flip1,pos:113,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000100,src:000000,op:flip1,pos:136,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000101,src:000000,op:flip1,pos:114,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000101,src:000000,op:flip1,pos:136,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000102,src:000000,op:flip1,pos:121,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000102,src:000000,op:flip1,pos:137,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000103,src:000000,op:flip1,pos:130,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000103,src:000000,op:flip1,pos:138,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000104,src:000000,op:flip1,pos:136,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000104,src:000000,op:flip1,pos:138,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000105,src:000000,op:flip1,pos:137,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000105,src:000000,op:flip1,pos:139,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000106,src:000000,op:flip1,pos:137,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000106,src:000000,op:flip1,pos:139,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000107,src:000000,op:flip1,pos:139,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000107,src:000000,op:flip1,pos:140,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000108,src:000000,op:flip1,pos:140,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000108,src:000000,op:flip1,pos:141,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000109,src:000000,op:flip1,pos:140,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000109,src:000000,op:flip1,pos:141,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000110,src:000000,op:flip1,pos:141,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000110,src:000000,op:flip1,pos:143,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000111,src:000000,op:flip1,pos:141,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000111,src:000000,op:flip1,pos:145,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000112,src:000000,op:flip1,pos:142,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000112,src:000000,op:flip1,pos:147,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000113,src:000000,op:flip1,pos:143,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000113,src:000000,op:flip1,pos:147,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000114,src:000000,op:flip1,pos:144,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000114,src:000000,op:flip1,pos:150,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000115,src:000000,op:flip1,pos:147,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000115,src:000000,op:flip1,pos:153,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000116,src:000000,op:flip1,pos:150,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000116,src:000000,op:flip1,pos:154,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000117,src:000000,op:flip1,pos:151,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000117,src:000000,op:flip1,pos:155,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000118,src:000000,op:flip1,pos:151,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000118,src:000000,op:flip1,pos:157,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000119,src:000000,op:flip1,pos:154,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000119,src:000000,op:flip1,pos:158,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000120,src:000000,op:flip1,pos:155,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000120,src:000000,op:flip1,pos:158,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000121,src:000000,op:flip1,pos:156,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000121,src:000000,op:flip1,pos:159,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000122,src:000000,op:flip1,pos:157,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000122,src:000000,op:flip1,pos:159,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000123,src:000000,op:flip1,pos:160,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000123,src:000000,op:flip1,pos:161,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000124,src:000000,op:flip1,pos:161,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000124,src:000000,op:flip1,pos:164,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000125,src:000000,op:flip1,pos:161,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000125,src:000000,op:flip1,pos:166,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000126,src:000000,op:flip1,pos:163 (100%) rename src/{mint => exchange}/afl-tests/id:000126,src:000000,op:flip1,pos:166,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000127,src:000000,op:flip1,pos:166,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000127,src:000000,op:flip1,pos:167,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000128,src:000000,op:flip1,pos:167,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000128,src:000000,op:flip1,pos:170,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000129,src:000000,op:flip1,pos:168,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000129,src:000000,op:flip1,pos:173,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000130,src:000000,op:flip1,pos:171,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000130,src:000000,op:flip1,pos:173,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000131,src:000000,op:flip1,pos:172,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000131,src:000000,op:flip1,pos:174,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000132,src:000000,op:flip1,pos:173,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000132,src:000000,op:flip1,pos:176,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000133,src:000000,op:flip1,pos:173,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000133,src:000000,op:flip1,pos:178,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000134,src:000000,op:flip1,pos:174,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000134,src:000000,op:flip1,pos:178,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000135,src:000000,op:flip1,pos:179,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000135,src:000000,op:flip1,pos:180 (100%) rename src/{mint => exchange}/afl-tests/id:000136,src:000000,op:flip1,pos:182,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000136,src:000000,op:flip1,pos:183,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000137,src:000000,op:flip1,pos:182,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000137,src:000000,op:flip1,pos:184,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000138,src:000000,op:flip1,pos:183 (100%) rename src/{mint => exchange}/afl-tests/id:000138,src:000000,op:flip1,pos:185,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000139,src:000000,op:flip1,pos:183,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000139,src:000000,op:flip1,pos:190 (100%) rename src/{mint => exchange}/afl-tests/id:000140,src:000000,op:flip1,pos:185,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000140,src:000000,op:flip1,pos:200,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000141,src:000000,op:flip1,pos:185,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000141,src:000000,op:flip1,pos:205,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000142,src:000000,op:flip1,pos:190 (100%) rename src/{mint => exchange}/afl-tests/id:000142,src:000000,op:flip1,pos:211,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000143,src:000000,op:flip1,pos:193,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000143,src:000000,op:flip1,pos:238,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000144,src:000000,op:flip1,pos:200,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000144,src:000000,op:flip1,pos:238,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000145,src:000000,op:flip1,pos:211,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000145,src:000000,op:flip1,pos:241,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000146,src:000000,op:flip1,pos:223,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000146,src:000000,op:flip1,pos:245 (100%) rename src/{mint => exchange}/afl-tests/id:000147,src:000000,op:flip1,pos:245 (100%) rename src/{mint => exchange}/afl-tests/id:000147,src:000000,op:flip1,pos:255,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000148,src:000000,op:flip1,pos:262,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000149,src:000000,op:flip1,pos:268,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000149,src:000000,op:flip1,pos:270,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000150,src:000000,op:flip1,pos:269,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000150,src:000000,op:flip1,pos:279,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000151,src:000000,op:flip1,pos:270,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000151,src:000000,op:flip1,pos:279,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000152,src:000000,op:flip1,pos:271,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000152,src:000000,op:flip1,pos:283,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000153,src:000000,op:flip1,pos:271,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000153,src:000000,op:flip1,pos:291,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000154,src:000000,op:flip1,pos:274,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000154,src:000000,op:flip1,pos:298,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000155,src:000000,op:flip1,pos:279,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000155,src:000000,op:flip1,pos:302,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000156,src:000000,op:flip1,pos:281,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000156,src:000000,op:flip1,pos:305,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000157,src:000000,op:flip1,pos:283,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000157,src:000000,op:flip1,pos:307,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000158,src:000000,op:flip1,pos:291,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000158,src:000000,op:flip1,pos:313,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000159,src:000000,op:flip1,pos:298,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000159,src:000000,op:flip1,pos:313,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000160,src:000000,op:flip1,pos:299,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000160,src:000000,op:flip1,pos:314,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000161,src:000000,op:flip1,pos:306,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000161,src:000000,op:flip1,pos:314,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000162,src:000000,op:flip1,pos:308,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000162,src:000000,op:flip1,pos:315,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000163,src:000000,op:flip1,pos:312,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000163,src:000000,op:flip1,pos:316,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000164,src:000000,op:flip1,pos:315,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000164,src:000000,op:flip1,pos:317 (100%) rename src/{mint => exchange}/afl-tests/id:000165,src:000000,op:flip1,pos:316,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000165,src:000000,op:flip1,pos:317,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000166,src:000000,op:flip1,pos:316,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000166,src:000000,op:flip1,pos:319,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000167,src:000000,op:flip1,pos:317,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000167,src:000000,op:flip1,pos:320,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000168,src:000000,op:flip1,pos:317,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000168,src:000000,op:flip1,pos:322,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000169,src:000000,op:flip1,pos:318,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000169,src:000000,op:flip1,pos:326,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000170,src:000000,op:flip1,pos:319,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000170,src:000000,op:flip1,pos:328,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000171,src:000000,op:flip1,pos:326,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000171,src:000000,op:flip1,pos:329 (100%) rename src/{mint => exchange}/afl-tests/id:000172,src:000000,op:flip1,pos:327 (100%) rename src/{mint => exchange}/afl-tests/id:000172,src:000000,op:flip1,pos:332,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000173,src:000000,op:flip1,pos:330,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000173,src:000000,op:flip2,pos:8,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000174,src:000000,op:flip1,pos:331,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000174,src:000000,op:flip2,pos:8,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000175,src:000000,op:flip1,pos:338,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000175,src:000000,op:flip2,pos:28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000176,src:000000,op:flip2,pos:30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000176,src:000000,op:flip2,pos:8,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000177,src:000000,op:flip2,pos:25,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000177,src:000000,op:flip2,pos:30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000178,src:000000,op:flip2,pos:26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000178,src:000000,op:flip2,pos:31,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000179,src:000000,op:flip2,pos:29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000179,src:000000,op:flip2,pos:31,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000180,src:000000,op:flip2,pos:30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000180,src:000000,op:flip2,pos:32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000181,src:000000,op:flip2,pos:33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000181,src:000000,op:flip2,pos:36,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000182,src:000000,op:flip2,pos:38 (100%) rename src/{mint => exchange}/afl-tests/id:000183,src:000000,op:flip2,pos:39,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000184,src:000000,op:flip2,pos:40,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000184,src:000000,op:flip2,pos:43,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000185,src:000000,op:flip2,pos:40,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000185,src:000000,op:flip2,pos:49,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000186,src:000000,op:flip2,pos:40,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000186,src:000000,op:flip2,pos:54,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000187,src:000000,op:flip2,pos:46,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000187,src:000000,op:flip2,pos:60,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000188,src:000000,op:flip2,pos:47,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000188,src:000000,op:flip2,pos:64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000189,src:000000,op:flip2,pos:48,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000189,src:000000,op:flip2,pos:69,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000190,src:000000,op:flip2,pos:49,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000190,src:000000,op:flip2,pos:71,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000191,src:000000,op:flip2,pos:53,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000191,src:000000,op:flip2,pos:73,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000192,src:000000,op:flip2,pos:53,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000192,src:000000,op:flip2,pos:73,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000193,src:000000,op:flip2,pos:62,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000193,src:000000,op:flip2,pos:75 (100%) rename src/{mint => exchange}/afl-tests/id:000194,src:000000,op:flip2,pos:68,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000194,src:000000,op:flip2,pos:77,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000195,src:000000,op:flip2,pos:70,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000195,src:000000,op:flip2,pos:81,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000196,src:000000,op:flip2,pos:73,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000196,src:000000,op:flip2,pos:81,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000197,src:000000,op:flip2,pos:73,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000197,src:000000,op:flip2,pos:83,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000198,src:000000,op:flip2,pos:76,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000198,src:000000,op:flip2,pos:84,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000199,src:000000,op:flip2,pos:76,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000199,src:000000,op:flip2,pos:85,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000200,src:000000,op:flip2,pos:80,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000200,src:000000,op:flip2,pos:86,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000201,src:000000,op:flip2,pos:86,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000201,src:000000,op:flip2,pos:89,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000202,src:000000,op:flip2,pos:101,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000202,src:000000,op:flip2,pos:90,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000203,src:000000,op:flip2,pos:114 (100%) rename src/{mint => exchange}/afl-tests/id:000203,src:000000,op:flip2,pos:93,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000204,src:000000,op:flip2,pos:100,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000204,src:000000,op:flip2,pos:115,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000205,src:000000,op:flip2,pos:114 (100%) rename src/{mint => exchange}/afl-tests/id:000205,src:000000,op:flip2,pos:116,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000206,src:000000,op:flip2,pos:115,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000206,src:000000,op:flip2,pos:140,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000207,src:000000,op:flip2,pos:116,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000207,src:000000,op:flip2,pos:140,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000208,src:000000,op:flip2,pos:124,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000208,src:000000,op:flip2,pos:146,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000209,src:000000,op:flip2,pos:135,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000209,src:000000,op:flip2,pos:147,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000210,src:000000,op:flip2,pos:137,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000210,src:000000,op:flip2,pos:148,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000211,src:000000,op:flip2,pos:138,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000211,src:000000,op:flip2,pos:148,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000212,src:000000,op:flip2,pos:138,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000212,src:000000,op:flip2,pos:159,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000213,src:000000,op:flip2,pos:139,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000213,src:000000,op:flip2,pos:161,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000214,src:000000,op:flip2,pos:143,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000214,src:000000,op:flip2,pos:164,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000215,src:000000,op:flip2,pos:146,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000215,src:000000,op:flip2,pos:164,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000216,src:000000,op:flip2,pos:156,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000216,src:000000,op:flip2,pos:166,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000217,src:000000,op:flip2,pos:161,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000217,src:000000,op:flip2,pos:170,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000218,src:000000,op:flip2,pos:171,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000218,src:000000,op:flip2,pos:176,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000219,src:000000,op:flip2,pos:180 (100%) rename src/{mint => exchange}/afl-tests/id:000219,src:000000,op:flip2,pos:185,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000220,src:000000,op:flip2,pos:184,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000220,src:000000,op:flip2,pos:193,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000221,src:000000,op:flip2,pos:211,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000221,src:000000,op:flip2,pos:226,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000222,src:000000,op:flip2,pos:218,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000222,src:000000,op:flip2,pos:232,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000223,src:000000,op:flip2,pos:239,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000223,src:000000,op:flip2,pos:271,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000224,src:000000,op:flip2,pos:241,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000224,src:000000,op:flip2,pos:279,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000225,src:000000,op:flip2,pos:250,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000225,src:000000,op:flip2,pos:308,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000226,src:000000,op:flip2,pos:272,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000226,src:000000,op:flip2,pos:315,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000227,src:000000,op:flip2,pos:277,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000227,src:000000,op:flip2,pos:316,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000228,src:000000,op:flip2,pos:316,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000228,src:000000,op:flip2,pos:317,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000229,src:000000,op:flip2,pos:316,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000229,src:000000,op:flip2,pos:319,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000230,src:000000,op:flip2,pos:316,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000230,src:000000,op:flip2,pos:320,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000231,src:000000,op:flip2,pos:317,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000231,src:000000,op:flip2,pos:326,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000232,src:000000,op:flip2,pos:320,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000232,src:000000,op:flip2,pos:327,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000233,src:000000,op:flip2,pos:321,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000233,src:000000,op:flip2,pos:331,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000234,src:000000,op:flip2,pos:327,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000234,src:000000,op:flip4,pos:5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000235,src:000000,op:flip2,pos:328,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000235,src:000000,op:flip4,pos:20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000236,src:000000,op:flip2,pos:330,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000236,src:000000,op:flip4,pos:27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000237,src:000000,op:flip2,pos:331,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000237,src:000000,op:flip4,pos:30 (100%) rename src/{mint => exchange}/afl-tests/id:000238,src:000000,op:flip4,pos:32 (100%) rename src/{mint => exchange}/afl-tests/id:000238,src:000000,op:flip4,pos:5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000239,src:000000,op:flip4,pos:25,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000239,src:000000,op:flip4,pos:34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000240,src:000000,op:flip4,pos:29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000240,src:000000,op:flip4,pos:35 (100%) rename src/{mint => exchange}/afl-tests/id:000241,src:000000,op:flip4,pos:30 (100%) rename src/{mint => exchange}/afl-tests/id:000241,src:000000,op:flip4,pos:36 (100%) rename src/{mint => exchange}/afl-tests/id:000242,src:000000,op:flip4,pos:32 (100%) rename src/{mint => exchange}/afl-tests/id:000242,src:000000,op:flip4,pos:39,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000243,src:000000,op:flip4,pos:37,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000243,src:000000,op:flip4,pos:44,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000244,src:000000,op:flip4,pos:39,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000244,src:000000,op:flip4,pos:48,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000245,src:000000,op:flip4,pos:45,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000245,src:000000,op:flip4,pos:56,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000246,src:000000,op:flip4,pos:47,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000246,src:000000,op:flip4,pos:59,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000247,src:000000,op:flip4,pos:50,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000247,src:000000,op:flip4,pos:65,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000248,src:000000,op:flip4,pos:60,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000248,src:000000,op:flip4,pos:68,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000249,src:000000,op:flip4,pos:68,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000250,src:000000,op:flip4,pos:68,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000250,src:000000,op:flip4,pos:73,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000251,src:000000,op:flip4,pos:74,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000251,src:000000,op:flip4,pos:81,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000252,src:000000,op:flip4,pos:75,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000252,src:000000,op:flip4,pos:82,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000253,src:000000,op:flip4,pos:75,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000253,src:000000,op:flip4,pos:85,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000254,src:000000,op:flip4,pos:76,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000254,src:000000,op:flip4,pos:88,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000255,src:000000,op:flip4,pos:81,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000255,src:000000,op:flip4,pos:91,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000256,src:000000,op:flip4,pos:83,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000256,src:000000,op:flip4,pos:94,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000257,src:000000,op:flip4,pos:86,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000257,src:000000,op:flip4,pos:95,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000258,src:000000,op:flip4,pos:88,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000258,src:000000,op:flip4,pos:95,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000259,src:000000,op:flip4,pos:114 (100%) rename src/{mint => exchange}/afl-tests/id:000259,src:000000,op:flip4,pos:91,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000260,src:000000,op:flip4,pos:112,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000260,src:000000,op:flip4,pos:137,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000261,src:000000,op:flip4,pos:139,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000261,src:000000,op:flip4,pos:147,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000262,src:000000,op:flip4,pos:142,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000262,src:000000,op:flip4,pos:164,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000263,src:000000,op:flip4,pos:147,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000263,src:000000,op:flip4,pos:169,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000264,src:000000,op:flip4,pos:157,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000264,src:000000,op:flip4,pos:172,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000265,src:000000,op:flip4,pos:157,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000265,src:000000,op:flip4,pos:175,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000266,src:000000,op:flip4,pos:176,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000266,src:000000,op:flip4,pos:177,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000267,src:000000,op:flip4,pos:179,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000267,src:000000,op:flip4,pos:225,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000268,src:000000,op:flip4,pos:183,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000268,src:000000,op:flip4,pos:258,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000269,src:000000,op:flip4,pos:262,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000269,src:000000,op:flip4,pos:270,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000270,src:000000,op:flip4,pos:276,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000270,src:000000,op:flip4,pos:280,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000271,src:000000,op:flip4,pos:284,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000271,src:000000,op:flip4,pos:307,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000272,src:000000,op:flip4,pos:314,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000272,src:000000,op:flip4,pos:317,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000273,src:000000,op:flip4,pos:318,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000273,src:000000,op:flip4,pos:328,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000274,src:000000,op:flip4,pos:330,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000275,src:000000,op:flip4,pos:331,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000275,src:000000,op:flip8,pos:32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000276,src:000000,op:flip8,pos:43,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000276,src:000000,op:flip8,pos:47,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000277,src:000000,op:flip8,pos:190,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000277,src:000000,op:flip8,pos:52,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000278,src:000000,op:flip16,pos:51,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000278,src:000000,op:flip8,pos:62,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000279,src:000000,op:flip16,pos:219,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000279,src:000000,op:flip8,pos:87,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000280,src:000000,op:flip32,pos:55,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000280,src:000000,op:flip8,pos:88,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000281,src:000000,op:flip32,pos:68,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000281,src:000000,op:flip8,pos:331,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000282,src:000000,op:arith8,pos:4,val:-19 (100%) rename src/{mint => exchange}/afl-tests/id:000282,src:000000,op:flip16,pos:39,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000283,src:000000,op:arith8,pos:4,val:-22 (100%) rename src/{mint => exchange}/afl-tests/id:000283,src:000000,op:flip16,pos:85,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000284,src:000000,op:arith8,pos:5,val:-10,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000284,src:000000,op:flip32,pos:49,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000285,src:000000,op:arith8,pos:5,val:-34 (100%) rename src/{mint => exchange}/afl-tests/id:000285,src:000000,op:flip32,pos:62 (100%) rename src/{mint => exchange}/afl-tests/id:000286,src:000000,op:arith8,pos:6,val:-34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000286,src:000000,op:flip32,pos:86,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000287,src:000000,op:arith8,pos:11,val:-34 (100%) rename src/{mint => exchange}/afl-tests/id:000287,src:000000,op:flip32,pos:92,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000288,src:000000,op:arith8,pos:15,val:-10,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000288,src:000000,op:arith8,pos:4,val:-19 (100%) rename src/{mint => exchange}/afl-tests/id:000289,src:000000,op:arith8,pos:22,val:+5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000289,src:000000,op:arith8,pos:4,val:-22 (100%) rename src/{mint => exchange}/afl-tests/id:000290,src:000000,op:arith8,pos:24,val:+10,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000290,src:000000,op:arith8,pos:5,val:-10,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000291,src:000000,op:arith8,pos:25,val:-6,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000291,src:000000,op:arith8,pos:5,val:-34 (100%) rename src/{mint => exchange}/afl-tests/id:000292,src:000000,op:arith8,pos:25,val:-25,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000292,src:000000,op:arith8,pos:6,val:-34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000293,src:000000,op:arith8,pos:25,val:-29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000293,src:000000,op:arith8,pos:7,val:-34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000294,src:000000,op:arith8,pos:11,val:-34 (100%) rename src/{mint => exchange}/afl-tests/id:000294,src:000000,op:arith8,pos:26,val:+12,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000295,src:000000,op:arith8,pos:15,val:-10,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000295,src:000000,op:arith8,pos:26,val:+17,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000296,src:000000,op:arith8,pos:25,val:+24,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000296,src:000000,op:arith8,pos:27,val:-29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000297,src:000000,op:arith8,pos:27,val:+26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000297,src:000000,op:arith8,pos:27,val:+33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000298,src:000000,op:arith8,pos:28,val:+13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000298,src:000000,op:arith8,pos:28,val:+9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000299,src:000000,op:arith8,pos:28,val:-15,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000299,src:000000,op:arith8,pos:28,val:-17 (100%) rename src/{mint => exchange}/afl-tests/id:000300,src:000000,op:arith8,pos:28,val:+27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000300,src:000000,op:arith8,pos:28,val:-33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000301,src:000000,op:arith8,pos:28,val:-31,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000301,src:000000,op:arith8,pos:29,val:+14,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000302,src:000000,op:arith8,pos:29,val:-29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000302,src:000000,op:arith8,pos:30,val:+3,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000303,src:000000,op:arith8,pos:30,val:+18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000303,src:000000,op:arith8,pos:30,val:+31,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000304,src:000000,op:arith8,pos:31,val:+19,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000304,src:000000,op:arith8,pos:31,val:-33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000305,src:000000,op:arith8,pos:31,val:-29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000305,src:000000,op:arith8,pos:32,val:+19,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000306,src:000000,op:arith8,pos:31,val:-33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000306,src:000000,op:arith8,pos:33,val:+15,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000307,src:000000,op:arith8,pos:31,val:+34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000307,src:000000,op:arith8,pos:33,val:-15,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000308,src:000000,op:arith8,pos:32,val:+10,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000308,src:000000,op:arith8,pos:34,val:-27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000309,src:000000,op:arith8,pos:32,val:-20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000309,src:000000,op:arith8,pos:34,val:+34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000310,src:000000,op:arith8,pos:33,val:+20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000310,src:000000,op:arith8,pos:35,val:+18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000311,src:000000,op:arith8,pos:33,val:+24,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000311,src:000000,op:arith8,pos:35,val:-27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000312,src:000000,op:arith8,pos:34,val:-3,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000312,src:000000,op:arith8,pos:35,val:+35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000313,src:000000,op:arith8,pos:34,val:+18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000313,src:000000,op:arith8,pos:36,val:+13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000314,src:000000,op:arith8,pos:34,val:-30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000314,src:000000,op:arith8,pos:36,val:+32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000315,src:000000,op:arith8,pos:35,val:+17,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000315,src:000000,op:arith8,pos:37,val:+24,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000316,src:000000,op:arith8,pos:35,val:-19,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000316,src:000000,op:arith8,pos:37,val:+32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000317,src:000000,op:arith8,pos:36,val:-26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000317,src:000000,op:arith8,pos:38,val:-35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000318,src:000000,op:arith8,pos:36,val:+27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000318,src:000000,op:arith8,pos:39,val:+18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000319,src:000000,op:arith8,pos:36,val:+32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000319,src:000000,op:arith8,pos:39,val:-23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000320,src:000000,op:arith8,pos:37,val:-9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000320,src:000000,op:arith8,pos:39,val:-24,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000321,src:000000,op:arith8,pos:37,val:+21 (100%) rename src/{mint => exchange}/afl-tests/id:000321,src:000000,op:arith8,pos:39,val:+25,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000322,src:000000,op:arith8,pos:37,val:+24,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000322,src:000000,op:arith8,pos:40,val:-21,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000323,src:000000,op:arith8,pos:39,val:+13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000323,src:000000,op:arith8,pos:41,val:-5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000324,src:000000,op:arith8,pos:39,val:-23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000324,src:000000,op:arith8,pos:41,val:+13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000325,src:000000,op:arith8,pos:40,val:+20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000325,src:000000,op:arith8,pos:41,val:+26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000326,src:000000,op:arith8,pos:40,val:+27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000326,src:000000,op:arith8,pos:41,val:+27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000327,src:000000,op:arith8,pos:41,val:-33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000327,src:000000,op:arith8,pos:42,val:+29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000328,src:000000,op:arith8,pos:41,val:+35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000328,src:000000,op:arith8,pos:43,val:-33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000329,src:000000,op:arith8,pos:42,val:-6,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000329,src:000000,op:arith8,pos:44,val:+17,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000330,src:000000,op:arith8,pos:42,val:+13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000330,src:000000,op:arith8,pos:45,val:-5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000331,src:000000,op:arith8,pos:42,val:+18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000331,src:000000,op:arith8,pos:45,val:-11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000332,src:000000,op:arith8,pos:43,val:-23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000332,src:000000,op:arith8,pos:45,val:+19,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000333,src:000000,op:arith8,pos:43,val:+33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000333,src:000000,op:arith8,pos:51,val:-12,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000334,src:000000,op:arith8,pos:44,val:+11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000334,src:000000,op:arith8,pos:51,val:+14,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000335,src:000000,op:arith8,pos:45,val:-24,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000335,src:000000,op:arith8,pos:51,val:-22,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000336,src:000000,op:arith8,pos:45,val:-27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000336,src:000000,op:arith8,pos:51,val:-23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000337,src:000000,op:arith8,pos:46,val:+7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000337,src:000000,op:arith8,pos:52,val:-14,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000338,src:000000,op:arith8,pos:46,val:-21,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000338,src:000000,op:arith8,pos:52,val:+28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000339,src:000000,op:arith8,pos:46,val:+31,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000339,src:000000,op:arith8,pos:53,val:+9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000340,src:000000,op:arith8,pos:49,val:+16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000340,src:000000,op:arith8,pos:53,val:-11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000341,src:000000,op:arith8,pos:49,val:-26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000341,src:000000,op:arith8,pos:53,val:-17,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000342,src:000000,op:arith8,pos:49,val:+34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000342,src:000000,op:arith8,pos:53,val:-18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000343,src:000000,op:arith8,pos:50,val:-7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000343,src:000000,op:arith8,pos:53,val:-35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000344,src:000000,op:arith8,pos:50,val:+22,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000344,src:000000,op:arith8,pos:54,val:-15,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000345,src:000000,op:arith8,pos:50,val:+24,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000345,src:000000,op:arith8,pos:54,val:-22,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000346,src:000000,op:arith8,pos:50,val:-31,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000346,src:000000,op:arith8,pos:55,val:-7 (100%) rename src/{mint => exchange}/afl-tests/id:000347,src:000000,op:arith8,pos:51,val:-1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000347,src:000000,op:arith8,pos:55,val:-33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000348,src:000000,op:arith8,pos:51,val:+18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000348,src:000000,op:arith8,pos:55,val:-35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000349,src:000000,op:arith8,pos:52,val:-6,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000349,src:000000,op:arith8,pos:57,val:-14,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000350,src:000000,op:arith8,pos:52,val:+22,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000350,src:000000,op:arith8,pos:57,val:+28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000351,src:000000,op:arith8,pos:52,val:-31,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000351,src:000000,op:arith8,pos:57,val:-29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000352,src:000000,op:arith8,pos:53,val:-18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000352,src:000000,op:arith8,pos:58,val:-29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000353,src:000000,op:arith8,pos:53,val:+27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000353,src:000000,op:arith8,pos:59,val:+10,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000354,src:000000,op:arith8,pos:53,val:-27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000354,src:000000,op:arith8,pos:59,val:+23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000355,src:000000,op:arith8,pos:53,val:-28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000355,src:000000,op:arith8,pos:62,val:+9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000356,src:000000,op:arith8,pos:55,val:-2,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000356,src:000000,op:arith8,pos:62,val:-21,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000357,src:000000,op:arith8,pos:55,val:-7 (100%) rename src/{mint => exchange}/afl-tests/id:000357,src:000000,op:arith8,pos:62,val:-23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000358,src:000000,op:arith8,pos:55,val:-33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000358,src:000000,op:arith8,pos:62,val:-35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000359,src:000000,op:arith8,pos:56,val:-17,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000359,src:000000,op:arith8,pos:63,val:+3,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000360,src:000000,op:arith8,pos:56,val:+34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000360,src:000000,op:arith8,pos:64,val:-5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000361,src:000000,op:arith8,pos:57,val:-23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000361,src:000000,op:arith8,pos:64,val:-26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000362,src:000000,op:arith8,pos:58,val:+34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000362,src:000000,op:arith8,pos:65,val:-10,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000363,src:000000,op:arith8,pos:60,val:-14,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000363,src:000000,op:arith8,pos:65,val:-27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000364,src:000000,op:arith8,pos:60,val:-15,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000364,src:000000,op:arith8,pos:65,val:-30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000365,src:000000,op:arith8,pos:60,val:-27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000365,src:000000,op:arith8,pos:66,val:+13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000366,src:000000,op:arith8,pos:62,val:+13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000366,src:000000,op:arith8,pos:67,val:-9 (100%) rename src/{mint => exchange}/afl-tests/id:000367,src:000000,op:arith8,pos:62,val:-21,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000367,src:000000,op:arith8,pos:67,val:+15,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000368,src:000000,op:arith8,pos:62,val:-23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000368,src:000000,op:arith8,pos:67,val:-35 (100%) rename src/{mint => exchange}/afl-tests/id:000369,src:000000,op:arith8,pos:63,val:+6,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000369,src:000000,op:arith8,pos:72,val:+30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000370,src:000000,op:arith8,pos:63,val:-18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000370,src:000000,op:arith8,pos:72,val:-35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000371,src:000000,op:arith8,pos:63,val:-28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000371,src:000000,op:arith8,pos:74,val:+5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000372,src:000000,op:arith8,pos:64,val:-5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000372,src:000000,op:arith8,pos:75,val:-23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000373,src:000000,op:arith8,pos:64,val:-13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000373,src:000000,op:arith8,pos:75,val:+28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000374,src:000000,op:arith8,pos:64,val:-18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000374,src:000000,op:arith8,pos:76,val:-5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000375,src:000000,op:arith8,pos:64,val:-35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000375,src:000000,op:arith8,pos:76,val:-20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000376,src:000000,op:arith8,pos:65,val:-27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000376,src:000000,op:arith8,pos:77,val:-5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000377,src:000000,op:arith8,pos:65,val:+29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000377,src:000000,op:arith8,pos:77,val:+25,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000378,src:000000,op:arith8,pos:66,val:-20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000378,src:000000,op:arith8,pos:80,val:+20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000379,src:000000,op:arith8,pos:66,val:+28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000379,src:000000,op:arith8,pos:81,val:+20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000380,src:000000,op:arith8,pos:66,val:-31,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000380,src:000000,op:arith8,pos:82,val:-5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000381,src:000000,op:arith8,pos:67,val:-9 (100%) rename src/{mint => exchange}/afl-tests/id:000381,src:000000,op:arith8,pos:83,val:-18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000382,src:000000,op:arith8,pos:67,val:+10,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000382,src:000000,op:arith8,pos:84,val:+10,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000383,src:000000,op:arith8,pos:67,val:-15,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000383,src:000000,op:arith8,pos:84,val:-30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000384,src:000000,op:arith8,pos:67,val:-35 (100%) rename src/{mint => exchange}/afl-tests/id:000384,src:000000,op:arith8,pos:84,val:+34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000385,src:000000,op:arith8,pos:68,val:+32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000385,src:000000,op:arith8,pos:86,val:-9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000386,src:000000,op:arith8,pos:69,val:+14,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000386,src:000000,op:arith8,pos:86,val:-19,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000387,src:000000,op:arith8,pos:70,val:-21,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000387,src:000000,op:arith8,pos:87,val:+10,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000388,src:000000,op:arith8,pos:71,val:+3 (100%) rename src/{mint => exchange}/afl-tests/id:000388,src:000000,op:arith8,pos:87,val:+15,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000389,src:000000,op:arith8,pos:72,val:-7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000389,src:000000,op:arith8,pos:87,val:-26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000390,src:000000,op:arith8,pos:72,val:+30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000390,src:000000,op:arith8,pos:88,val:+9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000391,src:000000,op:arith8,pos:73,val:-13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000391,src:000000,op:arith8,pos:88,val:+25 (100%) rename src/{mint => exchange}/afl-tests/id:000392,src:000000,op:arith8,pos:73,val:-29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000392,src:000000,op:arith8,pos:88,val:+26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000393,src:000000,op:arith8,pos:73,val:-35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000393,src:000000,op:arith8,pos:90,val:-33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000394,src:000000,op:arith8,pos:75,val:-20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000394,src:000000,op:arith8,pos:91,val:-14,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000395,src:000000,op:arith8,pos:76,val:+21,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000395,src:000000,op:arith8,pos:91,val:+24 (100%) rename src/{mint => exchange}/afl-tests/id:000396,src:000000,op:arith8,pos:77,val:+24,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000396,src:000000,op:arith8,pos:92,val:+11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000397,src:000000,op:arith8,pos:80,val:-11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000397,src:000000,op:arith8,pos:92,val:-23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000398,src:000000,op:arith8,pos:80,val:+18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000398,src:000000,op:arith8,pos:93,val:+19,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000399,src:000000,op:arith8,pos:81,val:+22,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000399,src:000000,op:arith8,pos:93,val:-25,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000400,src:000000,op:arith8,pos:81,val:-30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000400,src:000000,op:arith8,pos:93,val:+35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000401,src:000000,op:arith8,pos:83,val:-1 (100%) rename src/{mint => exchange}/afl-tests/id:000401,src:000000,op:arith8,pos:96,val:-5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000402,src:000000,op:arith8,pos:83,val:-22,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000402,src:000000,op:arith8,pos:96,val:+32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000403,src:000000,op:arith8,pos:83,val:+35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000403,src:000000,op:arith8,pos:96,val:-34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000404,src:000000,op:arith8,pos:84,val:+7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000404,src:000000,op:arith8,pos:98,val:-34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000405,src:000000,op:arith8,pos:84,val:+31,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000405,src:000000,op:arith8,pos:98,val:-35 (100%) rename src/{mint => exchange}/afl-tests/id:000406,src:000000,op:arith8,pos:113,val:-19 (100%) rename src/{mint => exchange}/afl-tests/id:000406,src:000000,op:arith8,pos:86,val:-11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000407,src:000000,op:arith8,pos:113,val:-22 (100%) rename src/{mint => exchange}/afl-tests/id:000407,src:000000,op:arith8,pos:86,val:+22,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000408,src:000000,op:arith8,pos:121,val:-13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000408,src:000000,op:arith8,pos:86,val:-24 (100%) rename src/{mint => exchange}/afl-tests/id:000409,src:000000,op:arith8,pos:135,val:+23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000409,src:000000,op:arith8,pos:87,val:-2,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000410,src:000000,op:arith8,pos:136,val:-9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000410,src:000000,op:arith8,pos:87,val:+9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000411,src:000000,op:arith8,pos:136,val:-21,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000411,src:000000,op:arith8,pos:87,val:-15,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000412,src:000000,op:arith8,pos:137,val:+8,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000412,src:000000,op:arith8,pos:87,val:-24,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000413,src:000000,op:arith8,pos:137,val:-11 (100%) rename src/{mint => exchange}/afl-tests/id:000413,src:000000,op:arith8,pos:88,val:+30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000414,src:000000,op:arith8,pos:137,val:-19,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000414,src:000000,op:arith8,pos:89,val:+29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000415,src:000000,op:arith8,pos:138,val:+3,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000415,src:000000,op:arith8,pos:90,val:-21,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000416,src:000000,op:arith8,pos:138,val:-12,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000416,src:000000,op:arith8,pos:91,val:+28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000417,src:000000,op:arith8,pos:139,val:-10,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000417,src:000000,op:arith8,pos:91,val:+34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000418,src:000000,op:arith8,pos:139,val:-26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000418,src:000000,op:arith8,pos:94,val:-23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000419,src:000000,op:arith8,pos:143,val:+21,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000419,src:000000,op:arith8,pos:95,val:+3,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000420,src:000000,op:arith8,pos:145,val:+15,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000420,src:000000,op:arith8,pos:95,val:-23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000421,src:000000,op:arith8,pos:146,val:-14,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000421,src:000000,op:arith8,pos:95,val:+31,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000422,src:000000,op:arith8,pos:148,val:+28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000422,src:000000,op:arith8,pos:98,val:-35 (100%) rename src/{mint => exchange}/afl-tests/id:000423,src:000000,op:arith8,pos:100,val:-33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000423,src:000000,op:arith8,pos:151,val:-35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000424,src:000000,op:arith8,pos:113,val:-19 (100%) rename src/{mint => exchange}/afl-tests/id:000424,src:000000,op:arith8,pos:152,val:-12,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000425,src:000000,op:arith8,pos:113,val:-22 (100%) rename src/{mint => exchange}/afl-tests/id:000425,src:000000,op:arith8,pos:152,val:+27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000426,src:000000,op:arith8,pos:127,val:-20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000426,src:000000,op:arith8,pos:152,val:+31,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000427,src:000000,op:arith8,pos:131,val:-20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000427,src:000000,op:arith8,pos:153,val:+20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000428,src:000000,op:arith8,pos:132,val:+6,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000428,src:000000,op:arith8,pos:154,val:+7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000429,src:000000,op:arith8,pos:135,val:-28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000429,src:000000,op:arith8,pos:156,val:+18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000430,src:000000,op:arith8,pos:135,val:-35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000430,src:000000,op:arith8,pos:156,val:+28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000431,src:000000,op:arith8,pos:136,val:+3,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000431,src:000000,op:arith8,pos:159,val:-30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000432,src:000000,op:arith8,pos:136,val:-5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000432,src:000000,op:arith8,pos:160,val:-31,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000433,src:000000,op:arith8,pos:136,val:-9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000433,src:000000,op:arith8,pos:161,val:+5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000434,src:000000,op:arith8,pos:136,val:+20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000434,src:000000,op:arith8,pos:161,val:-11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000435,src:000000,op:arith8,pos:136,val:-29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000435,src:000000,op:arith8,pos:162,val:+22 (100%) rename src/{mint => exchange}/afl-tests/id:000436,src:000000,op:arith8,pos:137,val:+7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000436,src:000000,op:arith8,pos:163,val:+19,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000437,src:000000,op:arith8,pos:137,val:+10,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000437,src:000000,op:arith8,pos:164,val:+27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000438,src:000000,op:arith8,pos:138,val:+19,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000438,src:000000,op:arith8,pos:166,val:+13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000439,src:000000,op:arith8,pos:139,val:+25,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000439,src:000000,op:arith8,pos:167,val:+33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000440,src:000000,op:arith8,pos:139,val:-26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000440,src:000000,op:arith8,pos:168,val:-17,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000441,src:000000,op:arith8,pos:140,val:+20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000441,src:000000,op:arith8,pos:168,val:+29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000442,src:000000,op:arith8,pos:141,val:+6,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000442,src:000000,op:arith8,pos:168,val:+30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000443,src:000000,op:arith8,pos:141,val:+10,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000443,src:000000,op:arith8,pos:171,val:+22,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000444,src:000000,op:arith8,pos:141,val:+13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000444,src:000000,op:arith8,pos:171,val:+25,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000445,src:000000,op:arith8,pos:141,val:+20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000445,src:000000,op:arith8,pos:172,val:-13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000446,src:000000,op:arith8,pos:142,val:+6,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000446,src:000000,op:arith8,pos:172,val:+19,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000447,src:000000,op:arith8,pos:142,val:-20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000447,src:000000,op:arith8,pos:173,val:-15,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000448,src:000000,op:arith8,pos:143,val:+17,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000448,src:000000,op:arith8,pos:174,val:+23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000449,src:000000,op:arith8,pos:144,val:+28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000449,src:000000,op:arith8,pos:174,val:+33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000450,src:000000,op:arith8,pos:145,val:+27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000450,src:000000,op:arith8,pos:176,val:+20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000451,src:000000,op:arith8,pos:146,val:-11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000451,src:000000,op:arith8,pos:177,val:+33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000452,src:000000,op:arith8,pos:146,val:-13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000452,src:000000,op:arith8,pos:181,val:+12,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000453,src:000000,op:arith8,pos:146,val:-21,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000453,src:000000,op:arith8,pos:181,val:+21 (100%) rename src/{mint => exchange}/afl-tests/id:000454,src:000000,op:arith8,pos:147,val:-3,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000454,src:000000,op:arith8,pos:181,val:+25,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000455,src:000000,op:arith8,pos:147,val:-9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000455,src:000000,op:arith8,pos:183,val:-3 (100%) rename src/{mint => exchange}/afl-tests/id:000456,src:000000,op:arith8,pos:147,val:-13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000456,src:000000,op:arith8,pos:184,val:-13 (100%) rename src/{mint => exchange}/afl-tests/id:000457,src:000000,op:arith8,pos:148,val:+12,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000457,src:000000,op:arith8,pos:184,val:-34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000458,src:000000,op:arith8,pos:151,val:-7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000458,src:000000,op:arith8,pos:185,val:-6,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000459,src:000000,op:arith8,pos:151,val:+15,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000459,src:000000,op:arith8,pos:185,val:+14,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000460,src:000000,op:arith8,pos:152,val:-7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000460,src:000000,op:arith8,pos:185,val:+29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000461,src:000000,op:arith8,pos:152,val:+25,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000461,src:000000,op:arith8,pos:186,val:+23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000462,src:000000,op:arith8,pos:152,val:-30 (100%) rename src/{mint => exchange}/afl-tests/id:000462,src:000000,op:arith8,pos:191,val:-26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000463,src:000000,op:arith8,pos:153,val:+28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000463,src:000000,op:arith8,pos:196,val:-18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000464,src:000000,op:arith8,pos:157,val:+8,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000464,src:000000,op:arith8,pos:203,val:+22,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000465,src:000000,op:arith8,pos:157,val:-9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000465,src:000000,op:arith8,pos:225,val:-6,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000466,src:000000,op:arith8,pos:157,val:-12,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000466,src:000000,op:arith8,pos:241,val:-26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000467,src:000000,op:arith8,pos:157,val:-21,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000467,src:000000,op:arith8,pos:268,val:-4,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000468,src:000000,op:arith8,pos:158,val:-9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000468,src:000000,op:arith8,pos:268,val:+7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000469,src:000000,op:arith8,pos:158,val:+25,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000469,src:000000,op:arith8,pos:269,val:+11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000470,src:000000,op:arith8,pos:159,val:-7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000470,src:000000,op:arith8,pos:272,val:+29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000471,src:000000,op:arith8,pos:159,val:+10,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000471,src:000000,op:arith8,pos:273,val:+29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000472,src:000000,op:arith8,pos:159,val:-11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000472,src:000000,op:arith8,pos:274,val:+11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000473,src:000000,op:arith8,pos:160,val:+19,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000473,src:000000,op:arith8,pos:276,val:+9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000474,src:000000,op:arith8,pos:161,val:+14,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000474,src:000000,op:arith8,pos:276,val:+19,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000475,src:000000,op:arith8,pos:162,val:+7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000475,src:000000,op:arith8,pos:277,val:+35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000476,src:000000,op:arith8,pos:163,val:+26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000476,src:000000,op:arith8,pos:278,val:+5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000477,src:000000,op:arith8,pos:163,val:+31,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000477,src:000000,op:arith8,pos:305,val:+14,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000478,src:000000,op:arith8,pos:164,val:+2,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000478,src:000000,op:arith8,pos:306,val:-20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000479,src:000000,op:arith8,pos:169,val:+7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000479,src:000000,op:arith8,pos:314,val:-17,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000480,src:000000,op:arith8,pos:169,val:-9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000480,src:000000,op:arith8,pos:315,val:-17,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000481,src:000000,op:arith8,pos:169,val:+19,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000481,src:000000,op:arith8,pos:315,val:-19,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000482,src:000000,op:arith8,pos:172,val:-3,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000482,src:000000,op:arith8,pos:315,val:-29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000483,src:000000,op:arith8,pos:172,val:-33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000483,src:000000,op:arith8,pos:316,val:+14,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000484,src:000000,op:arith8,pos:175,val:+20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000484,src:000000,op:arith8,pos:316,val:+17,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000485,src:000000,op:arith8,pos:176,val:+7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000485,src:000000,op:arith8,pos:316,val:-23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000486,src:000000,op:arith8,pos:176,val:-28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000486,src:000000,op:arith8,pos:317,val:-30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000487,src:000000,op:arith8,pos:177,val:+11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000487,src:000000,op:arith8,pos:319,val:-7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000488,src:000000,op:arith8,pos:177,val:+17,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000488,src:000000,op:arith8,pos:319,val:+9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000489,src:000000,op:arith8,pos:177,val:+22,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000489,src:000000,op:arith8,pos:320,val:-7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000490,src:000000,op:arith8,pos:178,val:-5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000490,src:000000,op:arith8,pos:320,val:-25,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000491,src:000000,op:arith8,pos:178,val:+23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000491,src:000000,op:arith8,pos:321,val:+11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000492,src:000000,op:arith8,pos:181,val:-12,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000492,src:000000,op:arith8,pos:321,val:-24,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000493,src:000000,op:arith8,pos:182,val:-15,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000493,src:000000,op:arith8,pos:322,val:-21,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000494,src:000000,op:arith8,pos:182,val:+22,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000494,src:000000,op:arith8,pos:326,val:-20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000495,src:000000,op:arith8,pos:183,val:-11 (100%) rename src/{mint => exchange}/afl-tests/id:000495,src:000000,op:arith8,pos:328,val:+27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000496,src:000000,op:arith8,pos:183,val:+15,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000496,src:000000,op:arith8,pos:328,val:-27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000497,src:000000,op:arith8,pos:184,val:-14,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000497,src:000000,op:arith8,pos:329,val:+5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000498,src:000000,op:arith8,pos:184,val:+33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000498,src:000000,op:arith8,pos:329,val:-24,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000499,src:000000,op:arith8,pos:184,val:-35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000499,src:000000,op:arith8,pos:330,val:-3,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000500,src:000000,op:arith8,pos:185,val:+3,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000500,src:000000,op:arith8,pos:331,val:-14,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000501,src:000000,op:arith8,pos:185,val:+7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000501,src:000000,op:arith8,pos:332,val:-15,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000502,src:000000,op:arith16,pos:33,val:-12,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000502,src:000000,op:arith8,pos:192,val:+9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000503,src:000000,op:arith16,pos:65,val:be:-27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000503,src:000000,op:arith8,pos:237,val:-26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000504,src:000000,op:arith8,pos:238,val:+5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000504,src:000000,op:int8,pos:6,val:+0 (100%) rename src/{mint => exchange}/afl-tests/id:000505,src:000000,op:arith8,pos:241,val:+7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000505,src:000000,op:int8,pos:7,val:+0 (100%) rename src/{mint => exchange}/afl-tests/id:000506,src:000000,op:arith8,pos:268,val:-4,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000506,src:000000,op:int8,pos:9,val:+0 (100%) rename src/{mint => exchange}/afl-tests/id:000507,src:000000,op:arith8,pos:269,val:+19,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000507,src:000000,op:int8,pos:26,val:+32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000508,src:000000,op:arith8,pos:271,val:-12,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000508,src:000000,op:int8,pos:27,val:+127,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000509,src:000000,op:arith8,pos:272,val:+7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000509,src:000000,op:int8,pos:34,val:+0,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000510,src:000000,op:arith8,pos:274,val:+11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000510,src:000000,op:int8,pos:40,val:+0,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000511,src:000000,op:arith8,pos:274,val:+25,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000511,src:000000,op:int8,pos:40,val:+32 (100%) rename src/{mint => exchange}/afl-tests/id:000512,src:000000,op:arith8,pos:275,val:-11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000512,src:000000,op:int8,pos:46,val:+1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000513,src:000000,op:arith8,pos:275,val:-12,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000513,src:000000,op:int8,pos:51,val:+1 (100%) rename src/{mint => exchange}/afl-tests/id:000514,src:000000,op:arith8,pos:275,val:+27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000514,src:000000,op:int8,pos:52,val:-128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000515,src:000000,op:arith8,pos:277,val:-10,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000515,src:000000,op:int8,pos:53,val:-1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000516,src:000000,op:arith8,pos:277,val:+35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000516,src:000000,op:int8,pos:69,val:+32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000517,src:000000,op:arith8,pos:279,val:+28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000517,src:000000,op:int8,pos:70,val:+32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000518,src:000000,op:arith8,pos:290,val:-28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000518,src:000000,op:int8,pos:71,val:+64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000519,src:000000,op:arith8,pos:305,val:-3,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000519,src:000000,op:int8,pos:74,val:-1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000520,src:000000,op:arith8,pos:306,val:+7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000520,src:000000,op:int8,pos:115,val:+0,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000521,src:000000,op:arith8,pos:306,val:-12,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000521,src:000000,op:int8,pos:188,val:+1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000522,src:000000,op:arith8,pos:306,val:+20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000522,src:000000,op:int8,pos:276,val:+100,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000523,src:000000,op:arith8,pos:307,val:+13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000523,src:000000,op:int8,pos:307,val:+32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000524,src:000000,op:arith8,pos:308,val:+19,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000524,src:000000,op:int8,pos:313,val:+64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000525,src:000000,op:arith8,pos:308,val:-27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000525,src:000000,op:int8,pos:314,val:-1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000526,src:000000,op:arith8,pos:312,val:+3,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000526,src:000000,op:int8,pos:322,val:+32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000527,src:000000,op:arith8,pos:312,val:+5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000527,src:000000,op:int16,pos:25,val:be:+100,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000528,src:000000,op:arith8,pos:312,val:-11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000528,src:000000,op:int16,pos:29,val:-1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000529,src:000000,op:arith8,pos:313,val:-33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000529,src:000000,op:int16,pos:32,val:+32767,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000530,src:000000,op:arith8,pos:314,val:-3,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000530,src:000000,op:int16,pos:41,val:-128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000531,src:000000,op:arith8,pos:314,val:-25,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000531,src:000000,op:int16,pos:41,val:+32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000532,src:000000,op:arith8,pos:316,val:+20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000532,src:000000,op:int16,pos:42,val:+64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000533,src:000000,op:arith8,pos:316,val:-23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000533,src:000000,op:int16,pos:47,val:+128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000534,src:000000,op:arith8,pos:316,val:-28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000534,src:000000,op:int16,pos:48,val:be:+1000,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000535,src:000000,op:arith8,pos:317,val:-31,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000535,src:000000,op:int16,pos:50,val:+16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000536,src:000000,op:arith8,pos:318,val:+23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000536,src:000000,op:int16,pos:50,val:be:+1024,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000537,src:000000,op:arith8,pos:319,val:-12,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000537,src:000000,op:int16,pos:52,val:-129,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000538,src:000000,op:arith8,pos:320,val:+17,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000538,src:000000,op:int16,pos:52,val:+128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000539,src:000000,op:arith8,pos:320,val:-31,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000539,src:000000,op:int16,pos:52,val:be:+255,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000540,src:000000,op:arith8,pos:321,val:-34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000540,src:000000,op:int16,pos:53,val:+0,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000541,src:000000,op:arith8,pos:322,val:+3,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000541,src:000000,op:int16,pos:54,val:+1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000542,src:000000,op:arith8,pos:322,val:+7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000542,src:000000,op:int16,pos:69,val:-129,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000543,src:000000,op:arith8,pos:326,val:-9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000543,src:000000,op:int16,pos:74,val:be:-128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000544,src:000000,op:arith8,pos:326,val:-31,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000544,src:000000,op:int16,pos:78,val:be:+127,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000545,src:000000,op:arith8,pos:326,val:-35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000545,src:000000,op:int16,pos:81,val:+32767,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000546,src:000000,op:arith8,pos:327,val:+5 (100%) rename src/{mint => exchange}/afl-tests/id:000546,src:000000,op:int16,pos:83,val:+127,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000547,src:000000,op:arith8,pos:327,val:+7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000547,src:000000,op:int16,pos:86,val:+4096,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000548,src:000000,op:arith8,pos:327,val:+11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000548,src:000000,op:int16,pos:87,val:+16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000549,src:000000,op:arith8,pos:327,val:-24,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000549,src:000000,op:int16,pos:87,val:-32768,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000550,src:000000,op:arith8,pos:328,val:+14,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000550,src:000000,op:int16,pos:90,val:+256,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000551,src:000000,op:arith8,pos:329,val:+1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000551,src:000000,op:int16,pos:91,val:+32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000552,src:000000,op:arith8,pos:330,val:+9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000552,src:000000,op:int16,pos:91,val:-129,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000553,src:000000,op:arith8,pos:330,val:-24,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000553,src:000000,op:int16,pos:93,val:+0,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000554,src:000000,op:int16,pos:94,val:be:+64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000554,src:000000,op:int8,pos:6,val:+0 (100%) rename src/{mint => exchange}/afl-tests/id:000555,src:000000,op:int16,pos:94,val:be:+100,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000555,src:000000,op:int8,pos:7,val:+0 (100%) rename src/{mint => exchange}/afl-tests/id:000556,src:000000,op:int16,pos:232,val:+1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000556,src:000000,op:int8,pos:9,val:+0 (100%) rename src/{mint => exchange}/afl-tests/id:000557,src:000000,op:int16,pos:254,val:+256,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000557,src:000000,op:int8,pos:34,val:+0,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000558,src:000000,op:int16,pos:262,val:+1000,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000558,src:000000,op:int8,pos:40,val:+0,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000559,src:000000,op:int16,pos:303,val:+128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000559,src:000000,op:int8,pos:40,val:+32 (100%) rename src/{mint => exchange}/afl-tests/id:000560,src:000000,op:int32,pos:3,val:be:+1000 (100%) rename src/{mint => exchange}/afl-tests/id:000560,src:000000,op:int8,pos:44,val:-1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000561,src:000000,op:int32,pos:28,val:+32768,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000561,src:000000,op:int8,pos:51,val:-1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000562,src:000000,op:int32,pos:29,val:-128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000562,src:000000,op:int8,pos:62,val:-128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000563,src:000000,op:int32,pos:33,val:-128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000563,src:000000,op:int8,pos:135,val:+127,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000564,src:000000,op:int32,pos:33,val:+1024,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000564,src:000000,op:int8,pos:140,val:+100,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000565,src:000000,op:int32,pos:33,val:be:-32769,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000565,src:000000,op:int8,pos:178,val:+100,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000566,src:000000,op:int16,pos:27,val:-128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000566,src:000000,op:int32,pos:39,val:be:+255,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000567,src:000000,op:int16,pos:28,val:be:+32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000567,src:000000,op:int32,pos:40,val:+32767,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000568,src:000000,op:int16,pos:28,val:be:+127,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000568,src:000000,op:int32,pos:41,val:+16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000569,src:000000,op:int16,pos:33,val:be:+512,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000569,src:000000,op:int32,pos:41,val:+1024,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000570,src:000000,op:int16,pos:34,val:+1000,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000570,src:000000,op:int32,pos:44,val:-32769,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000571,src:000000,op:int16,pos:44,val:+512,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000571,src:000000,op:int32,pos:45,val:be:+1024,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000572,src:000000,op:int16,pos:46,val:+100,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000572,src:000000,op:int32,pos:48,val:+256,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000573,src:000000,op:int16,pos:46,val:be:+512,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000573,src:000000,op:int32,pos:53,val:+32768,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000574,src:000000,op:int16,pos:52,val:-128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000574,src:000000,op:int32,pos:54,val:be:-32768,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000575,src:000000,op:int16,pos:54,val:-128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000575,src:000000,op:int32,pos:54,val:-32769,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000576,src:000000,op:int16,pos:54,val:+100,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000576,src:000000,op:int32,pos:54,val:+2147483647,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000577,src:000000,op:int16,pos:54,val:+255,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000577,src:000000,op:int32,pos:63,val:-1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000578,src:000000,op:int16,pos:62,val:+255,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000578,src:000000,op:int32,pos:64,val:-128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000579,src:000000,op:int16,pos:63,val:+32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000579,src:000000,op:int32,pos:69,val:+128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000580,src:000000,op:int16,pos:65,val:be:+100,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000580,src:000000,op:int32,pos:80,val:+1024,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000581,src:000000,op:int16,pos:66,val:+0,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000581,src:000000,op:int32,pos:80,val:+65535,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000582,src:000000,op:int16,pos:80,val:+1000,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000582,src:000000,op:int32,pos:82,val:be:+16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000583,src:000000,op:int16,pos:82,val:+256,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000583,src:000000,op:int32,pos:83,val:+100,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000584,src:000000,op:int16,pos:83,val:be:+1024,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000584,src:000000,op:int32,pos:84,val:+32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000585,src:000000,op:int16,pos:87,val:-128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000585,src:000000,op:int32,pos:84,val:+128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000586,src:000000,op:int16,pos:87,val:-32768,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000586,src:000000,op:int32,pos:87,val:be:-32768,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000587,src:000000,op:int16,pos:94,val:-129,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000587,src:000000,op:int32,pos:88,val:be:-32769,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000588,src:000000,op:int16,pos:193,val:+16 (100%) rename src/{mint => exchange}/afl-tests/id:000588,src:000000,op:int32,pos:89,val:-128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000589,src:000000,op:int32,pos:0,val:be:+32767 (100%) rename src/{mint => exchange}/afl-tests/id:000589,src:000000,op:int32,pos:92,val:+32767,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000590,src:000000,op:int32,pos:164,val:+256,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000590,src:000000,op:int32,pos:2,val:+65535 (100%) rename src/{mint => exchange}/afl-tests/id:000591,src:000000,op:int32,pos:178,val:be:-32769,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000591,src:000000,op:int32,pos:7,val:-2147483648,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000592,src:000000,op:int32,pos:232,val:be:+65535,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000592,src:000000,op:int32,pos:24,val:be:+32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000593,src:000000,op:int32,pos:26,val:+255,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000593,src:000000,op:int32,pos:313,val:+1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000594,src:000000,op:int32,pos:27,val:be:+1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000594,src:000000,op:int32,pos:333,val:be:+255,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000595,src:000000,op:ext_AO,pos:26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000595,src:000000,op:int32,pos:29,val:+1000,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000596,src:000000,op:ext_AO,pos:43,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000596,src:000000,op:int32,pos:30,val:be:+32 (100%) rename src/{mint => exchange}/afl-tests/id:000597,src:000000,op:ext_AO,pos:49,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000597,src:000000,op:int32,pos:30,val:be:+512,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000598,src:000000,op:ext_AO,pos:52,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000598,src:000000,op:int32,pos:39,val:be:+1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000599,src:000000,op:ext_AO,pos:56,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000599,src:000000,op:int32,pos:40,val:+1024,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000600,src:000000,op:ext_AO,pos:64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000600,src:000000,op:int32,pos:42,val:be:+16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000601,src:000000,op:ext_AO,pos:65,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000601,src:000000,op:int32,pos:48,val:+100663045,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000602,src:000000,op:ext_AO,pos:65,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000602,src:000000,op:int32,pos:49,val:be:+4096,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000603,src:000000,op:ext_AO,pos:69,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000603,src:000000,op:int32,pos:51,val:+128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000604,src:000000,op:ext_AO,pos:69,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000604,src:000000,op:int32,pos:53,val:-128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000605,src:000000,op:ext_AO,pos:72,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000605,src:000000,op:int32,pos:53,val:+128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000606,src:000000,op:ext_AO,pos:72,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000606,src:000000,op:int32,pos:53,val:+1024,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000607,src:000000,op:ext_AO,pos:76,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000607,src:000000,op:int32,pos:64,val:+256,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000608,src:000000,op:ext_AO,pos:81,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000608,src:000000,op:int32,pos:65,val:+1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000609,src:000000,op:ext_AO,pos:90,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000609,src:000000,op:int32,pos:65,val:be:+64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000610,src:000000,op:ext_AO,pos:111,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000610,src:000000,op:int32,pos:66,val:+16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000611,src:000000,op:ext_AO,pos:135,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000611,src:000000,op:int32,pos:73,val:+100663045,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000612,src:000000,op:ext_AO,pos:135,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000612,src:000000,op:int32,pos:81,val:+0,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000613,src:000000,op:ext_AO,pos:135,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000613,src:000000,op:int32,pos:82,val:+32767,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000614,src:000000,op:ext_AO,pos:135,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000614,src:000000,op:int32,pos:83,val:be:+1000,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000615,src:000000,op:ext_AO,pos:135,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000615,src:000000,op:int32,pos:84,val:-129,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000616,src:000000,op:ext_AO,pos:136,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000616,src:000000,op:int32,pos:84,val:+65536,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000617,src:000000,op:ext_AO,pos:136,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000617,src:000000,op:int32,pos:85,val:be:+255,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000618,src:000000,op:ext_AO,pos:137,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000618,src:000000,op:int32,pos:85,val:-32769,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000619,src:000000,op:ext_AO,pos:137,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000619,src:000000,op:int32,pos:88,val:be:-32768,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000620,src:000000,op:ext_AO,pos:138,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000620,src:000000,op:int32,pos:91,val:+127,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000621,src:000000,op:ext_AO,pos:142,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000621,src:000000,op:int32,pos:92,val:-32768,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000622,src:000000,op:ext_AO,pos:143,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000622,src:000000,op:int32,pos:98,val:-129,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000623,src:000000,op:ext_AO,pos:144,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000623,src:000000,op:int32,pos:128,val:-32769,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000624,src:000000,op:ext_AO,pos:144,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000624,src:000000,op:int32,pos:160,val:be:+512,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000625,src:000000,op:ext_AO,pos:145,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000625,src:000000,op:int32,pos:203,val:be:+1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000626,src:000000,op:ext_AO,pos:146,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000626,src:000000,op:int32,pos:263,val:+0,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000627,src:000000,op:ext_AO,pos:146,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000627,src:000000,op:int32,pos:264,val:be:-32769,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000628,src:000000,op:ext_AO,pos:147,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000628,src:000000,op:int32,pos:285,val:+100663045,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000629,src:000000,op:ext_AO,pos:147,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000629,src:000000,op:ext_AO,pos:34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000630,src:000000,op:ext_AO,pos:148,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000630,src:000000,op:ext_AO,pos:34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000631,src:000000,op:ext_AO,pos:148 (100%) rename src/{mint => exchange}/afl-tests/id:000631,src:000000,op:ext_AO,pos:37,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000632,src:000000,op:ext_AO,pos:149,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000632,src:000000,op:ext_AO,pos:39,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000633,src:000000,op:ext_AO,pos:152,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000633,src:000000,op:ext_AO,pos:49,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000634,src:000000,op:ext_AO,pos:154 (100%) rename src/{mint => exchange}/afl-tests/id:000634,src:000000,op:ext_AO,pos:51,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000635,src:000000,op:ext_AO,pos:155,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000635,src:000000,op:ext_AO,pos:52,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000636,src:000000,op:ext_AO,pos:156,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000636,src:000000,op:ext_AO,pos:52,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000637,src:000000,op:ext_AO,pos:157 (100%) rename src/{mint => exchange}/afl-tests/id:000637,src:000000,op:ext_AO,pos:58,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000638,src:000000,op:ext_AO,pos:159,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000638,src:000000,op:ext_AO,pos:64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000639,src:000000,op:ext_AO,pos:161,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000639,src:000000,op:ext_AO,pos:86,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000640,src:000000,op:ext_AO,pos:166,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000640,src:000000,op:ext_AO,pos:88,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000641,src:000000,op:ext_AO,pos:168,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000641,src:000000,op:ext_AO,pos:93,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000642,src:000000,op:ext_AO,pos:135,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000642,src:000000,op:ext_AO,pos:169,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000643,src:000000,op:ext_AO,pos:136,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000643,src:000000,op:ext_AO,pos:173,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000644,src:000000,op:ext_AO,pos:138,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000644,src:000000,op:ext_AO,pos:174,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000645,src:000000,op:ext_AO,pos:140,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000645,src:000000,op:ext_AO,pos:174,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000646,src:000000,op:ext_AO,pos:143,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000646,src:000000,op:ext_AO,pos:184,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000647,src:000000,op:ext_AO,pos:144,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000647,src:000000,op:ext_AO,pos:191,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000648,src:000000,op:ext_AO,pos:155,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000648,src:000000,op:ext_AO,pos:216,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000649,src:000000,op:ext_AO,pos:166,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000649,src:000000,op:ext_AO,pos:236,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000650,src:000000,op:ext_AO,pos:166,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000650,src:000000,op:ext_AO,pos:270,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000651,src:000000,op:ext_AO,pos:173,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000651,src:000000,op:ext_AO,pos:270,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000652,src:000000,op:ext_AO,pos:175,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000652,src:000000,op:ext_AO,pos:272,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000653,src:000000,op:ext_AO,pos:176,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000653,src:000000,op:ext_AO,pos:283,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000654,src:000000,op:ext_AO,pos:177,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000654,src:000000,op:ext_AO,pos:305,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000655,src:000000,op:ext_AO,pos:177,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000655,src:000000,op:ext_AO,pos:305,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000656,src:000000,op:ext_AO,pos:177,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000656,src:000000,op:ext_AO,pos:313,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000657,src:000000,op:ext_AO,pos:180,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000657,src:000000,op:ext_AO,pos:315,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000658,src:000000,op:ext_AO,pos:182,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000658,src:000000,op:ext_AO,pos:326 (100%) rename src/{mint => exchange}/afl-tests/id:000659,src:000000,op:ext_AO,pos:269,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000659,src:000000,op:havoc,rep:4 (100%) rename src/{mint => exchange}/afl-tests/id:000660,src:000000,op:ext_AO,pos:270,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000660,src:000000,op:havoc,rep:32 (100%) rename src/{mint => exchange}/afl-tests/id:000661,src:000000,op:ext_AO,pos:271,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000661,src:000000,op:havoc,rep:4 (100%) rename src/{mint => exchange}/afl-tests/id:000662,src:000000,op:ext_AO,pos:274,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000662,src:000000,op:havoc,rep:128 (100%) rename src/{mint => exchange}/afl-tests/id:000663,src:000000,op:ext_AO,pos:275,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000663,src:000000,op:havoc,rep:32 (100%) rename src/{mint => exchange}/afl-tests/id:000664,src:000000,op:ext_AO,pos:305,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000664,src:000000,op:havoc,rep:128 (100%) rename src/{mint => exchange}/afl-tests/id:000665,src:000000,op:ext_AO,pos:312,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000665,src:000000,op:havoc,rep:16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000666,src:000000,op:ext_AO,pos:314,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000666,src:000000,op:havoc,rep:64 (100%) rename src/{mint => exchange}/afl-tests/id:000667,src:000000,op:ext_AO,pos:319,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000667,src:000000,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000668,src:000000,op:ext_AO,pos:328,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000668,src:000000,op:havoc,rep:128 (100%) rename src/{mint => exchange}/afl-tests/id:000669,src:000000,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000669,src:000000,op:havoc,rep:64 (100%) rename src/{mint => exchange}/afl-tests/id:000670,src:000000,op:havoc,rep:32 (100%) rename src/{mint => exchange}/afl-tests/id:000671,src:000000,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000671,src:000000,op:havoc,rep:8 (100%) rename src/{mint => exchange}/afl-tests/id:000672,src:000000,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000672,src:000000,op:havoc,rep:32 (100%) rename src/{mint => exchange}/afl-tests/id:000673,src:000000,op:havoc,rep:128 (100%) rename src/{mint => exchange}/afl-tests/id:000673,src:000000,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000674,src:000000,op:havoc,rep:32 (100%) rename src/{mint => exchange}/afl-tests/id:000675,src:000000,op:havoc,rep:128 (100%) rename src/{mint => exchange}/afl-tests/id:000675,src:000000,op:havoc,rep:8 (100%) rename src/{mint => exchange}/afl-tests/id:000676,src:000000,op:havoc,rep:32 (100%) rename src/{mint => exchange}/afl-tests/id:000677,src:000000,op:havoc,rep:64 (100%) rename src/{mint => exchange}/afl-tests/id:000677,src:000000,op:havoc,rep:8 (100%) rename src/{mint => exchange}/afl-tests/id:000678,src:000000,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000678,src:000000,op:havoc,rep:4 (100%) rename src/{mint => exchange}/afl-tests/id:000679,src:000000,op:havoc,rep:128 (100%) rename src/{mint => exchange}/afl-tests/id:000679,src:000000,op:havoc,rep:16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000680,src:000000,op:havoc,rep:128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000680,src:000000,op:havoc,rep:32 (100%) rename src/{mint => exchange}/afl-tests/id:000681,src:000000,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000681,src:000000,op:havoc,rep:32 (100%) rename src/{mint => exchange}/afl-tests/id:000682,src:000000,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000682,src:000000,op:havoc,rep:64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000683,src:000000,op:havoc,rep:16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000683,src:000000,op:havoc,rep:32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000684,src:000000,op:havoc,rep:16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000684,src:000000,op:havoc,rep:8 (100%) rename src/{mint => exchange}/afl-tests/id:000685,src:000000,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000685,src:000000,op:havoc,rep:16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000686,src:000000,op:havoc,rep:128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000686,src:000000,op:havoc,rep:16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000687,src:000000,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000687,src:000000,op:havoc,rep:32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000688,src:000000,op:havoc,rep:128 (100%) rename src/{mint => exchange}/afl-tests/id:000689,src:000000,op:havoc,rep:128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000689,src:000000,op:havoc,rep:64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000690,src:000000,op:havoc,rep:32 (100%) rename src/{mint => exchange}/afl-tests/id:000690,src:000000,op:havoc,rep:64 (100%) rename src/{mint => exchange}/afl-tests/id:000691,src:000000,op:havoc,rep:64 (100%) rename src/{mint => exchange}/afl-tests/id:000692,src:000000,op:havoc,rep:4,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000693,src:000000,op:havoc,rep:16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000693,src:000000,op:havoc,rep:4,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000694,src:000000,op:havoc,rep:2,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000694,src:000000,op:havoc,rep:32 (100%) rename src/{mint => exchange}/afl-tests/id:000695,src:000000,op:havoc,rep:128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000695,src:000000,op:havoc,rep:64 (100%) rename src/{mint => exchange}/afl-tests/id:000696,src:000000,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000696,src:000000,op:havoc,rep:2,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000697,src:000000,op:havoc,rep:64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000697,src:000000,op:havoc,rep:8 (100%) rename src/{mint => exchange}/afl-tests/id:000698,src:000000,op:havoc,rep:128 (100%) rename src/{mint => exchange}/afl-tests/id:000699,src:000000,op:havoc,rep:2,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000699,src:000000,op:havoc,rep:32 (100%) rename src/{mint => exchange}/afl-tests/id:000700,src:000000,op:havoc,rep:128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000700,src:000000,op:havoc,rep:32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000701,src:000000,op:havoc,rep:16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000701,src:000000,op:havoc,rep:2 (100%) rename src/{mint => exchange}/afl-tests/id:000702,src:000000,op:havoc,rep:128 (100%) rename src/{mint => exchange}/afl-tests/id:000702,src:000000,op:havoc,rep:8 (100%) rename src/{mint => exchange}/afl-tests/id:000703,src:000000,op:havoc,rep:32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000703,src:000001,op:flip1,pos:34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000704,src:000000,op:havoc,rep:64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000704,src:000001,op:flip1,pos:50,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000705,src:000000,op:havoc,rep:2,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000705,src:000001,op:flip1,pos:61,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000706,src:000000,op:havoc,rep:32 (100%) rename src/{mint => exchange}/afl-tests/id:000706,src:000001,op:flip1,pos:91 (100%) rename src/{mint => exchange}/afl-tests/id:000707,src:000000,op:havoc,rep:128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000707,src:000001,op:flip1,pos:103,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000708,src:000000,op:havoc,rep:2 (100%) rename src/{mint => exchange}/afl-tests/id:000708,src:000001,op:flip1,pos:120,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000709,src:000000,op:havoc,rep:64 (100%) rename src/{mint => exchange}/afl-tests/id:000709,src:000001,op:flip1,pos:129,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000710,src:000000,op:havoc,rep:8,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000710,src:000001,op:flip1,pos:129,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000711,src:000000,op:havoc,rep:2,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000711,src:000001,op:flip1,pos:131,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000712,src:000000,op:havoc,rep:2,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000712,src:000001,op:flip1,pos:139,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000713,src:000000,op:havoc,rep:64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000713,src:000001,op:flip1,pos:197,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000714,src:000000,op:havoc,rep:8,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000714,src:000001,op:flip1,pos:243,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000715,src:000000,op:havoc,rep:8,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000715,src:000001,op:flip1,pos:365,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000716,src:000001,op:flip1,pos:2 (100%) rename src/{mint => exchange}/afl-tests/id:000716,src:000001,op:flip1,pos:456,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000717,src:000001,op:flip1,pos:50,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000717,src:000001,op:flip1,pos:596 (100%) rename src/{mint => exchange}/afl-tests/id:000718,src:000001,op:flip1,pos:55,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000718,src:000001,op:flip1,pos:614,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000719,src:000001,op:flip1,pos:629,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000719,src:000001,op:flip1,pos:95 (100%) rename src/{mint => exchange}/afl-tests/id:000720,src:000001,op:flip1,pos:102,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000720,src:000001,op:flip1,pos:635,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000721,src:000001,op:flip1,pos:107,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000721,src:000001,op:flip1,pos:683,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000722,src:000001,op:flip1,pos:118,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000722,src:000001,op:flip1,pos:730,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000723,src:000001,op:flip1,pos:124,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000723,src:000001,op:flip1,pos:786,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000724,src:000001,op:flip1,pos:133,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000724,src:000001,op:flip1,pos:796 (100%) rename src/{mint => exchange}/afl-tests/id:000725,src:000001,op:flip1,pos:133,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000725,src:000001,op:flip1,pos:915,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000726,src:000001,op:flip1,pos:1112,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000726,src:000001,op:flip1,pos:135,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000727,src:000001,op:flip1,pos:1112,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000727,src:000001,op:flip1,pos:457,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000728,src:000001,op:flip1,pos:1114,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000728,src:000001,op:flip1,pos:469,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000729,src:000001,op:flip1,pos:1215,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000729,src:000001,op:flip1,pos:508,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000730,src:000001,op:flip1,pos:1353,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000730,src:000001,op:flip1,pos:600 (100%) rename src/{mint => exchange}/afl-tests/id:000731,src:000001,op:flip1,pos:1453,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000731,src:000001,op:flip1,pos:618,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000732,src:000001,op:flip1,pos:1574,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000732,src:000001,op:flip1,pos:633,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000733,src:000001,op:flip1,pos:1630 (100%) rename src/{mint => exchange}/afl-tests/id:000733,src:000001,op:flip1,pos:687,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000734,src:000001,op:flip1,pos:722,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000734,src:000001,op:flip2,pos:453,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000735,src:000001,op:flip1,pos:734,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000735,src:000001,op:flip2,pos:484,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000736,src:000001,op:flip1,pos:800 (100%) rename src/{mint => exchange}/afl-tests/id:000736,src:000001,op:flip2,pos:696,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000737,src:000001,op:flip1,pos:888,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000737,src:000001,op:flip2,pos:843,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000738,src:000001,op:flip1,pos:893,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000738,src:000001,op:flip2,pos:845,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000739,src:000001,op:flip1,pos:1116,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000739,src:000001,op:flip2,pos:917,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000740,src:000001,op:flip1,pos:1116,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000740,src:000001,op:flip2,pos:995,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000741,src:000001,op:flip1,pos:1118,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000741,src:000001,op:flip2,pos:1031,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000742,src:000001,op:flip1,pos:1170,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000742,src:000001,op:flip2,pos:1135,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000743,src:000001,op:flip1,pos:1205,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000743,src:000001,op:flip2,pos:1286,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000744,src:000001,op:flip1,pos:1301,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000744,src:000001,op:flip2,pos:1655,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000745,src:000001,op:flip1,pos:1369,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000745,src:000001,op:flip4,pos:50,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000746,src:000001,op:flip1,pos:1378,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000746,src:000001,op:flip4,pos:122,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000747,src:000001,op:flip1,pos:1474,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000747,src:000001,op:flip4,pos:351,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000748,src:000001,op:flip1,pos:1510,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000748,src:000001,op:flip4,pos:569,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000749,src:000001,op:flip1,pos:1634 (100%) rename src/{mint => exchange}/afl-tests/id:000749,src:000001,op:flip4,pos:788,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000750,src:000001,op:flip1,pos:1657,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000750,src:000001,op:flip4,pos:1198,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000751,src:000001,op:flip1,pos:1712,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000751,src:000001,op:flip8,pos:67,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000752,src:000001,op:flip2,pos:21,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000752,src:000001,op:flip8,pos:1661,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000753,src:000001,op:flip16,pos:390,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000753,src:000001,op:flip2,pos:39,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000754,src:000001,op:flip2,pos:105,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000754,src:000001,op:flip32,pos:339,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000755,src:000001,op:flip2,pos:890,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000755,src:000001,op:flip32,pos:975,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000756,src:000001,op:arith8,pos:10,val:-30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000756,src:000001,op:flip2,pos:975,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000757,src:000001,op:arith8,pos:46,val:+9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000757,src:000001,op:flip2,pos:1509,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000758,src:000001,op:arith8,pos:72,val:+5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000758,src:000001,op:flip2,pos:1662,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000759,src:000001,op:flip4,pos:32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000759,src:000002,op:flip1,pos:30 (100%) rename src/{mint => exchange}/afl-tests/id:000760,src:000001,op:flip4,pos:300,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000760,src:000002,op:flip1,pos:50 (100%) rename src/{mint => exchange}/afl-tests/id:000761,src:000001,op:flip4,pos:457,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000761,src:000002,op:flip1,pos:50,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000762,src:000001,op:flip4,pos:1507,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000762,src:000002,op:flip1,pos:63 (100%) rename src/{mint => exchange}/afl-tests/id:000763,src:000001,op:flip4,pos:1549,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000763,src:000002,op:flip1,pos:76 (100%) rename src/{mint => exchange}/afl-tests/id:000764,src:000001,op:flip4,pos:1577,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000764,src:000002,op:flip1,pos:135 (100%) rename src/{mint => exchange}/afl-tests/id:000765,src:000001,op:flip8,pos:899,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000765,src:000002,op:flip1,pos:143,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000766,src:000001,op:flip8,pos:1457,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000766,src:000002,op:flip4,pos:8,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000767,src:000001,op:flip32,pos:301,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000767,src:000002,op:flip4,pos:117,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000768,src:000001,op:arith8,pos:18,val:+11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000768,src:000002,op:arith8,pos:11,val:-1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000769,src:000001,op:arith8,pos:33,val:+17,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000769,src:000002,op:arith8,pos:20,val:+13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000770,src:000002,op:arith8,pos:34,val:-6,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000770,src:000002,op:flip1,pos:30 (100%) rename src/{mint => exchange}/afl-tests/id:000771,src:000002,op:arith8,pos:105,val:+35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000771,src:000002,op:flip1,pos:45,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000772,src:000002,op:arith8,pos:109,val:-35 (100%) rename src/{mint => exchange}/afl-tests/id:000772,src:000002,op:flip1,pos:50 (100%) rename src/{mint => exchange}/afl-tests/id:000773,src:000002,op:arith8,pos:131,val:+5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000773,src:000002,op:flip1,pos:63 (100%) rename src/{mint => exchange}/afl-tests/id:000774,src:000002,op:arith8,pos:137,val:+9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000774,src:000002,op:flip1,pos:76 (100%) rename src/{mint => exchange}/afl-tests/id:000775,src:000002,op:arith16,pos:55,val:-29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000775,src:000002,op:flip1,pos:107,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000776,src:000002,op:flip1,pos:135 (100%) rename src/{mint => exchange}/afl-tests/id:000776,src:000002,op:int16,pos:27,val:+16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000777,src:000002,op:flip2,pos:56,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000777,src:000002,op:int16,pos:96,val:+32 (100%) rename src/{mint => exchange}/afl-tests/id:000778,src:000002,op:flip2,pos:113,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000778,src:000002,op:int32,pos:53,val:be:+32767,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000779,src:000002,op:ext_AO,pos:22,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000779,src:000002,op:flip4,pos:15,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000780,src:000002,op:arith8,pos:10,val:-7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000780,src:000002,op:ext_AO,pos:130,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000781,src:000002,op:arith8,pos:29,val:+21,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000781,src:000002,op:havoc,rep:8 (100%) rename src/{mint => exchange}/afl-tests/id:000782,src:000002,op:arith8,pos:109,val:-35 (100%) rename src/{mint => exchange}/afl-tests/id:000782,src:000002,op:havoc,rep:2 (100%) rename src/{mint => exchange}/afl-tests/id:000783,src:000002,op:arith8,pos:132,val:+34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000783,src:000002,op:havoc,rep:4 (100%) rename src/{mint => exchange}/afl-tests/id:000784,src:000002,op:havoc,rep:64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000784,src:000002,op:int16,pos:20,val:-129,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000785,src:000002,op:havoc,rep:64 (100%) rename src/{mint => exchange}/afl-tests/id:000785,src:000002,op:int16,pos:82,val:+64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000786,src:000002,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000786,src:000002,op:int16,pos:96,val:+32 (100%) rename src/{mint => exchange}/afl-tests/id:000787,src:000002,op:havoc,rep:64 (100%) rename src/{mint => exchange}/afl-tests/id:000787,src:000002,op:int16,pos:112,val:be:-128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000788,src:000002,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000788,src:000002,op:int32,pos:26,val:+65536,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000789,src:000002,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000789,src:000002,op:int32,pos:54,val:+32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000790,src:000002,op:ext_AO,pos:95,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000790,src:000002,op:havoc,rep:64 (100%) rename src/{mint => exchange}/afl-tests/id:000791,src:000002,op:ext_AO,pos:98,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000791,src:000002,op:havoc,rep:4 (100%) rename src/{mint => exchange}/afl-tests/id:000792,src:000002,op:ext_AO,pos:130,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000792,src:000002,op:havoc,rep:8 (100%) rename src/{mint => exchange}/afl-tests/id:000793,src:000002,op:ext_AO,pos:135,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000793,src:000002,op:havoc,rep:64 (100%) rename src/{mint => exchange}/afl-tests/id:000794,src:000002,op:ext_AO,pos:138,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000794,src:000002,op:havoc,rep:64 (100%) rename src/{mint => exchange}/afl-tests/id:000795,src:000002,op:havoc,rep:4 (100%) rename src/{mint => exchange}/afl-tests/id:000795,src:000002,op:havoc,rep:8 (100%) rename src/{mint => exchange}/afl-tests/id:000796,src:000002,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000796,src:000002,op:havoc,rep:32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000797,src:000002,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000797,src:000002,op:havoc,rep:2 (100%) rename src/{mint => exchange}/afl-tests/id:000798,src:000002,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000798,src:000002,op:havoc,rep:64 (100%) rename src/{mint => exchange}/afl-tests/id:000799,src:000002,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000799,src:000002,op:havoc,rep:64 (100%) rename src/{mint => exchange}/afl-tests/id:000800,src:000002,op:havoc,rep:4 (100%) rename src/{mint => exchange}/afl-tests/id:000801,src:000002,op:havoc,rep:128 (100%) rename src/{mint => exchange}/afl-tests/id:000801,src:000002,op:havoc,rep:64 (100%) rename src/{mint => exchange}/afl-tests/id:000802,src:000002,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000802,src:000002,op:havoc,rep:4 (100%) rename src/{mint => exchange}/afl-tests/id:000803,src:000002,op:havoc,rep:128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000803,src:000002,op:havoc,rep:2 (100%) rename src/{mint => exchange}/afl-tests/id:000804,src:000002,op:havoc,rep:32 (100%) rename src/{mint => exchange}/afl-tests/id:000804,src:000002,op:havoc,rep:64 (100%) rename src/{mint => exchange}/afl-tests/id:000805,src:000002,op:havoc,rep:4 (100%) rename src/{mint => exchange}/afl-tests/id:000805,src:000003,op:flip1,pos:0,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000806,src:000002,op:havoc,rep:32 (100%) rename src/{mint => exchange}/afl-tests/id:000806,src:000003,op:flip1,pos:13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000807,src:000002,op:havoc,rep:128 (100%) rename src/{mint => exchange}/afl-tests/id:000807,src:000003,op:flip1,pos:18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000808,src:000002,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000808,src:000003,op:flip1,pos:27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000809,src:000002,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000809,src:000003,op:flip1,pos:27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000810,src:000002,op:havoc,rep:32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000810,src:000003,op:flip1,pos:30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000811,src:000002,op:havoc,rep:2,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000811,src:000003,op:flip1,pos:30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000812,src:000002,op:havoc,rep:4,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000812,src:000003,op:flip1,pos:32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000813,src:000002,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000813,src:000003,op:flip1,pos:34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000814,src:000002,op:havoc,rep:16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000814,src:000003,op:flip1,pos:40,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000815,src:000002,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000815,src:000003,op:flip1,pos:42,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000816,src:000002,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000816,src:000003,op:flip1,pos:43,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000817,src:000002,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000817,src:000003,op:flip1,pos:48,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000818,src:000002,op:havoc,rep:16 (100%) rename src/{mint => exchange}/afl-tests/id:000818,src:000003,op:flip1,pos:50,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000819,src:000002,op:havoc,rep:16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000819,src:000003,op:flip1,pos:61,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000820,src:000002,op:havoc,rep:2 (100%) rename src/{mint => exchange}/afl-tests/id:000820,src:000003,op:flip1,pos:67,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000821,src:000003,op:flip1,pos:18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000821,src:000003,op:flip1,pos:70 (100%) rename src/{mint => exchange}/afl-tests/id:000822,src:000003,op:flip1,pos:27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000822,src:000003,op:flip1,pos:73,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000823,src:000003,op:flip1,pos:27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000823,src:000003,op:flip1,pos:77,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000824,src:000003,op:flip1,pos:27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000824,src:000003,op:flip1,pos:83,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000825,src:000003,op:flip1,pos:28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000825,src:000003,op:flip1,pos:85,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000826,src:000003,op:flip1,pos:28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000826,src:000003,op:flip1,pos:85,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000827,src:000003,op:flip1,pos:29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000827,src:000003,op:flip1,pos:88,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000828,src:000003,op:flip1,pos:29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000828,src:000003,op:flip1,pos:89 (100%) rename src/{mint => exchange}/afl-tests/id:000829,src:000003,op:flip1,pos:29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000829,src:000003,op:flip1,pos:91,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000830,src:000003,op:flip1,pos:30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000830,src:000003,op:flip1,pos:93,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000831,src:000003,op:flip1,pos:32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000831,src:000003,op:flip1,pos:93,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000832,src:000003,op:flip1,pos:34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000832,src:000003,op:flip1,pos:97,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000833,src:000003,op:flip1,pos:109,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000833,src:000003,op:flip1,pos:36,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000834,src:000003,op:flip1,pos:111,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000834,src:000003,op:flip1,pos:39 (100%) rename src/{mint => exchange}/afl-tests/id:000835,src:000003,op:flip1,pos:113,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000835,src:000003,op:flip1,pos:39,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000836,src:000003,op:flip1,pos:114,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000836,src:000003,op:flip1,pos:40,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000837,src:000003,op:flip1,pos:119,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000837,src:000003,op:flip1,pos:41,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000838,src:000003,op:flip1,pos:120,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000838,src:000003,op:flip1,pos:44,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000839,src:000003,op:flip1,pos:128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000839,src:000003,op:flip1,pos:46,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000840,src:000003,op:flip1,pos:141,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000840,src:000003,op:flip1,pos:48,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000841,src:000003,op:flip1,pos:145,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000841,src:000003,op:flip1,pos:48,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000842,src:000003,op:flip1,pos:147,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000842,src:000003,op:flip1,pos:51 (100%) rename src/{mint => exchange}/afl-tests/id:000843,src:000003,op:flip1,pos:150,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000843,src:000003,op:flip1,pos:51,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000844,src:000003,op:flip1,pos:150,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000844,src:000003,op:flip1,pos:54,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000845,src:000003,op:flip1,pos:58,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000845,src:000003,op:flip2,pos:65,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000846,src:000003,op:flip1,pos:64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000846,src:000003,op:flip2,pos:84,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000847,src:000003,op:flip1,pos:64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000847,src:000003,op:flip2,pos:99,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000848,src:000003,op:flip1,pos:66,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000848,src:000003,op:flip2,pos:102,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000849,src:000003,op:flip1,pos:67,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000849,src:000003,op:flip2,pos:115,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000850,src:000003,op:flip1,pos:67,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000850,src:000003,op:flip2,pos:132,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000851,src:000003,op:flip1,pos:74,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000851,src:000003,op:flip2,pos:133,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000852,src:000003,op:flip1,pos:76,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000852,src:000003,op:flip2,pos:139,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000853,src:000003,op:flip1,pos:78,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000853,src:000003,op:flip2,pos:139,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000854,src:000003,op:flip2,pos:145,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000854,src:000003,op:flip2,pos:28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000855,src:000003,op:flip2,pos:147,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000855,src:000003,op:flip2,pos:29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000856,src:000003,op:flip2,pos:151,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000856,src:000003,op:flip2,pos:29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000857,src:000003,op:flip2,pos:30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000857,src:000003,op:flip4,pos:110,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000858,src:000003,op:flip2,pos:35 (100%) rename src/{mint => exchange}/afl-tests/id:000858,src:000003,op:flip4,pos:120,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000859,src:000003,op:flip2,pos:37,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000859,src:000003,op:flip4,pos:123,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000860,src:000003,op:flip2,pos:41,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000860,src:000003,op:flip4,pos:124,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000861,src:000003,op:flip2,pos:42,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000861,src:000003,op:flip4,pos:124,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000862,src:000003,op:flip2,pos:43,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000862,src:000003,op:flip4,pos:124,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000863,src:000003,op:flip2,pos:43,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000863,src:000003,op:flip4,pos:129,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000864,src:000003,op:flip2,pos:43 (100%) rename src/{mint => exchange}/afl-tests/id:000864,src:000003,op:flip4,pos:138,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000865,src:000003,op:flip2,pos:45,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000865,src:000003,op:flip8,pos:118,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000866,src:000003,op:flip2,pos:47,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000866,src:000003,op:flip8,pos:129,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000867,src:000003,op:flip2,pos:49,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000867,src:000003,op:flip8,pos:130,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000868,src:000003,op:flip2,pos:54,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000868,src:000003,op:flip8,pos:132,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000869,src:000003,op:arith8,pos:17,val:-31 (100%) rename src/{mint => exchange}/afl-tests/id:000869,src:000003,op:flip2,pos:62,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000870,src:000003,op:arith8,pos:27,val:+26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000870,src:000003,op:flip2,pos:63,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000871,src:000003,op:arith8,pos:29,val:+11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000871,src:000003,op:flip2,pos:68,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000872,src:000003,op:arith8,pos:29,val:+33 (100%) rename src/{mint => exchange}/afl-tests/id:000873,src:000003,op:arith8,pos:30,val:-14,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000874,src:000003,op:arith8,pos:30,val:+28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000875,src:000003,op:arith8,pos:35,val:+18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000876,src:000003,op:arith8,pos:35,val:+26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000877,src:000003,op:arith8,pos:36,val:-23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000878,src:000003,op:arith8,pos:37,val:+20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000879,src:000003,op:arith8,pos:37,val:-27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000880,src:000003,op:arith8,pos:42,val:+31,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000881,src:000003,op:arith8,pos:46,val:+26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000882,src:000003,op:arith8,pos:47,val:-35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000883,src:000003,op:arith8,pos:49,val:-2,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000884,src:000003,op:arith8,pos:51,val:+15,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000885,src:000003,op:arith8,pos:52,val:+11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000886,src:000003,op:arith8,pos:61,val:+34 (100%) rename src/{mint => exchange}/afl-tests/id:000887,src:000003,op:arith8,pos:62,val:-18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000888,src:000003,op:arith8,pos:68,val:+21,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000889,src:000003,op:arith8,pos:71,val:-12,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000890,src:000003,op:arith8,pos:75,val:+15,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000891,src:000003,op:arith8,pos:77,val:+13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000892,src:000003,op:arith8,pos:80,val:-17,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000893,src:000003,op:arith8,pos:80,val:-23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000894,src:000003,op:arith8,pos:81,val:-9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000895,src:000003,op:arith8,pos:83,val:-18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000896,src:000003,op:arith8,pos:83,val:+25,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000897,src:000003,op:arith8,pos:84,val:-18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000898,src:000003,op:arith8,pos:86,val:+11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000899,src:000003,op:arith8,pos:86,val:+27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000900,src:000003,op:arith8,pos:87,val:-23,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000901,src:000003,op:arith8,pos:88,val:+35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000902,src:000003,op:arith8,pos:89,val:-14,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000903,src:000003,op:arith8,pos:89,val:-33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000904,src:000003,op:arith8,pos:90,val:-25,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000905,src:000003,op:arith8,pos:92,val:-25,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000906,src:000003,op:arith8,pos:96,val:+10,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000907,src:000003,op:arith8,pos:96,val:-19,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000908,src:000003,op:arith8,pos:96,val:+25,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000909,src:000003,op:arith8,pos:97,val:-17,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000910,src:000003,op:arith8,pos:100,val:-15,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000911,src:000003,op:arith8,pos:102,val:-27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000912,src:000003,op:arith8,pos:102,val:-34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000913,src:000003,op:arith8,pos:103,val:-9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000914,src:000003,op:arith8,pos:103,val:+12 (100%) rename src/{mint => exchange}/afl-tests/id:000915,src:000003,op:arith8,pos:103,val:+20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000916,src:000003,op:arith8,pos:103,val:+22,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000917,src:000003,op:arith8,pos:103,val:+29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000918,src:000003,op:arith8,pos:103,val:+33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000919,src:000003,op:arith8,pos:104,val:-10,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000920,src:000003,op:arith8,pos:104,val:-12,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000921,src:000003,op:arith8,pos:104,val:+34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000922,src:000003,op:arith8,pos:106,val:+5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000923,src:000003,op:arith8,pos:106,val:-13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000924,src:000003,op:arith8,pos:110,val:+15,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000925,src:000003,op:arith8,pos:112,val:-13,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000926,src:000003,op:arith8,pos:113,val:+34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000927,src:000003,op:arith8,pos:114,val:+5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000928,src:000003,op:arith8,pos:114,val:+26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000929,src:000003,op:arith8,pos:114,val:-27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000930,src:000003,op:arith8,pos:118,val:-28,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000931,src:000003,op:arith8,pos:119,val:+12,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000932,src:000003,op:arith8,pos:119,val:+27,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000933,src:000003,op:arith8,pos:122,val:-4,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000934,src:000003,op:arith8,pos:122,val:-26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000935,src:000003,op:arith8,pos:122,val:+35,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000936,src:000003,op:arith8,pos:123,val:-11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000937,src:000003,op:arith8,pos:124,val:-14,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000938,src:000003,op:arith8,pos:128,val:+5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000939,src:000003,op:arith8,pos:129,val:+21,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000940,src:000003,op:arith8,pos:133,val:-7,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000941,src:000003,op:arith8,pos:133,val:+20,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000942,src:000003,op:arith8,pos:135,val:-26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000943,src:000003,op:arith8,pos:141,val:+1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000944,src:000003,op:arith8,pos:143,val:-5,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000945,src:000003,op:arith8,pos:145,val:+21,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000946,src:000003,op:arith8,pos:147,val:-9,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000947,src:000003,op:arith8,pos:147,val:+31,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000948,src:000003,op:arith8,pos:148,val:+3,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000949,src:000003,op:arith8,pos:148,val:-11,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000950,src:000003,op:arith8,pos:149,val:-18,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000951,src:000003,op:arith8,pos:151,val:-21,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000952,src:000003,op:arith8,pos:151,val:+26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000953,src:000003,op:arith8,pos:151,val:-30,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000954,src:000003,op:arith16,pos:88,val:-16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000955,src:000003,op:arith16,pos:109,val:-19,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000956,src:000003,op:arith16,pos:109,val:-26,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000957,src:000003,op:arith16,pos:109,val:-33,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000958,src:000003,op:arith16,pos:121,val:-34,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000959,src:000003,op:int8,pos:80,val:+16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000960,src:000003,op:int8,pos:83,val:+1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000961,src:000003,op:int8,pos:101,val:+64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000962,src:000003,op:int8,pos:120,val:-128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000963,src:000003,op:int8,pos:139,val:+16,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000964,src:000003,op:int16,pos:81,val:+127,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000965,src:000003,op:int16,pos:95,val:+1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000966,src:000003,op:int16,pos:97,val:be:+127,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000967,src:000003,op:int16,pos:98,val:+1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000968,src:000003,op:int16,pos:100,val:-1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000969,src:000003,op:int16,pos:102,val:be:+127,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000970,src:000003,op:int16,pos:107,val:-128,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000971,src:000003,op:int16,pos:108,val:be:+127,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000972,src:000003,op:int16,pos:109,val:be:+100,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000973,src:000003,op:int16,pos:125,val:+1000,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000974,src:000003,op:int16,pos:137,val:be:+32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000975,src:000003,op:int16,pos:150,val:be:+255,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000976,src:000003,op:int32,pos:1,val:be:+65535 (100%) rename src/{mint => exchange}/afl-tests/id:000977,src:000003,op:int32,pos:54,val:+32768,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000978,src:000003,op:int32,pos:80,val:be:+32767,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000979,src:000003,op:int32,pos:84,val:+2147483647 (100%) rename src/{mint => exchange}/afl-tests/id:000980,src:000003,op:int32,pos:89,val:be:+4096,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000981,src:000003,op:int32,pos:98,val:-129,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000982,src:000003,op:int32,pos:99,val:-32769,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000983,src:000003,op:int32,pos:99,val:+100663045,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000984,src:000003,op:int32,pos:101,val:+64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000985,src:000003,op:int32,pos:102,val:be:+32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000986,src:000003,op:int32,pos:105,val:be:+512,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000987,src:000003,op:int32,pos:106,val:+100,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000988,src:000003,op:int32,pos:109,val:-100663046,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000989,src:000003,op:int32,pos:120,val:+255,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000990,src:000003,op:int32,pos:121,val:+1000,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000991,src:000003,op:int32,pos:121,val:-100663046,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000992,src:000003,op:int32,pos:121,val:be:+65535,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000993,src:000003,op:int32,pos:130,val:+100663045,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000994,src:000003,op:int32,pos:135,val:be:+32,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000995,src:000003,op:int32,pos:136,val:be:+127,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000996,src:000003,op:int32,pos:138,val:+1,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000997,src:000003,op:int32,pos:147,val:be:+127,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000998,src:000003,op:ext_AO,pos:29,+cov (100%) rename src/{mint => exchange}/afl-tests/id:000999,src:000003,op:ext_AO,pos:31,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001000,src:000003,op:ext_AO,pos:37,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001001,src:000003,op:ext_AO,pos:40,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001002,src:000003,op:ext_AO,pos:44,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001003,src:000003,op:ext_AO,pos:44,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001004,src:000003,op:ext_AO,pos:51,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001005,src:000003,op:ext_AO,pos:54,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001006,src:000003,op:ext_AO,pos:55,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001007,src:000003,op:ext_AO,pos:61,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001008,src:000003,op:ext_AO,pos:64,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001009,src:000003,op:ext_AO,pos:66,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001010,src:000003,op:ext_AO,pos:67,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001011,src:000003,op:ext_AO,pos:71,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001012,src:000003,op:ext_AO,pos:80,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001013,src:000003,op:ext_AO,pos:84,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001014,src:000003,op:ext_AO,pos:84,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001015,src:000003,op:ext_AO,pos:85,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001016,src:000003,op:ext_AO,pos:86,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001017,src:000003,op:ext_AO,pos:89,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001018,src:000003,op:ext_AO,pos:90,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001019,src:000003,op:ext_AO,pos:90,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001020,src:000003,op:ext_AO,pos:101,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001021,src:000003,op:ext_AO,pos:102,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001022,src:000003,op:ext_AO,pos:103,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001023,src:000003,op:ext_AO,pos:106,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001024,src:000003,op:ext_AO,pos:107,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001025,src:000003,op:ext_AO,pos:109,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001026,src:000003,op:ext_AO,pos:109,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001027,src:000003,op:ext_AO,pos:113,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001028,src:000003,op:ext_AO,pos:117,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001029,src:000003,op:ext_AO,pos:122,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001030,src:000003,op:ext_AO,pos:122,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001031,src:000003,op:ext_AO,pos:124,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001032,src:000003,op:ext_AO,pos:125,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001033,src:000003,op:ext_AO,pos:125,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001034,src:000003,op:ext_AO,pos:126,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001035,src:000003,op:ext_AO,pos:126,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001036,src:000003,op:ext_AO,pos:129,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001037,src:000003,op:ext_AO,pos:129,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001038,src:000003,op:ext_AO,pos:130,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001039,src:000003,op:ext_AO,pos:135,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001040,src:000003,op:ext_AO,pos:136,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001041,src:000003,op:ext_AO,pos:140,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001042,src:000003,op:ext_AO,pos:142,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001043,src:000003,op:ext_AO,pos:142,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001044,src:000003,op:ext_AO,pos:145,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001045,src:000003,op:ext_AO,pos:147,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001046,src:000003,op:ext_AO,pos:149,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001047,src:000004,op:flip1,pos:0,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001048,src:000004,op:flip1,pos:4,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001049,src:000004,op:flip1,pos:4 (100%) rename src/{mint => exchange}/afl-tests/id:001050,src:000004,op:flip1,pos:18 (100%) rename src/{mint => exchange}/afl-tests/id:001051,src:000004,op:flip1,pos:55,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001052,src:000004,op:flip1,pos:59 (100%) rename src/{mint => exchange}/afl-tests/id:001053,src:000004,op:flip1,pos:87,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001054,src:000004,op:flip1,pos:89 (100%) rename src/{mint => exchange}/afl-tests/id:001055,src:000004,op:flip1,pos:106,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001056,src:000004,op:flip1,pos:108 (100%) rename src/{mint => exchange}/afl-tests/id:001057,src:000004,op:flip1,pos:108 (100%) rename src/{mint => exchange}/afl-tests/id:001058,src:000004,op:flip1,pos:110 (100%) rename src/{mint => exchange}/afl-tests/id:001059,src:000004,op:flip1,pos:111,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001060,src:000004,op:flip1,pos:112 (100%) rename src/{mint => exchange}/afl-tests/id:001061,src:000004,op:flip1,pos:134,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001062,src:000004,op:flip1,pos:138,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001063,src:000004,op:flip1,pos:152,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001064,src:000004,op:flip1,pos:154,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001065,src:000004,op:flip1,pos:475,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001066,src:000004,op:flip1,pos:651,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001067,src:000004,op:flip1,pos:783,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001068,src:000004,op:flip1,pos:1150 (100%) rename src/{mint => exchange}/afl-tests/id:001069,src:000004,op:flip1,pos:1278,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001070,src:000004,op:flip1,pos:1649 (100%) rename src/{mint => exchange}/afl-tests/id:001071,src:000004,op:flip1,pos:1662,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001072,src:000004,op:flip1,pos:2148 (100%) rename src/{mint => exchange}/afl-tests/id:001073,src:000004,op:flip1,pos:2437,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001074,src:000004,op:flip1,pos:2647 (100%) rename src/{mint => exchange}/afl-tests/id:001075,src:000004,op:flip1,pos:3146 (100%) rename src/{mint => exchange}/afl-tests/id:001076,src:000004,op:flip1,pos:3205,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001077,src:000004,op:flip1,pos:3645 (100%) rename src/{mint => exchange}/afl-tests/id:001078,src:000004,op:flip1,pos:3980,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001079,src:000004,op:flip1,pos:4144 (100%) rename src/{mint => exchange}/afl-tests/id:001080,src:000004,op:flip1,pos:4198,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001081,src:000004,op:flip1,pos:4249,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001082,src:000004,op:flip1,pos:4291,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001083,src:000004,op:flip1,pos:4673,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001084,src:000004,op:flip1,pos:5206,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001085,src:000004,op:flip1,pos:5361,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001086,src:000004,op:flip1,pos:5362 (100%) rename src/{mint => exchange}/afl-tests/id:001087,src:000004,op:flip1,pos:5507,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001088,src:000004,op:flip1,pos:6639 (100%) rename src/{mint => exchange}/afl-tests/id:001089,src:000004,op:flip1,pos:7138 (100%) rename src/{mint => exchange}/afl-tests/id:001090,src:000004,op:flip1,pos:8027,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001091,src:000004,op:flip1,pos:8136 (100%) rename src/{mint => exchange}/afl-tests/id:001092,src:000004,op:flip1,pos:8636 (100%) rename src/{mint => exchange}/afl-tests/id:001093,src:000004,op:flip1,pos:8655,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001094,src:000004,op:flip1,pos:8712 (100%) rename src/{mint => exchange}/afl-tests/id:001095,src:000004,op:flip1,pos:8768 (100%) rename src/{mint => exchange}/afl-tests/id:001096,src:000004,op:flip1,pos:8825 (100%) rename src/{mint => exchange}/afl-tests/id:001097,src:000004,op:flip1,pos:8840,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001098,src:000004,op:flip1,pos:8869,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001099,src:000004,op:flip1,pos:8882,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001100,src:000004,op:flip1,pos:8910,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001101,src:000004,op:flip1,pos:9001,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001102,src:000004,op:flip1,pos:9584,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001103,src:000004,op:flip1,pos:9658,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001104,src:000004,op:flip1,pos:9808,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001105,src:000004,op:flip1,pos:9954,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001106,src:000004,op:flip1,pos:10093,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001107,src:000004,op:flip1,pos:10417 (100%) rename src/{mint => exchange}/afl-tests/id:001108,src:000004,op:flip1,pos:10430,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001109,src:000004,op:flip1,pos:10639 (100%) rename src/{mint => exchange}/afl-tests/id:001110,src:000004,op:flip1,pos:10846 (100%) rename src/{mint => exchange}/afl-tests/id:001111,src:000004,op:flip1,pos:10957,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001112,src:000004,op:flip1,pos:11055 (100%) rename src/{mint => exchange}/afl-tests/id:001113,src:000004,op:flip1,pos:11176,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001114,src:000004,op:flip1,pos:11262 (100%) rename src/{mint => exchange}/afl-tests/id:001115,src:000004,op:flip1,pos:11471 (100%) rename src/{mint => exchange}/afl-tests/id:001116,src:000004,op:flip1,pos:11887 (100%) rename src/{mint => exchange}/afl-tests/id:001117,src:000004,op:flip1,pos:11996,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001118,src:000004,op:flip1,pos:12094 (100%) rename src/{mint => exchange}/afl-tests/id:001119,src:000004,op:flip1,pos:12302 (100%) rename src/{mint => exchange}/afl-tests/id:001120,src:000004,op:flip1,pos:12511 (100%) rename src/{mint => exchange}/afl-tests/id:001121,src:000004,op:flip1,pos:12567,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001122,src:000004,op:flip1,pos:12660,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001123,src:000004,op:flip1,pos:13342 (100%) rename src/{mint => exchange}/afl-tests/id:001124,src:000004,op:flip1,pos:13550 (100%) rename src/{mint => exchange}/afl-tests/id:001125,src:000004,op:flip1,pos:13758 (100%) rename src/{mint => exchange}/afl-tests/id:001126,src:000004,op:flip1,pos:13968 (100%) rename src/{mint => exchange}/afl-tests/id:001127,src:000004,op:flip1,pos:14134,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001128,src:000004,op:flip1,pos:14599,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001129,src:000004,op:flip1,pos:14603 (100%) rename src/{mint => exchange}/afl-tests/id:001130,src:000004,op:flip1,pos:15122,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001131,src:000004,op:flip1,pos:15271,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001132,src:000004,op:flip1,pos:15295,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001133,src:000004,op:flip1,pos:16328,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001134,src:000004,op:flip1,pos:17507 (100%) rename src/{mint => exchange}/afl-tests/id:001135,src:000004,op:flip1,pos:17983,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001136,src:000004,op:flip1,pos:18109,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001137,src:000004,op:flip1,pos:19291,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001138,src:000004,op:flip1,pos:20068,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001139,src:000004,op:flip1,pos:20075,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001140,src:000004,op:flip1,pos:20264,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001141,src:000004,op:flip1,pos:20372,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001142,src:000004,op:flip1,pos:20845,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001143,src:000004,op:flip1,pos:21044 (100%) rename src/{mint => exchange}/afl-tests/id:001144,src:000004,op:flip1,pos:21072,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001145,src:000004,op:flip1,pos:22111,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001146,src:000004,op:flip1,pos:22404,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001147,src:000004,op:flip1,pos:23777,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001148,src:000004,op:flip1,pos:24046,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001149,src:000004,op:flip1,pos:27360,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001150,src:000004,op:flip1,pos:27547,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001151,src:000004,op:flip1,pos:28206,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001152,src:000004,op:flip1,pos:29132,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001153,src:000004,op:flip1,pos:29181,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001154,src:000004,op:flip1,pos:30141,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001155,src:000004,op:flip1,pos:30860,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001156,src:000004,op:flip1,pos:31016,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001157,src:000004,op:flip1,pos:31260,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001158,src:000004,op:flip1,pos:32301,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001159,src:000004,op:flip1,pos:32476,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001160,src:000004,op:flip1,pos:33475,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001161,src:000004,op:flip2,pos:108 (100%) rename src/{mint => exchange}/afl-tests/id:001162,src:000004,op:flip2,pos:272,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001163,src:000004,op:flip2,pos:501,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001164,src:000004,op:flip2,pos:1593,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001165,src:000004,op:flip2,pos:1877,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001166,src:000004,op:flip2,pos:2863,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001167,src:000004,op:flip2,pos:3189,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001168,src:000004,op:flip2,pos:5916,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001169,src:000004,op:flip2,pos:6474,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001170,src:000004,op:flip2,pos:8695,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001171,src:000004,op:flip2,pos:9101,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001172,src:000004,op:flip2,pos:9350,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001173,src:000004,op:flip2,pos:9675,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001174,src:000004,op:flip2,pos:9779,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001175,src:000004,op:flip2,pos:10123,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001176,src:000004,op:flip2,pos:10486,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001177,src:000004,op:flip2,pos:11222,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001178,src:000004,op:flip2,pos:11504,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001179,src:000004,op:flip2,pos:13892,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001180,src:000004,op:flip2,pos:14104,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001181,src:000004,op:flip2,pos:16451,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001182,src:000004,op:flip2,pos:17186,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001183,src:000004,op:flip2,pos:18869,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001184,src:000004,op:flip2,pos:20039,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001185,src:000004,op:flip2,pos:20319,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001186,src:000004,op:flip2,pos:20987,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001187,src:000004,op:flip2,pos:22115,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001188,src:000004,op:flip2,pos:22139,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001189,src:000004,op:flip2,pos:22530,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001190,src:000004,op:flip2,pos:22871,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001191,src:000004,op:flip2,pos:22878,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001192,src:000004,op:flip2,pos:23586,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001193,src:000004,op:flip2,pos:24806,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001194,src:000004,op:flip2,pos:25248,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001195,src:000004,op:flip2,pos:26529,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001196,src:000004,op:flip2,pos:28158,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001197,src:000004,op:flip2,pos:29113,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001198,src:000004,op:flip2,pos:29233,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001199,src:000004,op:flip2,pos:31755,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001200,src:000004,op:flip2,pos:32441,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001201,src:000004,op:flip2,pos:32888,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001202,src:000004,op:flip2,pos:33869,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001203,src:000004,op:flip4,pos:399,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001204,src:000004,op:flip4,pos:1377,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001205,src:000004,op:flip4,pos:1830,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001206,src:000004,op:flip4,pos:3239,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001207,src:000004,op:flip4,pos:3591,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001208,src:000004,op:flip4,pos:3708,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001209,src:000004,op:flip4,pos:4350,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001210,src:000004,op:flip4,pos:4487,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001211,src:000004,op:flip4,pos:4584,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001212,src:000004,op:flip4,pos:5470,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001213,src:000004,op:flip4,pos:6559,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001214,src:000004,op:flip4,pos:6626,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001215,src:000004,op:flip4,pos:7110,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001216,src:000004,op:flip4,pos:7148,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001217,src:000004,op:flip4,pos:7168,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001218,src:000004,op:flip4,pos:7715,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001219,src:000004,op:flip4,pos:9108,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001220,src:000004,op:flip4,pos:9386,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001221,src:000004,op:flip4,pos:9592,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001222,src:000004,op:flip4,pos:9878,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001223,src:000004,op:flip4,pos:9972,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001224,src:000004,op:flip4,pos:10287,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001225,src:000004,op:flip4,pos:10737,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001226,src:000004,op:flip4,pos:12260,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001227,src:000004,op:flip4,pos:15195,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001228,src:000004,op:flip4,pos:15571,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001229,src:000004,op:flip4,pos:19500,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001230,src:000004,op:flip4,pos:20444,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001231,src:000004,op:flip4,pos:22249,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001232,src:000004,op:flip4,pos:22380,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001233,src:000004,op:flip4,pos:25459,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001234,src:000004,op:flip4,pos:27094,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001235,src:000004,op:flip4,pos:28097,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001236,src:000004,op:flip4,pos:28763,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001237,src:000004,op:flip4,pos:28897,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001238,src:000004,op:flip4,pos:29158,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001239,src:000004,op:flip4,pos:29314,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001240,src:000004,op:flip4,pos:29379,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001241,src:000004,op:flip4,pos:30828,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001242,src:000004,op:flip4,pos:31450,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001243,src:000004,op:flip4,pos:32113,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001244,src:000004,op:flip4,pos:32563,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001245,src:000004,op:flip4,pos:32844,+cov (100%) rename src/{mint => exchange}/afl-tests/id:001246,src:000004,op:flip4,pos:33202,+cov (100%) rename src/{mint/taler-mint-aggregator.c => exchange/taler-exchange-aggregator.c} (90%) rename src/{mint/taler-mint-httpd.c => exchange/taler-exchange-httpd.c} (88%) rename src/{mint/taler-mint-httpd.h => exchange/taler-exchange-httpd.h} (80%) rename src/{mint/taler-mint-httpd_admin.c => exchange/taler-exchange-httpd_admin.c} (95%) rename src/{mint/taler-mint-httpd_admin.h => exchange/taler-exchange-httpd_admin.h} (91%) rename src/{mint/taler-mint-httpd_db.c => exchange/taler-exchange-httpd_db.c} (94%) rename src/{mint/taler-mint-httpd_db.h => exchange/taler-exchange-httpd_db.h} (93%) rename src/{mint/taler-mint-httpd_deposit.c => exchange/taler-exchange-httpd_deposit.c} (94%) rename src/{mint/taler-mint-httpd_deposit.h => exchange/taler-exchange-httpd_deposit.h} (92%) rename src/{mint/taler-mint-httpd_keystate.c => exchange/taler-exchange-httpd_keystate.c} (91%) rename src/{mint/taler-mint-httpd_keystate.h => exchange/taler-exchange-httpd_keystate.h} (87%) rename src/{mint/taler-mint-httpd_mhd.c => exchange/taler-exchange-httpd_mhd.c} (93%) rename src/{mint/taler-mint-httpd_mhd.h => exchange/taler-exchange-httpd_mhd.h} (96%) rename src/{mint/taler-mint-httpd_parsing.c => exchange/taler-exchange-httpd_parsing.c} (99%) rename src/{mint/taler-mint-httpd_parsing.h => exchange/taler-exchange-httpd_parsing.h} (98%) rename src/{mint/taler-mint-httpd_refresh.c => exchange/taler-exchange-httpd_refresh.c} (96%) rename src/{mint/taler-mint-httpd_refresh.h => exchange/taler-exchange-httpd_refresh.h} (95%) rename src/{mint/taler-mint-httpd_reserve.c => exchange/taler-exchange-httpd_reserve.c} (95%) rename src/{mint/taler-mint-httpd_reserve.h => exchange/taler-exchange-httpd_reserve.h} (94%) rename src/{mint/taler-mint-httpd_responses.c => exchange/taler-exchange-httpd_responses.c} (94%) rename src/{mint/taler-mint-httpd_responses.h => exchange/taler-exchange-httpd_responses.h} (94%) rename src/{mint/taler-mint-httpd_test.c => exchange/taler-exchange-httpd_test.c} (98%) rename src/{mint/taler-mint-httpd_test.h => exchange/taler-exchange-httpd_test.h} (97%) rename src/{mint/taler-mint-httpd_tracking.c => exchange/taler-exchange-httpd_tracking.c} (96%) rename src/{mint/taler-mint-httpd_tracking.h => exchange/taler-exchange-httpd_tracking.h} (93%) rename src/{mint/taler-mint-httpd_validation.c => exchange/taler-exchange-httpd_validation.c} (95%) rename src/{mint/taler-mint-httpd_validation.h => exchange/taler-exchange-httpd_validation.h} (93%) rename src/{mint/taler-mint-httpd_wire.c => exchange/taler-exchange-httpd_wire.c} (92%) rename src/{mint/taler-mint-httpd_wire.h => exchange/taler-exchange-httpd_wire.h} (94%) rename src/{mint/test-mint-home => exchange/test-exchange-home}/master.priv (100%) rename src/{mint/test_taler_mint_httpd.sh => exchange/test_taler_exchange_httpd.sh} (70%) mode change 100755 => 100644 rename src/{mint/test_taler_mint_httpd_afl.sh => exchange/test_taler_exchange_httpd_afl.sh} (70%) mode change 100755 => 100644 rename src/{mint => exchange}/test_taler_mint_httpd.data (99%) create mode 100644 src/exchangedb/Makefile.am rename src/{mintdb/mintdb_keyio.c => exchangedb/exchangedb_keyio.c} (82%) rename src/{mintdb/mintdb_plugin.c => exchangedb/exchangedb_plugin.c} (80%) rename src/{mintdb/perf_taler_mintdb.c => exchangedb/perf_taler_exchangedb.c} (58%) rename src/{mintdb/perf_taler_mintdb_init.c => exchangedb/perf_taler_exchangedb_init.c} (77%) create mode 100644 src/exchangedb/perf_taler_exchangedb_init.h rename src/{mintdb/perf_taler_mintdb_interpreter.c => exchangedb/perf_taler_exchangedb_interpreter.c} (77%) rename src/{mintdb/perf_taler_mintdb_interpreter.h => exchangedb/perf_taler_exchangedb_interpreter.h} (56%) rename src/{mintdb/perf_taler_mintdb_values.h => exchangedb/perf_taler_exchangedb_values.h} (85%) rename src/{mintdb/plugin_mintdb_common.c => exchangedb/plugin_exchangedb_common.c} (82%) rename src/{mintdb/plugin_mintdb_postgres.c => exchangedb/plugin_exchangedb_postgres.c} (94%) rename src/{mintdb/test-mint-db-postgres.conf => exchangedb/test-exchange-db-postgres.conf} (82%) rename src/{mintdb/test_mintdb.c => exchangedb/test_exchangedb.c} (93%) rename src/{mintdb/test_mintdb_deposits.c => exchangedb/test_exchangedb_deposits.c} (82%) rename src/{mintdb/test_mintdb_keyio.c => exchangedb/test_exchangedb_keyio.c} (83%) create mode 100644 src/exchangedb/test_perf_taler_exchangedb.c rename src/include/{taler_mint_service.h => taler_exchange_service.h} (70%) rename src/include/{taler_mintdb_lib.h => taler_exchangedb_lib.h} (65%) rename src/include/{taler_mintdb_plugin.h => taler_exchangedb_plugin.h} (84%) delete mode 100644 src/mint-lib/Makefile.am delete mode 100644 src/mint-tools/Makefile.am delete mode 100644 src/mint/.gitignore delete mode 100644 src/mint/Makefile.am delete mode 100644 src/mintdb/Makefile.am delete mode 100644 src/mintdb/perf_taler_mintdb_init.h delete mode 100644 src/mintdb/test_perf_taler_mintdb.c diff --git a/README b/README index a5211ee16..78665b551 100644 --- a/README +++ b/README @@ -6,7 +6,7 @@ What is Taler? Taler is an electronic payment system providing the ability to pay anonymously using digital cash. Taler consists of a network protocol -definition (using a RESTful API over HTTP), a Mint (which creates +definition (using a RESTful API over HTTP), a Exchange (which creates digital coins), a Wallet (which allows customers to manage, store and spend digital coins), and a Merchant website which allows customers to spend their digital coins. Naturally, each Merchant is different, but @@ -19,7 +19,7 @@ is free software and a GNU package (http://www.gnu.org/). This is not even a release yet, but some raw development prototype that does not work yet. This package also only includes the Taler -mint, not the other components of the system. +exchange, not the other components of the system. Documentation about Taler can be found at http://taler.net/. @@ -27,7 +27,7 @@ Documentation about Taler can be found at http://taler.net/. Dependencies: ============= -These are the direct dependencies for running a Taler mint: +These are the direct dependencies for running a Taler exchange: - GNUnet >= 0.10.2 - GNU libmicrohttpd >= 0.9.38 @@ -48,50 +48,50 @@ src/util/ src/pq/ -- Postgres-specific utility functions -src/mintdb/ - -- Mint database backend (with DB-specific plugins) +src/exchangedb/ + -- Exchange database backend (with DB-specific plugins) -src/mint/ - -- taler mint server +src/exchange/ + -- taler exchange server -src/mint-tools/ - -- taler mint helper programs +src/exchange-tools/ + -- taler exchange helper programs -src/mint-lib/ - -- libtalermint: C API to issue HTTP requests to mint +src/exchange-lib/ + -- libtalerexchange: C API to issue HTTP requests to exchange Getting Started ============== -The following steps illustrate how to set up a mint HTTP server. -They take as a stub for configuring the mint the content of 'contrib/mint-template/config/'. +The following steps illustrate how to set up a exchange HTTP server. +They take as a stub for configuring the exchange the content of 'contrib/exchange-template/config/'. 1) Create a 'test/' directory and copy the stubs in it: mkdir -p test/config/ -cp mint/contrib/mint-template/config/* test/config/ +cp exchange/contrib/exchange-template/config/* test/config/ cd test/ -2) Create the mint's master with the tool 'gnunet-ecc': +2) Create the exchange's master with the tool 'gnunet-ecc': gnunet-ecc -g1 master.priv -3) Edit config/mint-common.conf by replacing the right value on the line with the +3) Edit config/exchange-common.conf by replacing the right value on the line with the MASTER_PUBLIC_KEY entry with the fresh generated (ASCII version of) master.priv. This ASCII version is obtained by issuing: gnunet-ecc -p master.priv -4) Generate other mint related keys ('denomination' and 'signing' keys), by issuing: +4) Generate other exchange related keys ('denomination' and 'signing' keys), by issuing: -taler-mint-keyup -d `pwd` -m master.priv +taler-exchange-keyup -d `pwd` -m master.priv 5) Check with: -taler-mint-keycheck -d `pwd` +taler-exchange-keycheck -d `pwd` -6) A mint needs a database to operate, so the following instructions relate to +6) A exchange needs a database to operate, so the following instructions relate to how to set up PostgreSQL. On debian, the two packages needed are: * postgresql @@ -99,8 +99,8 @@ how to set up PostgreSQL. On debian, the two packages needed are: For other operating systems, please refer to the relevant documentation. -In this settlement, the mint wll use a database called 'talercheck' and will -run under the username through which 'taler-mint-httpd' is launched. Thus assuming +In this settlement, the exchange wll use a database called 'talercheck' and will +run under the username through which 'taler-exchange-httpd' is launched. Thus assuming that this user is 'demo', we need to create a 'demo' role for postgresql and make him the owner of 'talercheck' database. @@ -117,7 +117,7 @@ CREATE DATABASE talercheck OWNER demo; # quit with CTRL-D 7) If any previous step has been successful, it is now possbile to start up the -mint web server (by default it will listen on port 4241); issue: +exchange web server (by default it will listen on port 4241); issue: -taler-mint-httpd -d `pwd` # assuming we did not move outside of the 'test' directory +taler-exchange-httpd -d `pwd` # assuming we did not move outside of the 'test' directory diff --git a/bootstrap b/bootstrap old mode 100755 new mode 100644 diff --git a/configure.ac b/configure.ac index 95457e5b4..6004a7d66 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ # # AC_PREREQ([2.69]) -AC_INIT([taler-mint], [0.0.0], [taler-bug@gnunet.org]) +AC_INIT([taler-exchange], [0.0.0], [taler-bug@gnunet.org]) AC_CONFIG_SRCDIR([src/util/json.c]) AC_CONFIG_HEADERS([taler_config.h]) # support for non-recursive builds @@ -359,9 +359,9 @@ AC_CONFIG_FILES([Makefile src/pq/Makefile src/bank-lib/Makefile src/wire/Makefile - src/mintdb/Makefile - src/mint/Makefile - src/mint-tools/Makefile - src/mint-lib/Makefile + src/exchangedb/Makefile + src/exchange/Makefile + src/exchange-tools/Makefile + src/exchange-lib/Makefile ]) AC_OUTPUT diff --git a/contrib/coverage.sh b/contrib/coverage.sh old mode 100755 new mode 100644 index 15318967c..cce622283 --- a/contrib/coverage.sh +++ b/contrib/coverage.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Run from 'taler-mint/' top-level directory to generate +# Run from 'taler-exchange/' top-level directory to generate # code coverage data. TOP=`pwd` mkdir -p doc/coverage/ diff --git a/contrib/exchange-template/README b/contrib/exchange-template/README new file mode 100644 index 000000000..dbbd5c304 --- /dev/null +++ b/contrib/exchange-template/README @@ -0,0 +1 @@ +This directory is a template for the exchange directory. diff --git a/contrib/mint-template/config/mint-common.conf b/contrib/exchange-template/config/exchange-common.conf similarity index 55% rename from contrib/mint-template/config/mint-common.conf rename to contrib/exchange-template/config/exchange-common.conf index 78a3310a1..cb34ddcd9 100644 --- a/contrib/mint-template/config/mint-common.conf +++ b/contrib/exchange-template/config/exchange-common.conf @@ -1,15 +1,15 @@ -[mint] -# Currency supported by the mint (can only be one) +[exchange] +# Currency supported by the exchange (can only be one) CURRENCY = EUR -# Wire format supported by the mint, case-insensitive. +# Wire format supported by the exchange, case-insensitive. # Examples for formats include 'test' for testing and 'sepa' (for EU IBAN). WIREFORMAT = SEPA -# HTTP port the mint listens to +# HTTP port the exchange listens to PORT = 4241 -# Master public key used to sign the mint's various keys +# Master public key used to sign the exchange's various keys MASTER_PUBLIC_KEY = NEGTF62MNGVPZNW19V7S3CRS9D7K04MAHDGX3N6WY2NXREN26J80 # How to access our database @@ -17,12 +17,12 @@ DB = postgres TESTRUN = YES -[mintdb-postgres] +[exchangedb-postgres] DB_CONN_STR = "postgres:///talercheck" -[mint-wire-sepa] +[exchange-wire-sepa] SEPA_RESPONSE_FILE = "sepa.json" -[mint-wire-test] +[exchange-wire-test] REDIRECT_URL = "http://test/" diff --git a/contrib/mint-template/config/mint-keyup.conf b/contrib/exchange-template/config/exchange-keyup.conf similarity index 98% rename from contrib/mint-template/config/mint-keyup.conf rename to contrib/exchange-template/config/exchange-keyup.conf index d8bbc9d20..7eebfe975 100644 --- a/contrib/mint-template/config/mint-keyup.conf +++ b/contrib/exchange-template/config/exchange-keyup.conf @@ -1,4 +1,4 @@ -[mint_keys] +[exchange_keys] # how long is one signkey valid? signkey_duration = 4 weeks diff --git a/contrib/mint-template/README b/contrib/mint-template/README deleted file mode 100644 index fce5e0180..000000000 --- a/contrib/mint-template/README +++ /dev/null @@ -1 +0,0 @@ -This directory is a template for the mint directory. diff --git a/doc/Makefile.am b/doc/Makefile.am index 51e1ed897..0b3dc39c4 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -4,11 +4,11 @@ SUBDIRS = . doxygen man_MANS = \ taler-auditor-sign.1 \ - taler-mint-dbinit.1 \ - taler-mint-httpd.1 \ - taler-mint-keyup.1 \ - taler-mint-keycheck.1 \ - taler-mint-reservemod.1 \ + taler-exchange-dbinit.1 \ + taler-exchange-httpd.1 \ + taler-exchange-keyup.1 \ + taler-exchange-keycheck.1 \ + taler-exchange-reservemod.1 \ taler.conf.5 EXTRA_DIST = \ diff --git a/doc/coding-style.txt b/doc/coding-style.txt index 093e14d31..fe7bfed12 100644 --- a/doc/coding-style.txt +++ b/doc/coding-style.txt @@ -14,10 +14,10 @@ Naming conventions: SHOULD NOT be included from outside of their own directory + end in "_lib" for "simple" libraries + end in "_plugin" for plugins - + end in "_service" for libraries accessing a service, i.e. the mint + + end in "_service" for libraries accessing a service, i.e. the exchange * binaries: - + taler-mint-xxx: mint programs + + taler-exchange-xxx: exchange programs + taler-merchant-xxx: merchant programs (demos) + taler-wallet-xxx: wallet programs + plugins should be libtaler_plugin_xxx_yyy.so: plugin yyy for API xxx @@ -25,16 +25,16 @@ Naming conventions: * logging + tools use their full name in GNUNET_log_setup - (i.e. 'taler-mint-keyup') and log using plain 'GNUNET_log'. + (i.e. 'taler-exchange-keyup') and log using plain 'GNUNET_log'. + pure libraries (without associated service) use 'GNUNET_log_from' with the component set to their library name (without lib or '.so'), which should also be their directory name (i.e. 'util') + plugin libraries (without associated service) use 'GNUNET_log_from' with the component set to their type and plugin name (without lib or '.so'), - which should also be their directory name (i.e. 'mintdb-postgres') + which should also be their directory name (i.e. 'exchangedb-postgres') + libraries with associated service) use 'GNUNET_log_from' with the name of the service, which should also be their - directory name (i.e. 'mint') + directory name (i.e. 'exchange') * configuration + same rules as for GNUnet @@ -44,7 +44,7 @@ Naming conventions: MUST match the subdirectory of src/ in which the symbol is defined + from libtalerutil start just with TALER_, without subsystemname + if scope is ONE binary and symbols are not in a shared library, - use binary-specific prefix (such as TMH = taler-mint-httpd) for + use binary-specific prefix (such as TMH = taler-exchange-httpd) for globals, possibly followed by the subsystem (TMH_DB_xxx). * structs: diff --git a/doc/doxygen/Makefile.am b/doc/doxygen/Makefile.am index 6b6f1ed72..da4dbc140 100644 --- a/doc/doxygen/Makefile.am +++ b/doc/doxygen/Makefile.am @@ -5,14 +5,14 @@ all: "\tmake full - full documentation with dependency graphs (slow)\n" \ "\tmake fast - fast mode without dependency graphs" -full: taler-mint.doxy +full: taler-exchange.doxy doxygen $< -fast: taler-mint.doxy +fast: taler-exchange.doxy sed 's/\(HAVE_DOT.*=\).*/\1 NO/' $< | doxygen - clean: rm -rf html -EXTRA_DIST = taler-mint.doxy +EXTRA_DIST = taler-exchange.doxy diff --git a/doc/doxygen/taler-mint.doxy b/doc/doxygen/taler-mint.doxy index 2949fac0d..23c2fbe07 100644 --- a/doc/doxygen/taler-mint.doxy +++ b/doc/doxygen/taler-mint.doxy @@ -4,7 +4,7 @@ # Project related configuration options #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = "GNU Taler: Mint" +PROJECT_NAME = "GNU Taler: Exchange" PROJECT_NUMBER = 0.0 OUTPUT_DIRECTORY = . CREATE_SUBDIRS = YES diff --git a/doc/logos/fonts/OldNewspaperTypes.ttf b/doc/logos/fonts/OldNewspaperTypes.ttf old mode 100755 new mode 100644 diff --git a/doc/paper/rfc.bib b/doc/paper/rfc.bib index 700f3a99a..99c427e58 100644 --- a/doc/paper/rfc.bib +++ b/doc/paper/rfc.bib @@ -9025,7 +9025,7 @@ organization="Internet Engineering Task Force", year=1978, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc748.txt", } @@ -13671,7 +13671,7 @@ organization="Internet Engineering Task Force", year=1989, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc1097.txt", } @@ -14377,7 +14377,7 @@ organization="Internet Engineering Task Force", year=1990, month=apr, - day="1", + day="1", note="Updated by RFCs 2549, 6214", url="http://www.ietf.org/rfc/rfc1149.txt", } @@ -15260,7 +15260,7 @@ organization="Internet Engineering Task Force", year=1991, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc1216.txt", } @@ -15274,7 +15274,7 @@ organization="Internet Engineering Task Force", year=1991, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc1217.txt", } @@ -16551,7 +16551,7 @@ organization="Internet Engineering Task Force", year=1992, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc1313.txt", } @@ -18223,7 +18223,7 @@ organization="Internet Engineering Task Force", year=1993, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc1437.txt", } @@ -18237,7 +18237,7 @@ organization="Internet Engineering Task Force", year=1993, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc1438.txt", } @@ -20478,7 +20478,7 @@ organization="Internet Engineering Task Force", year=1994, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc1605.txt", } @@ -20492,7 +20492,7 @@ organization="Internet Engineering Task Force", year=1994, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc1606.txt", } @@ -20506,7 +20506,7 @@ organization="Internet Engineering Task Force", year=1994, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc1607.txt", } @@ -22753,7 +22753,7 @@ organization="Internet Engineering Task Force", year=1995, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc1776.txt", } @@ -24716,7 +24716,7 @@ organization="Internet Engineering Task Force", year=1996, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc1924.txt", } @@ -24730,7 +24730,7 @@ organization="Internet Engineering Task Force", year=1996, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc1925.txt", } @@ -24744,7 +24744,7 @@ organization="Internet Engineering Task Force", year=1996, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc1926.txt", } @@ -24758,7 +24758,7 @@ organization="Internet Engineering Task Force", year=1996, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc1927.txt", } @@ -27077,7 +27077,7 @@ organization="Internet Engineering Task Force", year=1997, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc2100.txt", } @@ -30038,7 +30038,7 @@ organization="Internet Engineering Task Force", year=1998, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc2321.txt", } @@ -30052,7 +30052,7 @@ organization="Internet Engineering Task Force", year=1998, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc2322.txt", } @@ -30066,7 +30066,7 @@ organization="Internet Engineering Task Force", year=1998, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc2323.txt", } @@ -30080,7 +30080,7 @@ organization="Internet Engineering Task Force", year=1998, month=apr, - day="1", + day="1", note="Updated by RFC 7168", url="http://www.ietf.org/rfc/rfc2324.txt", } @@ -30095,7 +30095,7 @@ organization="Internet Engineering Task Force", year=1998, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc2325.txt", } @@ -33099,7 +33099,7 @@ organization="Internet Engineering Task Force", year=1999, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc2549.txt", } @@ -33113,7 +33113,7 @@ organization="Internet Engineering Task Force", year=1999, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc2550.txt", } @@ -33127,7 +33127,7 @@ organization="Internet Engineering Task Force", year=1999, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc2551.txt", } @@ -36388,7 +36388,7 @@ organization="Internet Engineering Task Force", year=2000, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc2795.txt", } @@ -40323,7 +40323,7 @@ organization="Internet Engineering Task Force", year=2001, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc3091.txt", } @@ -40337,7 +40337,7 @@ organization="Internet Engineering Task Force", year=2001, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc3092.txt", } @@ -40351,7 +40351,7 @@ organization="Internet Engineering Task Force", year=2001, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc3093.txt", } @@ -42397,7 +42397,7 @@ organization="Internet Engineering Task Force", year=2002, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc3251.txt", } @@ -42411,7 +42411,7 @@ organization="Internet Engineering Task Force", year=2002, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc3252.txt", } @@ -45820,7 +45820,7 @@ organization="Internet Engineering Task Force", year=2003, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc3514.txt", } @@ -48951,7 +48951,7 @@ organization="Internet Engineering Task Force", year=2004, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc3751.txt", } @@ -52675,7 +52675,7 @@ organization="Internet Engineering Task Force", year=2005, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc4041.txt", } @@ -52689,7 +52689,7 @@ organization="Internet Engineering Task Force", year=2005, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc4042.txt", } @@ -62743,7 +62743,7 @@ organization="Internet Engineering Task Force", year=2007, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc4824.txt", } @@ -68094,7 +68094,7 @@ organization="Internet Engineering Task Force", year=2008, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc5241.txt", } @@ -68108,7 +68108,7 @@ organization="Internet Engineering Task Force", year=2008, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc5242.txt", } @@ -71194,7 +71194,7 @@ @misc{rfc5486, author="D. Malas and D. Meyer", - title="{Session Peering for Multimedia Interconnect (SPEERMINT) Terminology}", + title="{Session Peering for Multimedia Interconnect (SPEEREXCHANGE) Terminology}", series="Request for Comments", number="5486", howpublished="RFC 5486 (Informational)", @@ -71529,7 +71529,7 @@ organization="Internet Engineering Task Force", year=2009, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc5513.txt", } @@ -71543,7 +71543,7 @@ organization="Internet Engineering Task Force", year=2009, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc5514.txt", } @@ -75706,7 +75706,7 @@ organization="Internet Engineering Task Force", year=2010, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc5841.txt", } @@ -77555,7 +77555,7 @@ organization="Internet Engineering Task Force", year=2011, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc5984.txt", } @@ -80463,7 +80463,7 @@ organization="Internet Engineering Task Force", year=2011, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc6214.txt", } @@ -80503,7 +80503,7 @@ organization="Internet Engineering Task Force", year=2011, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc6217.txt", } @@ -82898,7 +82898,7 @@ @misc{rfc6404, author="J. Seedorf and S. Niccolini and E. Chen and H. Scholz", - title="{Session PEERing for Multimedia INTerconnect (SPEERMINT) Security Threats and Suggested Countermeasures}", + title="{Session PEERing for Multimedia INTerconnect (SPEEREXCHANGE) Security Threats and Suggested Countermeasures}", series="Request for Comments", number="6404", howpublished="RFC 6404 (Informational)", @@ -82924,7 +82924,7 @@ @misc{rfc6406, author="D. Malas and J. Livingood", - title="{Session PEERing for Multimedia INTerconnect (SPEERMINT) Architecture}", + title="{Session PEERing for Multimedia INTerconnect (SPEEREXCHANGE) Architecture}", series="Request for Comments", number="6406", howpublished="RFC 6406 (Informational)", @@ -85310,7 +85310,7 @@ organization="Internet Engineering Task Force", year=2012, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc6592.txt", } @@ -85324,7 +85324,7 @@ organization="Internet Engineering Task Force", year=2012, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc6593.txt", } @@ -89460,7 +89460,7 @@ organization="Internet Engineering Task Force", year=2013, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc6919.txt", } @@ -89487,7 +89487,7 @@ organization="Internet Engineering Task Force", year=2013, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc6921.txt", } @@ -92639,7 +92639,7 @@ organization="Internet Engineering Task Force", year=2014, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc7168.txt", } @@ -92653,7 +92653,7 @@ organization="Internet Engineering Task Force", year=2014, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc7169.txt", } @@ -97095,7 +97095,7 @@ organization="Internet Engineering Task Force", year=2015, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc7511.txt", } @@ -97135,7 +97135,7 @@ organization="Internet Engineering Task Force", year=2015, month=apr, - day="1", + day="1", url="http://www.ietf.org/rfc/rfc7514.txt", } @@ -98711,4 +98711,3 @@ month=sep, url="http://www.ietf.org/rfc/rfc7651.txt", } - diff --git a/doc/taler-auditor-sign.1 b/doc/taler-auditor-sign.1 index ed264a496..177d0df04 100644 --- a/doc/taler-auditor-sign.1 +++ b/doc/taler-auditor-sign.1 @@ -1,7 +1,7 @@ .TH TALER\-AUDITOR\-SIGN 1 "Sep 15, 2015" "GNU Taler" .SH NAME -taler\-auditor\-sign \- Sign mint denomination as auditor. +taler\-auditor\-sign \- Sign exchange denomination as auditor. .SH SYNOPSIS .B taler\-auditor\-sign @@ -9,7 +9,7 @@ taler\-auditor\-sign \- Sign mint denomination as auditor. .br .SH DESCRIPTION -\fBtaler\-auditor\-sign\fP is a command line tool to be used by an auditor to sign that he is aware of certain keys being used by a mint. Using this signature, the auditor affirms that he will verify that the mint is properly accounting for those coins. +\fBtaler\-auditor\-sign\fP is a command line tool to be used by an auditor to sign that he is aware of certain keys being used by a exchange. Using this signature, the auditor affirms that he will verify that the exchange is properly accounting for those coins. .SH OPTIONS .B @@ -19,11 +19,11 @@ Location of the private EdDSA auditor key. If it does not exist, it will be cre .IP "\-h, \-\-help" Print short help on options. .B -.IP "\-m KEY, \-\-mint-key=KEY" -Public key of the mint in Crockford base32 encoding, for example as generated by gnunet\-ecc \-p. +.IP "\-m KEY, \-\-exchange-key=KEY" +Public key of the exchange in Crockford base32 encoding, for example as generated by gnunet\-ecc \-p. .B -.IP "\-r FILE, \-\-mint-request=FILE" -File with the mint's denomination key signing request as generated by taler\-mint\-keyup \-o. +.IP "\-r FILE, \-\-exchange-request=FILE" +File with the exchange's denomination key signing request as generated by taler\-exchange\-keyup \-o. .B .IP "\-o FILE, \-\-output=FILE" File where the auditor should write the EdDSA signature. @@ -32,4 +32,4 @@ File where the auditor should write the EdDSA signature. Report bugs by using Mantis or by sending electronic mail to .SH "SEE ALSO" -\fBtaler\-mint\-keyup\fP(1), \fBgnunet\-ecc\fP(1), \fBtaler.conf\fP(5) +\fBtaler\-exchange\-keyup\fP(1), \fBgnunet\-ecc\fP(1), \fBtaler.conf\fP(5) diff --git a/doc/taler-exchange-dbinit.1 b/doc/taler-exchange-dbinit.1 new file mode 100644 index 000000000..456a85b0c --- /dev/null +++ b/doc/taler-exchange-dbinit.1 @@ -0,0 +1,29 @@ +.TH TALER\-EXCHANGE\-DBINIT 1 "Apr 22, 2015" "GNU Taler" + +.SH NAME +taler\-exchange\-dbinit \- Initialize Taler exchange database. + +.SH SYNOPSIS +.B taler\-exchange\-dbinit +.RI [ options ] +.br + +.SH DESCRIPTION +\fBtaler\-exchange\-dbinit\fP is a command line tool to initialize the Taler exchange database. It creates the necessary tables and indices for the Taler exchange to operate. + +.SH OPTIONS +.B +.IP "\-d DIRNAME, \-\-exchange-dir=DIRNAME" +Use the configuration and other resources for the exchange to operate from DIRNAME. +.B +.IP "\-h, \-\-help" +Print short help on options. +.B +.IP "\-v, \-\-version" +Print version information. + +.SH BUGS +Report bugs by using Mantis or by sending electronic mail to + +.SH "SEE ALSO" +\fBtaler\-exchange\-httpd\fP(1), \fBtaler\-exchange\-keyup\fP(1), \fBtaler\-exchange\-reservemod\fP(1), \fBtaler.conf\fP(5) diff --git a/doc/taler-exchange-httpd.1 b/doc/taler-exchange-httpd.1 new file mode 100644 index 000000000..959f1ec76 --- /dev/null +++ b/doc/taler-exchange-httpd.1 @@ -0,0 +1,39 @@ +.TH TALER\-EXCHANGE\-HTTPD 1 "Apr 22, 2015" "GNU Taler" + +.SH NAME +taler\-exchange\-httpd \- Run Taler exchange (with RESTful API) + +.SH SYNOPSIS +.B taler\-exchange\-httpd +.RI [ options ] +.br + +.SH DESCRIPTION +\fBtaler\-exchange\-httpd\fP is a command line tool to run the Taler exchange (HTTP server). The required configuration, keys and database must exist before running this command. + +.SH OPTIONS +.B +.IP "\-C, \-\-connection-close" +Force each HTTP connection to be closed after each request (useful in combination with \-f to avoid having to wait for nc to time out). +.B +.IP "\-d DIRNAME, \-\-exchange-dir=DIRNAME" +Use the configuration and other resources for the exchange to operate from DIRNAME. +.B +.IP "\-h, \-\-help" +Print short help on options. +.B +.IP "\-v, \-\-version" +Print version information. +.B +.IP "\-f FILENAME, \-\-file\-input=FILENAME" +This option is only available if the exchange was compiled with the configure option +\-\-enable\-developer\-mode. It is used for generating test cases against the exchange using AFL. When this option is present, the HTTP server will (1) terminate after the first client's HTTP connection is completed, and (2) automatically start such a client using a helper process based on the 'nc' or 'ncat' binary using FILENAME as the standard input to the helper process. As a result, the process will effectively run with FILENAME as the input from an HTTP client and then immediately exit. This is useful to test taler\-exchange\-httpd against many different possible inputs in a controlled way. +.B +.IP \"-t SECONDS, \-\-timeout=SECONDS" +Specifies the number of SECONDS after which the HTTPD should close (idle) HTTP connections. + +.SH BUGS +Report bugs by using Mantis or by sending electronic mail to + +.SH "SEE ALSO" +\fBtaler\-exchange\-dbinit\fP(1), \fBtaler\-exchange\-keyup\fP(1), \fBtaler\-exchange\-reservemod\fP(1), \fBtaler.conf\fP(5) diff --git a/doc/taler-exchange-keycheck.1 b/doc/taler-exchange-keycheck.1 new file mode 100644 index 000000000..3f3382336 --- /dev/null +++ b/doc/taler-exchange-keycheck.1 @@ -0,0 +1,29 @@ +.TH TALER\-EXCHANGE\-KEYCHECK 1 "Apr 22, 2015" "GNU Taler" + +.SH NAME +taler\-exchange\-keycheck \- Check validity of Taler signing and denomination keys. + +.SH SYNOPSIS +.B taler\-exchange\-keycheck +.RI [ options ] +.br + +.SH DESCRIPTION +\fBtaler\-exchange\-keycheck\fP can be used to check if the signing and denomination keys in the operation directory are well-formed. This can be useful after importing fresh keys from the offline system to ensure that the files are correct. + +.SH OPTIONS +.B +.IP "\-d DIRNAME, \-\-exchange-dir=DIRNAME" +Use the configuration and other resources for the exchange to operate from DIRNAME. +.B +.IP "\-h, \-\-help" +Print short help on options. +.B +.IP "\-v, \-\-version" +Print version information. + +.SH BUGS +Report bugs by using Mantis or by sending electronic mail to + +.SH "SEE ALSO" +\fBtaler\-exchange\-httpd\fP(1), \fBtaler\-exchange\-keyup\fP(1), \fBtaler\-exchange\-dbinit\fP(1), \fBtaler.conf\fP(5) diff --git a/doc/taler-exchange-keyup.1 b/doc/taler-exchange-keyup.1 new file mode 100644 index 000000000..541c10ec8 --- /dev/null +++ b/doc/taler-exchange-keyup.1 @@ -0,0 +1,38 @@ +.TH TALER\-EXCHANGE\-KEYUP 1 "Apr 22, 2015" "GNU Taler" + +.SH NAME +taler\-exchange\-keyup \- Setup Taler exchange denomination and signing keys. + +.SH SYNOPSIS +.B taler\-exchange\-keyup +.RI [ options ] +.br + +.SH DESCRIPTION +\fBtaler\-exchange\-keyup\fP is a command line tool to setup Taler denomination and signing keys. This tool requires access to the exchange's long-term offline signing key and should be run in a secure (offline) environment under strict controls. The resulting keys can then be copied to the main online directory where the Taler HTTP server operates. + +.SH OPTIONS +.B +.IP "\-d DIRNAME, \-\-exchange-dir=DIRNAME" +Use the configuration and other resources for the exchange to operate from DIRNAME. +.B +.IP "\-h, \-\-help" +Print short help on options. +.B +.IP "\-m FILE, \-\-master-key=FILE" +Location of the private EdDSA offline master key of the exchange. +.B +.IP "\-o FILE, \-\-ouptut=FILE" +Where to write a denomination key signing request file to be given to the auditor. +.B +.IP "\-t TIMESTAMP, \-\-time=TIMESTAMP" +Operate as if the current time was TIMESTAMP. +.B +.IP "\-v, \-\-version" +Print version information. + +.SH BUGS +Report bugs by using Mantis or by sending electronic mail to + +.SH "SEE ALSO" +\fBtaler\-exchange\-httpd\fP(1), \fBtaler\-exchange\-keyup\fP(1), \fBtaler\-exchange\-keycheck\fP(1), \fBtaler.conf\fP(5) diff --git a/doc/taler-exchange-reservemod.1 b/doc/taler-exchange-reservemod.1 new file mode 100644 index 000000000..7044a7c61 --- /dev/null +++ b/doc/taler-exchange-reservemod.1 @@ -0,0 +1,35 @@ +.TH TALER\-EXCHANGE\-RESERVEMOD 1 "Apr 22, 2015" "GNU Taler" + +.SH NAME +taler\-exchange\-reservemod \- Modify reserve balance in the Taler exchange database. + +.SH SYNOPSIS +.B taler\-exchange\-reservemod +.RI [ options ] +.br + +.SH DESCRIPTION +\fBtaler\-exchange\-reservemod\fP is a command line tool to modify reserves in the Taler exchange database. Basically, it can be used to import deposits, either for testing or as part of the import from the list of incoming transactions. + +.SH OPTIONS +.B +.IP "\-a DENOM, \-\-add=DENOM" +Amount to add to the reserve. +.B +.IP "\-d DIRNAME, \-\-exchange-dir=DIRNAME" +Use the configuration and other resources for the exchange to operate from DIRNAME. +.B +.IP "\-h, \-\-help" +Print short help on options. +.B +.IP "\-R KEY, \-\-reserve=KEY" +Public EdDSA key of the reserve to modify. +.B +.IP "\-v, \-\-version" +Print version information. + +.SH BUGS +Report bugs by using Mantis or by sending electronic mail to + +.SH "SEE ALSO" +\fBtaler\-exchange\-httpd\fP(1), \fBtaler\-exchange\-keyup\fP(1), \fBtaler\-exchange\-dbinit\fP(1), \fBtaler.conf\fP(5) diff --git a/doc/taler-mint-sepa.1 b/doc/taler-exchange-sepa.1 similarity index 56% rename from doc/taler-mint-sepa.1 rename to doc/taler-exchange-sepa.1 index 62d75a667..b24828d96 100644 --- a/doc/taler-mint-sepa.1 +++ b/doc/taler-exchange-sepa.1 @@ -1,15 +1,15 @@ -.TH TALER\-MINT\-SEPA 1 "Apr 22, 2015" "GNU Taler" +.TH TALER\-EXCHANGE\-SEPA 1 "Apr 22, 2015" "GNU Taler" .SH NAME -taler\-mint\-sepa \- Create the master-key signed response to /wire/sepa. +taler\-exchange\-sepa \- Create the master-key signed response to /wire/sepa. .SH SYNOPSIS -.B taler\-mint\-sepa +.B taler\-exchange\-sepa .RI [ options ] .br .SH DESCRIPTION -\fBtaler\-mint\-sepa\fP is used to create the mint's reply to a /wire/sepa request. It converts the bank details into the appropriate signed response. This needs to be done using the long-term offline master key. +\fBtaler\-exchange\-sepa\fP is used to create the exchange's reply to a /wire/sepa request. It converts the bank details into the appropriate signed response. This needs to be done using the long-term offline master key. .SH OPTIONS .B @@ -23,7 +23,7 @@ Specifies the IBAN to use. Specifies the name of the account holder. .B .IP "\-m MASTERKEYFILE, \-\-master=MASTERKEYFILE" -Specifies the name of the file containing the mint's master key. +Specifies the name of the file containing the exchange's master key. .B .IP "\-o FILENAME, \-\-output=FILENAME" Where to write the SEPA_RESPONSE_FILE. @@ -38,4 +38,4 @@ Print version information. Report bugs by using Mantis or by sending electronic mail to .SH "SEE ALSO" -\fBtaler\-mint\-httpd\fP(1), \fBtaler.conf\fP(5) +\fBtaler\-exchange\-httpd\fP(1), \fBtaler.conf\fP(5) diff --git a/doc/taler-mint-dbinit.1 b/doc/taler-mint-dbinit.1 deleted file mode 100644 index c8678aed0..000000000 --- a/doc/taler-mint-dbinit.1 +++ /dev/null @@ -1,29 +0,0 @@ -.TH TALER\-MINT\-DBINIT 1 "Apr 22, 2015" "GNU Taler" - -.SH NAME -taler\-mint\-dbinit \- Initialize Taler mint database. - -.SH SYNOPSIS -.B taler\-mint\-dbinit -.RI [ options ] -.br - -.SH DESCRIPTION -\fBtaler\-mint\-dbinit\fP is a command line tool to initialize the Taler mint database. It creates the necessary tables and indices for the Taler mint to operate. - -.SH OPTIONS -.B -.IP "\-d DIRNAME, \-\-mint-dir=DIRNAME" -Use the configuration and other resources for the mint to operate from DIRNAME. -.B -.IP "\-h, \-\-help" -Print short help on options. -.B -.IP "\-v, \-\-version" -Print version information. - -.SH BUGS -Report bugs by using Mantis or by sending electronic mail to - -.SH "SEE ALSO" -\fBtaler\-mint\-httpd\fP(1), \fBtaler\-mint\-keyup\fP(1), \fBtaler\-mint\-reservemod\fP(1), \fBtaler.conf\fP(5) diff --git a/doc/taler-mint-httpd.1 b/doc/taler-mint-httpd.1 deleted file mode 100644 index 4f9c35292..000000000 --- a/doc/taler-mint-httpd.1 +++ /dev/null @@ -1,39 +0,0 @@ -.TH TALER\-MINT\-HTTPD 1 "Apr 22, 2015" "GNU Taler" - -.SH NAME -taler\-mint\-httpd \- Run Taler mint (with RESTful API) - -.SH SYNOPSIS -.B taler\-mint\-httpd -.RI [ options ] -.br - -.SH DESCRIPTION -\fBtaler\-mint\-httpd\fP is a command line tool to run the Taler mint (HTTP server). The required configuration, keys and database must exist before running this command. - -.SH OPTIONS -.B -.IP "\-C, \-\-connection-close" -Force each HTTP connection to be closed after each request (useful in combination with \-f to avoid having to wait for nc to time out). -.B -.IP "\-d DIRNAME, \-\-mint-dir=DIRNAME" -Use the configuration and other resources for the mint to operate from DIRNAME. -.B -.IP "\-h, \-\-help" -Print short help on options. -.B -.IP "\-v, \-\-version" -Print version information. -.B -.IP "\-f FILENAME, \-\-file\-input=FILENAME" -This option is only available if the mint was compiled with the configure option -\-\-enable\-developer\-mode. It is used for generating test cases against the mint using AFL. When this option is present, the HTTP server will (1) terminate after the first client's HTTP connection is completed, and (2) automatically start such a client using a helper process based on the 'nc' or 'ncat' binary using FILENAME as the standard input to the helper process. As a result, the process will effectively run with FILENAME as the input from an HTTP client and then immediately exit. This is useful to test taler\-mint\-httpd against many different possible inputs in a controlled way. -.B -.IP \"-t SECONDS, \-\-timeout=SECONDS" -Specifies the number of SECONDS after which the HTTPD should close (idle) HTTP connections. - -.SH BUGS -Report bugs by using Mantis or by sending electronic mail to - -.SH "SEE ALSO" -\fBtaler\-mint\-dbinit\fP(1), \fBtaler\-mint\-keyup\fP(1), \fBtaler\-mint\-reservemod\fP(1), \fBtaler.conf\fP(5) diff --git a/doc/taler-mint-keycheck.1 b/doc/taler-mint-keycheck.1 deleted file mode 100644 index a2c153244..000000000 --- a/doc/taler-mint-keycheck.1 +++ /dev/null @@ -1,29 +0,0 @@ -.TH TALER\-MINT\-KEYCHECK 1 "Apr 22, 2015" "GNU Taler" - -.SH NAME -taler\-mint\-keycheck \- Check validity of Taler signing and denomination keys. - -.SH SYNOPSIS -.B taler\-mint\-keycheck -.RI [ options ] -.br - -.SH DESCRIPTION -\fBtaler\-mint\-keycheck\fP can be used to check if the signing and denomination keys in the operation directory are well-formed. This can be useful after importing fresh keys from the offline system to ensure that the files are correct. - -.SH OPTIONS -.B -.IP "\-d DIRNAME, \-\-mint-dir=DIRNAME" -Use the configuration and other resources for the mint to operate from DIRNAME. -.B -.IP "\-h, \-\-help" -Print short help on options. -.B -.IP "\-v, \-\-version" -Print version information. - -.SH BUGS -Report bugs by using Mantis or by sending electronic mail to - -.SH "SEE ALSO" -\fBtaler\-mint\-httpd\fP(1), \fBtaler\-mint\-keyup\fP(1), \fBtaler\-mint\-dbinit\fP(1), \fBtaler.conf\fP(5) diff --git a/doc/taler-mint-keyup.1 b/doc/taler-mint-keyup.1 deleted file mode 100644 index 71135b36a..000000000 --- a/doc/taler-mint-keyup.1 +++ /dev/null @@ -1,38 +0,0 @@ -.TH TALER\-MINT\-KEYUP 1 "Apr 22, 2015" "GNU Taler" - -.SH NAME -taler\-mint\-keyup \- Setup Taler mint denomination and signing keys. - -.SH SYNOPSIS -.B taler\-mint\-keyup -.RI [ options ] -.br - -.SH DESCRIPTION -\fBtaler\-mint\-keyup\fP is a command line tool to setup Taler denomination and signing keys. This tool requires access to the mint's long-term offline signing key and should be run in a secure (offline) environment under strict controls. The resulting keys can then be copied to the main online directory where the Taler HTTP server operates. - -.SH OPTIONS -.B -.IP "\-d DIRNAME, \-\-mint-dir=DIRNAME" -Use the configuration and other resources for the mint to operate from DIRNAME. -.B -.IP "\-h, \-\-help" -Print short help on options. -.B -.IP "\-m FILE, \-\-master-key=FILE" -Location of the private EdDSA offline master key of the mint. -.B -.IP "\-o FILE, \-\-ouptut=FILE" -Where to write a denomination key signing request file to be given to the auditor. -.B -.IP "\-t TIMESTAMP, \-\-time=TIMESTAMP" -Operate as if the current time was TIMESTAMP. -.B -.IP "\-v, \-\-version" -Print version information. - -.SH BUGS -Report bugs by using Mantis or by sending electronic mail to - -.SH "SEE ALSO" -\fBtaler\-mint\-httpd\fP(1), \fBtaler\-mint\-keyup\fP(1), \fBtaler\-mint\-keycheck\fP(1), \fBtaler.conf\fP(5) diff --git a/doc/taler-mint-reservemod.1 b/doc/taler-mint-reservemod.1 deleted file mode 100644 index 1d8270458..000000000 --- a/doc/taler-mint-reservemod.1 +++ /dev/null @@ -1,35 +0,0 @@ -.TH TALER\-MINT\-RESERVEMOD 1 "Apr 22, 2015" "GNU Taler" - -.SH NAME -taler\-mint\-reservemod \- Modify reserve balance in the Taler mint database. - -.SH SYNOPSIS -.B taler\-mint\-reservemod -.RI [ options ] -.br - -.SH DESCRIPTION -\fBtaler\-mint\-reservemod\fP is a command line tool to modify reserves in the Taler mint database. Basically, it can be used to import deposits, either for testing or as part of the import from the list of incoming transactions. - -.SH OPTIONS -.B -.IP "\-a DENOM, \-\-add=DENOM" -Amount to add to the reserve. -.B -.IP "\-d DIRNAME, \-\-mint-dir=DIRNAME" -Use the configuration and other resources for the mint to operate from DIRNAME. -.B -.IP "\-h, \-\-help" -Print short help on options. -.B -.IP "\-R KEY, \-\-reserve=KEY" -Public EdDSA key of the reserve to modify. -.B -.IP "\-v, \-\-version" -Print version information. - -.SH BUGS -Report bugs by using Mantis or by sending electronic mail to - -.SH "SEE ALSO" -\fBtaler\-mint\-httpd\fP(1), \fBtaler\-mint\-keyup\fP(1), \fBtaler\-mint\-dbinit\fP(1), \fBtaler.conf\fP(5) diff --git a/doc/taler.conf.5 b/doc/taler.conf.5 index 87f216913..f9d9d6312 100644 --- a/doc/taler.conf.5 +++ b/doc/taler.conf.5 @@ -10,9 +10,9 @@ taler.conf \- Taler configuration file. The basic structure of the configuration file is the following. The file is split into sections. Every section begins with "[SECTIONNAME]" and contains a number of options of the form "OPTION=VALUE". Empty lines and lines beginning with a "#" are treated as comments. -.SH MINT OPTIONS +.SH EXCHANGE OPTIONS -The following options are from the "[mint]" section and used by most mint tools: +The following options are from the "[exchange]" section and used by most exchange tools: .IP CURRENCY Name of the currency, i.e. "EUR" for Euro. @@ -23,32 +23,32 @@ The following options are from the "[mint]" section and used by most mint tools: .IP PORT Port on which the HTTP server listens, i.e. 8080. .IP MASTER_PUBLIC_KEY - Crockford Base32-encoded master public key, public version of the mint\'s long\-time offline signing key. + Crockford Base32-encoded master public key, public version of the exchange\'s long\-time offline signing key. .SH WIRE transfer details -The following options must be in section "[mint-wire-test]": +The following options must be in section "[exchange-wire-test]": .IP REDIRECT_URL URL to redirect /wire/test to. Should contain a Web form the user can use to charge his wallet with coins in a "test" currency for testing. If this option is not provided, /wire/test will return "501 NOT IMPLEMENTED". -The following options must be in section "[mint-wire-sepa]": +The following options must be in section "[exchange-wire-sepa]": .IP SEPA_RESPONSE_FILE - Filename with the JSON body for the /wire/sepa response, signed using the mint's long-term offline master key. If this option is not provided, /wire/test will return "501 NOT IMPLEMENTED". Use "taler-mint-sepa" to create the SEPA_RESPONSE_FILE. + Filename with the JSON body for the /wire/sepa response, signed using the exchange's long-term offline master key. If this option is not provided, /wire/test will return "501 NOT IMPLEMENTED". Use "taler-exchange-sepa" to create the SEPA_RESPONSE_FILE. .SH Postgres database options -The following options must be in section "[mintdb-postgres]": +The following options must be in section "[exchangedb-postgres]": .IP DB_CONN_STR How to access the database, i.e. "postgres:///taler" to use the "taler" database. Testcases use "talercheck". .SH COIN OPTIONS -The following options must be in sections starting with "[coin_]" and are used by taler\-mint\-keyup to create denomination keys: +The following options must be in sections starting with "[coin_]" and are used by taler\-exchange\-keyup to create denomination keys: .IP VALUE Value of the coin, i.e. "EUR:1.50" for 1 Euro and 50 Cents (per coin). @@ -69,7 +69,7 @@ The following options must be in sections starting with "[coin_]" and are used b .SH KEY OPTIONS -The following options are from the "[mint_keys]" section and used by most taler\-mint\-keyup to create keys: +The following options are from the "[exchange_keys]" section and used by most taler\-exchange\-keyup to create keys: .IP SIGNKEY_DURATION For how long is a signing key valid? @@ -85,5 +85,5 @@ The following options are from the "[mint_keys]" section and used by most taler\ Report bugs by using Mantis or by sending electronic mail to .SH "SEE ALSO" -\fBtaler\-mint\-httpd\fP(1), \fBtaler\-mint\-keyup\fP(1), \fBtaler\-mint\-reservemod\fP(1), \fBtaler\-mint\-dbinit\fP(1), \fBtaler\-mint\-sepa(1) +\fBtaler\-exchange\-httpd\fP(1), \fBtaler\-exchange\-keyup\fP(1), \fBtaler\-exchange\-reservemod\fP(1), \fBtaler\-exchange\-dbinit\fP(1), \fBtaler\-exchange\-sepa(1) diff --git a/src/Makefile.am b/src/Makefile.am index ac839d52a..37c902e65 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,16 +3,24 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/include if HAVE_POSTGRESQL PQ_DIR = pq endif +if HAVE_LIBCURL + BANK_LIB = bank-lib +else +if HAVE_LIBGNURL + BANK_LIB = bank-lib +endif +endif + if WALLET_ONLY SUBDIRS = include util else -SUBDIRS = include util $(PQ_DIR) bank-lib wire mintdb mint mint-tools +SUBDIRS = include util $(PQ_DIR) $(BANK_LIB) wire exchangedb exchange exchange-tools if HAVE_LIBCURL - SUBDIRS += mint-lib + SUBDIRS += exchange-lib else if HAVE_LIBGNURL - SUBDIRS += mint-lib + SUBDIRS += exchange-lib endif endif diff --git a/src/bank-lib/bank_api_context.c b/src/bank-lib/bank_api_context.c index a47b4072a..2e4083cae 100644 --- a/src/bank-lib/bank_api_context.c +++ b/src/bank-lib/bank_api_context.c @@ -390,7 +390,7 @@ TALER_BANK_fini (struct TALER_BANK_Context *ctx) /** * Obtain the URL to use for an API request. * - * @param h the mint handle to query + * @param h the exchange handle to query * @param path Taler API path (i.e. "/reserve/withdraw") * @return the full URI to use with cURL */ diff --git a/src/bank-lib/bank_api_json.h b/src/bank-lib/bank_api_json.h index 2ecaf8ef1..92fe0b1d4 100644 --- a/src/bank-lib/bank_api_json.h +++ b/src/bank-lib/bank_api_json.h @@ -14,7 +14,7 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file mint-lib/mint_api_json.h + * @file exchange-lib/exchange_api_json.h * @brief functions to parse incoming requests (JSON snippets) * @author Florian Dold * @author Benedikt Mueller @@ -349,4 +349,4 @@ BAJ_spec_rsa_signature (const char *name, -/* end of mint_api_json.h */ +/* end of exchange_api_json.h */ diff --git a/src/exchange-lib/Makefile.am b/src/exchange-lib/Makefile.am new file mode 100644 index 000000000..f5e58b401 --- /dev/null +++ b/src/exchange-lib/Makefile.am @@ -0,0 +1,62 @@ +# This Makefile.am is in the public domain +AM_CPPFLAGS = -I$(top_srcdir)/src/include + +if USE_COVERAGE + AM_CFLAGS = --coverage -O0 + XLIB = -lgcov +endif + +lib_LTLIBRARIES = \ + libtalerexchange.la + +libtalerexchange_la_LDFLAGS = \ + -version-info 0:0:0 \ + -no-undefined + +libtalerexchange_la_SOURCES = \ + exchange_api_common.c exchange_api_common.h \ + exchange_api_context.c exchange_api_context.h \ + exchange_api_json.c exchange_api_json.h \ + exchange_api_handle.c exchange_api_handle.h \ + exchange_api_admin.c \ + exchange_api_deposit.c \ + exchange_api_deposit_wtid.c \ + exchange_api_refresh.c \ + exchange_api_refresh_link.c \ + exchange_api_reserve.c \ + exchange_api_wire.c \ + exchange_api_wire_deposits.c + +libtalerexchange_la_LIBADD = \ + -lgnunetutil \ + -ljansson \ + $(XLIB) + +if HAVE_LIBCURL +libtalerexchange_la_LIBADD += -lcurl +else +if HAVE_LIBGNURL +libtalerexchange_la_LIBADD += -lgnurl +endif +endif + +check_PROGRAMS = \ + test_exchange_api + +TESTS = \ + $(check_PROGRAMS) + +test_exchange_api_SOURCES = \ + test_exchange_api.c +test_exchange_api_LDADD = \ + libtalerexchange.la \ + $(LIBGCRYPT_LIBS) \ + $(top_builddir)/src/util/libtalerutil.la \ + -lgnunetutil \ + -ljansson + +EXTRA_DIST = \ + test-exchange-home/config/exchange-common.conf \ + test-exchange-home/master.priv \ + test-exchange-home/denomkeys/ \ + test-exchange-home/signkeys/ diff --git a/src/mint-lib/afl-generate.sh b/src/exchange-lib/afl-generate.sh similarity index 86% rename from src/mint-lib/afl-generate.sh rename to src/exchange-lib/afl-generate.sh index 4b5051869..6ae833087 100644 --- a/src/mint-lib/afl-generate.sh +++ b/src/exchange-lib/afl-generate.sh @@ -16,9 +16,9 @@ # # # This will generate testcases in a directory 'afl-tests', which can then -# be moved into src/mint/afl-tests/ to be run during mint-testing. +# be moved into src/exchange/afl-tests/ to be run during exchange-testing. # -# This script uses American Fuzzy Loop (AFL) to fuzz the mint to +# This script uses American Fuzzy Loop (AFL) to fuzz the exchange to # automatically create tests with good coverage. You must install # AFL and set AFL_HOME to the directory where AFL is installed # before running. Also, a directory "baseline/" should exist with @@ -31,4 +31,4 @@ # # Must be run from this directory. # -$AFL_HOME/afl-fuzz -i baseline/ -m 250 -o afl-tests/ -f /tmp/afl-input taler-mint-httpd -f /tmp/afl-input -d test-mint-home/ -C +$AFL_HOME/afl-fuzz -i baseline/ -m 250 -o afl-tests/ -f /tmp/afl-input taler-exchange-httpd -f /tmp/afl-input -d test-exchange-home/ -C diff --git a/src/mint-lib/baseline/admin_add_incoming.req b/src/exchange-lib/baseline/admin_add_incoming.req similarity index 100% rename from src/mint-lib/baseline/admin_add_incoming.req rename to src/exchange-lib/baseline/admin_add_incoming.req diff --git a/src/mint-lib/baseline/deposit.req b/src/exchange-lib/baseline/deposit.req similarity index 100% rename from src/mint-lib/baseline/deposit.req rename to src/exchange-lib/baseline/deposit.req diff --git a/src/mint-lib/baseline/keys.req b/src/exchange-lib/baseline/keys.req similarity index 100% rename from src/mint-lib/baseline/keys.req rename to src/exchange-lib/baseline/keys.req diff --git a/src/mint-lib/baseline/refresh_link.req b/src/exchange-lib/baseline/refresh_link.req similarity index 100% rename from src/mint-lib/baseline/refresh_link.req rename to src/exchange-lib/baseline/refresh_link.req diff --git a/src/mint-lib/baseline/refresh_melt.req b/src/exchange-lib/baseline/refresh_melt.req similarity index 100% rename from src/mint-lib/baseline/refresh_melt.req rename to src/exchange-lib/baseline/refresh_melt.req diff --git a/src/mint-lib/baseline/refresh_reveal.req b/src/exchange-lib/baseline/refresh_reveal.req similarity index 100% rename from src/mint-lib/baseline/refresh_reveal.req rename to src/exchange-lib/baseline/refresh_reveal.req diff --git a/src/mint-lib/baseline/reserve_status.req b/src/exchange-lib/baseline/reserve_status.req similarity index 100% rename from src/mint-lib/baseline/reserve_status.req rename to src/exchange-lib/baseline/reserve_status.req diff --git a/src/mint-lib/baseline/reserve_withdraw.req b/src/exchange-lib/baseline/reserve_withdraw.req similarity index 100% rename from src/mint-lib/baseline/reserve_withdraw.req rename to src/exchange-lib/baseline/reserve_withdraw.req diff --git a/src/mint-lib/baseline/wire.req b/src/exchange-lib/baseline/wire.req similarity index 100% rename from src/mint-lib/baseline/wire.req rename to src/exchange-lib/baseline/wire.req diff --git a/src/mint-lib/baseline/wire_sepa.req b/src/exchange-lib/baseline/wire_sepa.req similarity index 100% rename from src/mint-lib/baseline/wire_sepa.req rename to src/exchange-lib/baseline/wire_sepa.req diff --git a/src/mint-lib/baseline/wire_test.req b/src/exchange-lib/baseline/wire_test.req similarity index 100% rename from src/mint-lib/baseline/wire_test.req rename to src/exchange-lib/baseline/wire_test.req diff --git a/src/mint-lib/mint_api_admin.c b/src/exchange-lib/exchange_api_admin.c similarity index 78% rename from src/mint-lib/mint_api_admin.c rename to src/exchange-lib/exchange_api_admin.c index 641e0690f..3dcbb80e9 100644 --- a/src/mint-lib/mint_api_admin.c +++ b/src/exchange-lib/exchange_api_admin.c @@ -15,8 +15,8 @@ */ /** - * @file mint-lib/mint_api_admin.c - * @brief Implementation of the /admin/ requests of the mint's HTTP API + * @file exchange-lib/exchange_api_admin.c + * @brief Implementation of the /admin/ requests of the exchange's HTTP API * @author Christian Grothoff */ #include "platform.h" @@ -24,23 +24,23 @@ #include #include /* just for HTTP status codes */ #include -#include "taler_mint_service.h" -#include "mint_api_json.h" -#include "mint_api_context.h" -#include "mint_api_handle.h" +#include "taler_exchange_service.h" +#include "exchange_api_json.h" +#include "exchange_api_context.h" +#include "exchange_api_handle.h" #include "taler_signatures.h" /** * @brief An admin/add/incoming Handle */ -struct TALER_MINT_AdminAddIncomingHandle +struct TALER_EXCHANGE_AdminAddIncomingHandle { /** - * The connection to mint this request handle will use + * The connection to exchange this request handle will use */ - struct TALER_MINT_Handle *mint; + struct TALER_EXCHANGE_Handle *exchange; /** * The url for this request. @@ -65,7 +65,7 @@ struct TALER_MINT_AdminAddIncomingHandle /** * Function to call with the result. */ - TALER_MINT_AdminAddIncomingResultCallback cb; + TALER_EXCHANGE_AdminAddIncomingResultCallback cb; /** * Closure for @a cb. @@ -84,14 +84,14 @@ struct TALER_MINT_AdminAddIncomingHandle * Function called when we're done processing the * HTTP /admin/add/incoming request. * - * @param cls the `struct TALER_MINT_AdminAddIncomingHandle` + * @param cls the `struct TALER_EXCHANGE_AdminAddIncomingHandle` * @param eh the curl request handle */ static void handle_admin_add_incoming_finished (void *cls, CURL *eh) { - struct TALER_MINT_AdminAddIncomingHandle *aai = cls; + struct TALER_EXCHANGE_AdminAddIncomingHandle *aai = cls; long response_code; json_t *json; @@ -106,14 +106,14 @@ handle_admin_add_incoming_finished (void *cls, case MHD_HTTP_OK: break; case MHD_HTTP_BAD_REQUEST: - /* This should never happen, either us or the mint is buggy + /* This should never happen, either us or the exchange is buggy (or API version conflict); just pass JSON reply to the application */ break; case MHD_HTTP_FORBIDDEN: /* Access denied */ break; case MHD_HTTP_UNAUTHORIZED: - /* Nothing really to verify, mint says one of the signatures is + /* Nothing really to verify, exchange says one of the signatures is invalid; as we checked them, this should never happen, we should pass the JSON reply to the application */ break; @@ -138,17 +138,17 @@ handle_admin_add_incoming_finished (void *cls, response_code, json); json_decref (json); - TALER_MINT_admin_add_incoming_cancel (aai); + TALER_EXCHANGE_admin_add_incoming_cancel (aai); } /** - * Notify the mint that we have received an incoming transaction + * Notify the exchange that we have received an incoming transaction * which fills a reserve. Note that this API is an administrative - * API and thus not accessible to typical mint clients, but only - * to the operators of the mint. + * API and thus not accessible to typical exchange clients, but only + * to the operators of the exchange. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param reserve_pub public key of the reserve * @param amount amount that was deposited * @param execution_date when did we receive the amount @@ -159,24 +159,24 @@ handle_admin_add_incoming_finished (void *cls, * if the inputs are invalid (i.e. invalid amount). * In this case, the callback is not called. */ -struct TALER_MINT_AdminAddIncomingHandle * -TALER_MINT_admin_add_incoming (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_AdminAddIncomingHandle * +TALER_EXCHANGE_admin_add_incoming (struct TALER_EXCHANGE_Handle *exchange, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *amount, struct GNUNET_TIME_Absolute execution_date, const json_t *wire, - TALER_MINT_AdminAddIncomingResultCallback res_cb, + TALER_EXCHANGE_AdminAddIncomingResultCallback res_cb, void *res_cb_cls) { - struct TALER_MINT_AdminAddIncomingHandle *aai; - struct TALER_MINT_Context *ctx; + struct TALER_EXCHANGE_AdminAddIncomingHandle *aai; + struct TALER_EXCHANGE_Context *ctx; json_t *admin_obj; CURL *eh; GNUNET_assert (GNUNET_OK == TALER_round_abs_time (&execution_date)); if (GNUNET_YES != - MAH_handle_is_ready (mint)) + MAH_handle_is_ready (exchange)) { GNUNET_break (0); return NULL; @@ -188,11 +188,11 @@ TALER_MINT_admin_add_incoming (struct TALER_MINT_Handle *mint, "amount", TALER_json_from_amount (amount), "execution_date", TALER_json_from_abs (execution_date), "wire", wire); - aai = GNUNET_new (struct TALER_MINT_AdminAddIncomingHandle); - aai->mint = mint; + aai = GNUNET_new (struct TALER_EXCHANGE_AdminAddIncomingHandle); + aai->exchange = exchange; aai->cb = res_cb; aai->cb_cls = res_cb_cls; - aai->url = MAH_path_to_url (mint, "/admin/add/incoming"); + aai->url = MAH_path_to_url (exchange, "/admin/add/incoming"); eh = curl_easy_init (); GNUNET_assert (NULL != (aai->json_enc = @@ -219,7 +219,7 @@ TALER_MINT_admin_add_incoming (struct TALER_MINT_Handle *mint, curl_easy_setopt (eh, CURLOPT_WRITEDATA, &aai->db)); - ctx = MAH_handle_to_context (mint); + ctx = MAH_handle_to_context (exchange); aai->job = MAC_job_add (ctx, eh, GNUNET_YES, @@ -236,7 +236,7 @@ TALER_MINT_admin_add_incoming (struct TALER_MINT_Handle *mint, * @param aai the admin add incoming request handle */ void -TALER_MINT_admin_add_incoming_cancel (struct TALER_MINT_AdminAddIncomingHandle *aai) +TALER_EXCHANGE_admin_add_incoming_cancel (struct TALER_EXCHANGE_AdminAddIncomingHandle *aai) { if (NULL != aai->job) { @@ -251,4 +251,4 @@ TALER_MINT_admin_add_incoming_cancel (struct TALER_MINT_AdminAddIncomingHandle * } -/* end of mint_api_admin.c */ +/* end of exchange_api_admin.c */ diff --git a/src/mint-lib/mint_api_common.c b/src/exchange-lib/exchange_api_common.c similarity index 92% rename from src/mint-lib/mint_api_common.c rename to src/exchange-lib/exchange_api_common.c index faba38c74..805c3fc4e 100644 --- a/src/mint-lib/mint_api_common.c +++ b/src/exchange-lib/exchange_api_common.c @@ -15,20 +15,20 @@ */ /** - * @file mint-lib/mint_api_common.c - * @brief common functions for the mint API + * @file exchange-lib/exchange_api_common.c + * @brief common functions for the exchange API * @author Christian Grothoff */ #include "platform.h" -#include "mint_api_common.h" -#include "mint_api_json.h" -#include "mint_api_context.h" -#include "mint_api_handle.h" +#include "exchange_api_common.h" +#include "exchange_api_json.h" +#include "exchange_api_context.h" +#include "exchange_api_handle.h" #include "taler_signatures.h" /** - * Verify a coins transaction history as returned by the mint. + * Verify a coins transaction history as returned by the exchange. * * @param currency expected currency for the coin * @param coin_pub public key of the coin @@ -37,7 +37,7 @@ * @return #GNUNET_OK if @a history is valid, #GNUNET_SYSERR if not */ int -TALER_MINT_verify_coin_history_ (const char *currency, +TALER_EXCHANGE_verify_coin_history_ (const char *currency, const struct TALER_CoinSpendPublicKeyP *coin_pub, json_t *history, struct TALER_Amount *total) @@ -180,7 +180,7 @@ TALER_MINT_verify_coin_history_ (const char *currency, total, &amount)) { - /* overflow in history already!? inconceivable! Bad mint! */ + /* overflow in history already!? inconceivable! Bad exchange! */ GNUNET_break_op (0); MAJ_parse_free (spec); return GNUNET_SYSERR; @@ -191,4 +191,4 @@ TALER_MINT_verify_coin_history_ (const char *currency, } -/* end of mint_api_common.c */ +/* end of exchange_api_common.c */ diff --git a/src/mint-lib/mint_api_common.h b/src/exchange-lib/exchange_api_common.h similarity index 81% rename from src/mint-lib/mint_api_common.h rename to src/exchange-lib/exchange_api_common.h index 10a202146..49f486b00 100644 --- a/src/mint-lib/mint_api_common.h +++ b/src/exchange-lib/exchange_api_common.h @@ -15,16 +15,16 @@ */ /** - * @file mint-lib/mint_api_common.h - * @brief common functions for the mint API + * @file exchange-lib/exchange_api_common.h + * @brief common functions for the exchange API * @author Christian Grothoff */ #include #include -#include "taler_mint_service.h" +#include "taler_exchange_service.h" /** - * Verify a coins transaction history as returned by the mint. + * Verify a coins transaction history as returned by the exchange. * * @param currency expected currency for the coin * @param coin_pub public key of the coin @@ -33,9 +33,9 @@ * @return #GNUNET_OK if @a history is valid, #GNUNET_SYSERR if not */ int -TALER_MINT_verify_coin_history_ (const char *currency, +TALER_EXCHANGE_verify_coin_history_ (const char *currency, const struct TALER_CoinSpendPublicKeyP *coin_pub, json_t *history, struct TALER_Amount *total); -/* end of mint_api_common.h */ +/* end of exchange_api_common.h */ diff --git a/src/mint-lib/mint_api_context.c b/src/exchange-lib/exchange_api_context.c similarity index 91% rename from src/mint-lib/mint_api_context.c rename to src/exchange-lib/exchange_api_context.c index 2767906b5..544719001 100644 --- a/src/mint-lib/mint_api_context.c +++ b/src/exchange-lib/exchange_api_context.c @@ -15,15 +15,15 @@ */ /** - * @file mint-lib/mint_api_context.c - * @brief Implementation of the context part of the mint's HTTP API + * @file exchange-lib/exchange_api_context.c + * @brief Implementation of the context part of the exchange's HTTP API * @author Sree Harsha Totakura * @author Christian Grothoff */ #include "platform.h" #include -#include "taler_mint_service.h" -#include "mint_api_context.h" +#include "taler_exchange_service.h" +#include "exchange_api_context.h" /** @@ -51,11 +51,11 @@ * Failsafe flag. Raised if our constructor fails to initialize * the Curl library. */ -static int TALER_MINT_curl_fail; +static int TALER_EXCHANGE_curl_fail; /** - * Jobs are CURL requests running within a `struct TALER_MINT_Context`. + * Jobs are CURL requests running within a `struct TALER_EXCHANGE_Context`. */ struct MAC_Job { @@ -78,7 +78,7 @@ struct MAC_Job /** * Context this job runs in. */ - struct TALER_MINT_Context *ctx; + struct TALER_EXCHANGE_Context *ctx; /** * Function to call upon completion. @@ -96,7 +96,7 @@ struct MAC_Job /** * Context */ -struct TALER_MINT_Context +struct TALER_EXCHANGE_Context { /** * Curl multi handle @@ -133,14 +133,14 @@ struct TALER_MINT_Context * * @return library context */ -struct TALER_MINT_Context * -TALER_MINT_init () +struct TALER_EXCHANGE_Context * +TALER_EXCHANGE_init () { - struct TALER_MINT_Context *ctx; + struct TALER_EXCHANGE_Context *ctx; CURLM *multi; CURLSH *share; - if (TALER_MINT_curl_fail) + if (TALER_EXCHANGE_curl_fail) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Curl was not initialised properly\n"); @@ -158,7 +158,7 @@ TALER_MINT_init () "Failed to create a Curl share handle\n"); return NULL; } - ctx = GNUNET_new (struct TALER_MINT_Context); + ctx = GNUNET_new (struct TALER_EXCHANGE_Context); ctx->multi = multi; ctx->share = share; GNUNET_assert (NULL != (ctx->json_header = @@ -186,7 +186,7 @@ TALER_MINT_init () * @param jcc_cls closure for @a jcc */ struct MAC_Job * -MAC_job_add (struct TALER_MINT_Context *ctx, +MAC_job_add (struct TALER_EXCHANGE_Context *ctx, CURL *eh, int add_json, MAC_JobCompletionCallback jcc, @@ -252,7 +252,7 @@ MAC_easy_to_closure (CURL *eh) void MAC_job_cancel (struct MAC_Job *job) { - struct TALER_MINT_Context *ctx = job->ctx; + struct TALER_EXCHANGE_Context *ctx = job->ctx; GNUNET_CONTAINER_DLL_remove (ctx->jobs_head, ctx->jobs_tail, @@ -271,7 +271,7 @@ MAC_job_cancel (struct MAC_Job *job) * @param ctx the library context */ void -TALER_MINT_perform (struct TALER_MINT_Context *ctx) +TALER_EXCHANGE_perform (struct TALER_EXCHANGE_Context *ctx) { CURLMsg *cmsg; struct MAC_Job *job; @@ -299,12 +299,12 @@ TALER_MINT_perform (struct TALER_MINT_Context *ctx) /** * Obtain the information for a select() call to wait until - * #TALER_MINT_perform() is ready again. Note that calling - * any other TALER_MINT-API may also imply that the library - * is again ready for #TALER_MINT_perform(). + * #TALER_EXCHANGE_perform() is ready again. Note that calling + * any other TALER_EXCHANGE-API may also imply that the library + * is again ready for #TALER_EXCHANGE_perform(). * * Basically, a client should use this API to prepare for select(), - * then block on select(), then call #TALER_MINT_perform() and then + * then block on select(), then call #TALER_EXCHANGE_perform() and then * start again until the work with the context is done. * * This function will NOT zero out the sets and assumes that @a max_fd @@ -323,10 +323,10 @@ TALER_MINT_perform (struct TALER_MINT_Context *ctx) * to be passed to select().) * @param timeout set to the timeout in milliseconds (!); -1 means * no timeout (NULL, blocking forever is OK), 0 means to - * proceed immediately with #TALER_MINT_perform(). + * proceed immediately with #TALER_EXCHANGE_perform(). */ void -TALER_MINT_get_select_info (struct TALER_MINT_Context *ctx, +TALER_EXCHANGE_get_select_info (struct TALER_EXCHANGE_Context *ctx, fd_set *read_fd_set, fd_set *write_fd_set, fd_set *except_fd_set, @@ -368,7 +368,7 @@ TALER_MINT_get_select_info (struct TALER_MINT_Context *ctx, * @param ctx the library context */ void -TALER_MINT_fini (struct TALER_MINT_Context *ctx) +TALER_EXCHANGE_fini (struct TALER_EXCHANGE_Context *ctx) { /* all jobs must have been cancelled at this time, assert this */ GNUNET_assert (NULL == ctx->jobs_head); @@ -508,7 +508,7 @@ MAC_download_get_result (struct MAC_DownloadBuffer *db, */ __attribute__ ((constructor)) void -TALER_MINT_constructor__ (void) +TALER_EXCHANGE_constructor__ (void) { CURLcode ret; @@ -517,7 +517,7 @@ TALER_MINT_constructor__ (void) CURL_STRERROR (GNUNET_ERROR_TYPE_ERROR, "curl_global_init", ret); - TALER_MINT_curl_fail = 1; + TALER_EXCHANGE_curl_fail = 1; } } @@ -527,11 +527,11 @@ TALER_MINT_constructor__ (void) */ __attribute__ ((destructor)) void -TALER_MINT_destructor__ (void) +TALER_EXCHANGE_destructor__ (void) { - if (TALER_MINT_curl_fail) + if (TALER_EXCHANGE_curl_fail) return; curl_global_cleanup (); } -/* end of mint_api_context.c */ +/* end of exchange_api_context.c */ diff --git a/src/mint-lib/mint_api_context.h b/src/exchange-lib/exchange_api_context.h similarity index 95% rename from src/mint-lib/mint_api_context.h rename to src/exchange-lib/exchange_api_context.h index 181a4808f..3c54bfe07 100644 --- a/src/mint-lib/mint_api_context.h +++ b/src/exchange-lib/exchange_api_context.h @@ -15,15 +15,15 @@ */ /** - * @file mint-lib/mint_api_context.h - * @brief Internal interface to the context part of the mint's HTTP API + * @file exchange-lib/exchange_api_context.h + * @brief Internal interface to the context part of the exchange's HTTP API * @author Sree Harsha Totakura * @author Christian Grothoff */ #include "platform.h" #include #include -#include "taler_mint_service.h" +#include "taler_exchange_service.h" #include "taler_signatures.h" @@ -61,7 +61,7 @@ typedef void * @param jcc_cls closure for @a jcc */ struct MAC_Job * -MAC_job_add (struct TALER_MINT_Context *ctx, +MAC_job_add (struct TALER_EXCHANGE_Context *ctx, CURL *eh, int add_json, MAC_JobCompletionCallback jcc, @@ -166,4 +166,4 @@ MAC_download_get_result (struct MAC_DownloadBuffer *db, long *response_code); -/* end of mint_api_context.h */ +/* end of exchange_api_context.h */ diff --git a/src/mint-lib/mint_api_deposit.c b/src/exchange-lib/exchange_api_deposit.c similarity index 81% rename from src/mint-lib/mint_api_deposit.c rename to src/exchange-lib/exchange_api_deposit.c index 400372925..deba4877d 100644 --- a/src/mint-lib/mint_api_deposit.c +++ b/src/exchange-lib/exchange_api_deposit.c @@ -15,8 +15,8 @@ */ /** - * @file mint-lib/mint_api_deposit.c - * @brief Implementation of the /deposit request of the mint's HTTP API + * @file exchange-lib/exchange_api_deposit.c + * @brief Implementation of the /deposit request of the exchange's HTTP API * @author Sree Harsha Totakura * @author Christian Grothoff */ @@ -25,24 +25,24 @@ #include #include /* just for HTTP status codes */ #include -#include "taler_mint_service.h" -#include "mint_api_common.h" -#include "mint_api_json.h" -#include "mint_api_context.h" -#include "mint_api_handle.h" +#include "taler_exchange_service.h" +#include "exchange_api_common.h" +#include "exchange_api_json.h" +#include "exchange_api_context.h" +#include "exchange_api_handle.h" #include "taler_signatures.h" /** * @brief A Deposit Handle */ -struct TALER_MINT_DepositHandle +struct TALER_EXCHANGE_DepositHandle { /** - * The connection to mint this request handle will use + * The connection to exchange this request handle will use */ - struct TALER_MINT_Handle *mint; + struct TALER_EXCHANGE_Handle *exchange; /** * The url for this request. @@ -62,7 +62,7 @@ struct TALER_MINT_DepositHandle /** * Function to call with the result. */ - TALER_MINT_DepositResultCallback cb; + TALER_EXCHANGE_DepositResultCallback cb; /** * Closure for @a cb. @@ -75,7 +75,7 @@ struct TALER_MINT_DepositHandle struct MAC_DownloadBuffer db; /** - * Information the mint should sign in response. + * Information the exchange should sign in response. */ struct TALER_DepositConfirmationPS depconf; @@ -94,22 +94,22 @@ struct TALER_MINT_DepositHandle /** * Verify that the signature on the "200 OK" response - * from the mint is valid. + * from the exchange is valid. * * @param dh deposit handle * @param json json reply with the signature * @return #GNUNET_OK if the signature is valid, #GNUNET_SYSERR if not */ static int -verify_deposit_signature_ok (const struct TALER_MINT_DepositHandle *dh, +verify_deposit_signature_ok (const struct TALER_EXCHANGE_DepositHandle *dh, json_t *json) { - struct TALER_MintSignatureP mint_sig; - struct TALER_MintPublicKeyP mint_pub; - const struct TALER_MINT_Keys *key_state; + struct TALER_ExchangeSignatureP exchange_sig; + struct TALER_ExchangePublicKeyP exchange_pub; + const struct TALER_EXCHANGE_Keys *key_state; struct MAJ_Specification spec[] = { - MAJ_spec_fixed_auto ("sig", &mint_sig), - MAJ_spec_fixed_auto ("pub", &mint_pub), + MAJ_spec_fixed_auto ("sig", &exchange_sig), + MAJ_spec_fixed_auto ("pub", &exchange_pub), MAJ_spec_end }; @@ -120,19 +120,19 @@ verify_deposit_signature_ok (const struct TALER_MINT_DepositHandle *dh, GNUNET_break_op (0); return GNUNET_SYSERR; } - key_state = TALER_MINT_get_keys (dh->mint); + key_state = TALER_EXCHANGE_get_keys (dh->exchange); if (GNUNET_OK != - TALER_MINT_test_signing_key (key_state, - &mint_pub)) + TALER_EXCHANGE_test_signing_key (key_state, + &exchange_pub)) { GNUNET_break_op (0); return GNUNET_SYSERR; } if (GNUNET_OK != - GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MINT_CONFIRM_DEPOSIT, + GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_EXCHANGE_CONFIRM_DEPOSIT, &dh->depconf.purpose, - &mint_sig.eddsa_signature, - &mint_pub.eddsa_pub)) + &exchange_sig.eddsa_signature, + &exchange_pub.eddsa_pub)) { GNUNET_break_op (0); return GNUNET_SYSERR; @@ -143,14 +143,14 @@ verify_deposit_signature_ok (const struct TALER_MINT_DepositHandle *dh, /** * Verify that the signatures on the "403 FORBIDDEN" response from the - * mint demonstrating customer double-spending are valid. + * exchange demonstrating customer double-spending are valid. * * @param dh deposit handle * @param json json reply with the signature(s) and transaction history * @return #GNUNET_OK if the signature(s) is valid, #GNUNET_SYSERR if not */ static int -verify_deposit_signature_forbidden (const struct TALER_MINT_DepositHandle *dh, +verify_deposit_signature_forbidden (const struct TALER_EXCHANGE_DepositHandle *dh, json_t *json) { json_t *history; @@ -159,7 +159,7 @@ verify_deposit_signature_forbidden (const struct TALER_MINT_DepositHandle *dh, history = json_object_get (json, "history"); if (GNUNET_OK != - TALER_MINT_verify_coin_history_ (dh->coin_value.currency, + TALER_EXCHANGE_verify_coin_history_ (dh->coin_value.currency, &dh->depconf.coin_pub, history, &total)) @@ -193,14 +193,14 @@ verify_deposit_signature_forbidden (const struct TALER_MINT_DepositHandle *dh, * Function called when we're done processing the * HTTP /deposit request. * - * @param cls the `struct TALER_MINT_DepositHandle` + * @param cls the `struct TALER_EXCHANGE_DepositHandle` * @param eh the curl request handle */ static void handle_deposit_finished (void *cls, CURL *eh) { - struct TALER_MINT_DepositHandle *dh = cls; + struct TALER_EXCHANGE_DepositHandle *dh = cls; long response_code; json_t *json; @@ -222,7 +222,7 @@ handle_deposit_finished (void *cls, } break; case MHD_HTTP_BAD_REQUEST: - /* This should never happen, either us or the mint is buggy + /* This should never happen, either us or the exchange is buggy (or API version conflict); just pass JSON reply to the application */ break; case MHD_HTTP_FORBIDDEN: @@ -236,7 +236,7 @@ handle_deposit_finished (void *cls, } break; case MHD_HTTP_UNAUTHORIZED: - /* Nothing really to verify, mint says one of the signatures is + /* Nothing really to verify, exchange says one of the signatures is invalid; as we checked them, this should never happen, we should pass the JSON reply to the application */ break; @@ -261,7 +261,7 @@ handle_deposit_finished (void *cls, response_code, json); json_decref (json); - TALER_MINT_deposit_cancel (dh); + TALER_EXCHANGE_deposit_cancel (dh); } @@ -271,19 +271,19 @@ handle_deposit_finished (void *cls, * @param dki public key information * @param amount the amount to be deposited * @param h_wire hash of the merchant’s account details - * @param h_contract hash of the contact of the merchant with the customer (further details are never disclosed to the mint) + * @param h_contract hash of the contact of the merchant with the customer (further details are never disclosed to the exchange) * @param coin_pub coin’s public key * @param denom_pub denomination key with which the coin is signed - * @param denom_sig mint’s unblinded signature of the coin - * @param timestamp timestamp when the contract was finalized, must match approximately the current time of the mint + * @param denom_sig exchange’s unblinded signature of the coin + * @param timestamp timestamp when the contract was finalized, must match approximately the current time of the exchange * @param transaction_id transaction id for the transaction between merchant and customer * @param merchant_pub the public key of the merchant (used to identify the merchant for refund requests) - * @param refund_deadline date until which the merchant can issue a refund to the customer via the mint (can be zero if refunds are not allowed) + * @param refund_deadline date until which the merchant can issue a refund to the customer via the exchange (can be zero if refunds are not allowed) * @param coin_sig the signature made with purpose #TALER_SIGNATURE_WALLET_COIN_DEPOSIT made by the customer with the coin’s private key. * @return #GNUNET_OK if signatures are OK, #GNUNET_SYSERR if not */ static int -verify_signatures (const struct TALER_MINT_DenomPublicKey *dki, +verify_signatures (const struct TALER_EXCHANGE_DenomPublicKey *dki, const struct TALER_Amount *amount, const struct GNUNET_HashCode *h_wire, const struct GNUNET_HashCode *h_contract, @@ -353,40 +353,40 @@ verify_signatures (const struct TALER_MINT_DenomPublicKey *dki, /** - * Submit a deposit permission to the mint and get the mint's response. + * Submit a deposit permission to the exchange and get the exchange's response. * Note that while we return the response verbatim to the caller for * further processing, we do already verify that the response is * well-formed (i.e. that signatures included in the response are all - * valid). If the mint's reply is not well-formed, we return an + * valid). If the exchange's reply is not well-formed, we return an * HTTP status code of zero to @a cb. * * We also verify that the @a coin_sig is valid for this deposit * request, and that the @a ub_sig is a valid signature for @a - * coin_pub. Also, the @a mint must be ready to operate (i.e. have + * coin_pub. Also, the @a exchange must be ready to operate (i.e. have * finished processing the /keys reply). If either check fails, we do - * NOT initiate the transaction with the mint and instead return NULL. + * NOT initiate the transaction with the exchange and instead return NULL. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param amount the amount to be deposited - * @param wire_deadline date until which the merchant would like the mint to settle the balance (advisory, the mint cannot be - * forced to settle in the past or upon very short notice, but of course a well-behaved mint will limit aggregation based on the advice received) - * @param wire_details the merchant’s account details, in a format supported by the mint - * @param h_contract hash of the contact of the merchant with the customer (further details are never disclosed to the mint) + * @param wire_deadline date until which the merchant would like the exchange to settle the balance (advisory, the exchange cannot be + * forced to settle in the past or upon very short notice, but of course a well-behaved exchange will limit aggregation based on the advice received) + * @param wire_details the merchant’s account details, in a format supported by the exchange + * @param h_contract hash of the contact of the merchant with the customer (further details are never disclosed to the exchange) * @param coin_pub coin’s public key * @param denom_pub denomination key with which the coin is signed - * @param denom_sig mint’s unblinded signature of the coin - * @param timestamp timestamp when the contract was finalized, must match approximately the current time of the mint + * @param denom_sig exchange’s unblinded signature of the coin + * @param timestamp timestamp when the contract was finalized, must match approximately the current time of the exchange * @param transaction_id transaction id for the transaction between merchant and customer * @param merchant_pub the public key of the merchant (used to identify the merchant for refund requests) - * @param refund_deadline date until which the merchant can issue a refund to the customer via the mint (can be zero if refunds are not allowed) + * @param refund_deadline date until which the merchant can issue a refund to the customer via the exchange (can be zero if refunds are not allowed) * @param coin_sig the signature made with purpose #TALER_SIGNATURE_WALLET_COIN_DEPOSIT made by the customer with the coin’s private key. * @param cb the callback to call when a reply for this request is available * @param cb_cls closure for the above callback * @return a handle for this request; NULL if the inputs are invalid (i.e. * signatures fail to verify). In this case, the callback is not called. */ -struct TALER_MINT_DepositHandle * -TALER_MINT_deposit (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_DepositHandle * +TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange, const struct TALER_Amount *amount, struct GNUNET_TIME_Absolute wire_deadline, json_t *wire_details, @@ -399,13 +399,13 @@ TALER_MINT_deposit (struct TALER_MINT_Handle *mint, const struct TALER_MerchantPublicKeyP *merchant_pub, struct GNUNET_TIME_Absolute refund_deadline, const struct TALER_CoinSpendSignatureP *coin_sig, - TALER_MINT_DepositResultCallback cb, + TALER_EXCHANGE_DepositResultCallback cb, void *cb_cls) { - const struct TALER_MINT_Keys *key_state; - const struct TALER_MINT_DenomPublicKey *dki; - struct TALER_MINT_DepositHandle *dh; - struct TALER_MINT_Context *ctx; + const struct TALER_EXCHANGE_Keys *key_state; + const struct TALER_EXCHANGE_DenomPublicKey *dki; + struct TALER_EXCHANGE_DepositHandle *dh; + struct TALER_EXCHANGE_Context *ctx; json_t *deposit_obj; CURL *eh; struct GNUNET_HashCode h_wire; @@ -413,7 +413,7 @@ TALER_MINT_deposit (struct TALER_MINT_Handle *mint, (void) TALER_round_abs_time (&wire_deadline); if (GNUNET_YES != - MAH_handle_is_ready (mint)) + MAH_handle_is_ready (exchange)) { GNUNET_break (0); return NULL; @@ -426,12 +426,12 @@ TALER_MINT_deposit (struct TALER_MINT_Handle *mint, GNUNET_break (0); return NULL; } - key_state = TALER_MINT_get_keys (mint); - dki = TALER_MINT_get_denomination_key (key_state, + key_state = TALER_EXCHANGE_get_keys (exchange); + dki = TALER_EXCHANGE_get_denomination_key (key_state, denom_pub); if (NULL == dki) { - TALER_LOG_WARNING ("Denomination key unknown to mint\n"); + TALER_LOG_WARNING ("Denomination key unknown to exchange\n"); return NULL; } if (GNUNET_SYSERR == @@ -488,13 +488,13 @@ TALER_MINT_deposit (struct TALER_MINT_Handle *mint, sizeof (*coin_sig)) ); - dh = GNUNET_new (struct TALER_MINT_DepositHandle); - dh->mint = mint; + dh = GNUNET_new (struct TALER_EXCHANGE_DepositHandle); + dh->exchange = exchange; dh->cb = cb; dh->cb_cls = cb_cls; - dh->url = MAH_path_to_url (mint, "/deposit"); + dh->url = MAH_path_to_url (exchange, "/deposit"); dh->depconf.purpose.size = htonl (sizeof (struct TALER_DepositConfirmationPS)); - dh->depconf.purpose.purpose = htonl (TALER_SIGNATURE_MINT_CONFIRM_DEPOSIT); + dh->depconf.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_DEPOSIT); dh->depconf.h_contract = *h_contract; dh->depconf.h_wire = h_wire; dh->depconf.transaction_id = GNUNET_htonll (transaction_id); @@ -535,7 +535,7 @@ TALER_MINT_deposit (struct TALER_MINT_Handle *mint, curl_easy_setopt (eh, CURLOPT_WRITEDATA, &dh->db)); - ctx = MAH_handle_to_context (mint); + ctx = MAH_handle_to_context (exchange); dh->job = MAC_job_add (ctx, eh, GNUNET_YES, @@ -552,7 +552,7 @@ TALER_MINT_deposit (struct TALER_MINT_Handle *mint, * @param deposit the deposit permission request handle */ void -TALER_MINT_deposit_cancel (struct TALER_MINT_DepositHandle *deposit) +TALER_EXCHANGE_deposit_cancel (struct TALER_EXCHANGE_DepositHandle *deposit) { if (NULL != deposit->job) { @@ -566,4 +566,4 @@ TALER_MINT_deposit_cancel (struct TALER_MINT_DepositHandle *deposit) } -/* end of mint_api_deposit.c */ +/* end of exchange_api_deposit.c */ diff --git a/src/mint-lib/mint_api_deposit_wtid.c b/src/exchange-lib/exchange_api_deposit_wtid.c similarity index 80% rename from src/mint-lib/mint_api_deposit_wtid.c rename to src/exchange-lib/exchange_api_deposit_wtid.c index d29f406e3..83beb03ae 100644 --- a/src/mint-lib/mint_api_deposit_wtid.c +++ b/src/exchange-lib/exchange_api_deposit_wtid.c @@ -15,8 +15,8 @@ */ /** - * @file mint-lib/mint_api_deposit_wtid.c - * @brief Implementation of the /deposit/wtid request of the mint's HTTP API + * @file exchange-lib/exchange_api_deposit_wtid.c + * @brief Implementation of the /deposit/wtid request of the exchange's HTTP API * @author Christian Grothoff */ #include "platform.h" @@ -24,24 +24,24 @@ #include #include /* just for HTTP status codes */ #include -#include "taler_mint_service.h" -#include "mint_api_common.h" -#include "mint_api_json.h" -#include "mint_api_context.h" -#include "mint_api_handle.h" +#include "taler_exchange_service.h" +#include "exchange_api_common.h" +#include "exchange_api_json.h" +#include "exchange_api_context.h" +#include "exchange_api_handle.h" #include "taler_signatures.h" /** * @brief A Deposit Wtid Handle */ -struct TALER_MINT_DepositWtidHandle +struct TALER_EXCHANGE_DepositWtidHandle { /** - * The connection to mint this request handle will use + * The connection to exchange this request handle will use */ - struct TALER_MINT_Handle *mint; + struct TALER_EXCHANGE_Handle *exchange; /** * The url for this request. @@ -61,7 +61,7 @@ struct TALER_MINT_DepositWtidHandle /** * Function to call with the result. */ - TALER_MINT_DepositWtidCallback cb; + TALER_EXCHANGE_DepositWtidCallback cb; /** * Closure for @a cb. @@ -74,7 +74,7 @@ struct TALER_MINT_DepositWtidHandle struct MAC_DownloadBuffer db; /** - * Information the mint should sign in response. + * Information the exchange should sign in response. * (with pre-filled fields from the request). */ struct TALER_ConfirmWirePS depconf; @@ -84,22 +84,22 @@ struct TALER_MINT_DepositWtidHandle /** * Verify that the signature on the "200 OK" response - * from the mint is valid. + * from the exchange is valid. * * @param dwh deposit wtid handle * @param json json reply with the signature * @return #GNUNET_OK if the signature is valid, #GNUNET_SYSERR if not */ static int -verify_deposit_wtid_signature_ok (const struct TALER_MINT_DepositWtidHandle *dwh, +verify_deposit_wtid_signature_ok (const struct TALER_EXCHANGE_DepositWtidHandle *dwh, json_t *json) { - struct TALER_MintSignatureP mint_sig; - struct TALER_MintPublicKeyP mint_pub; - const struct TALER_MINT_Keys *key_state; + struct TALER_ExchangeSignatureP exchange_sig; + struct TALER_ExchangePublicKeyP exchange_pub; + const struct TALER_EXCHANGE_Keys *key_state; struct MAJ_Specification spec[] = { - MAJ_spec_fixed_auto ("mint_sig", &mint_sig), - MAJ_spec_fixed_auto ("mint_pub", &mint_pub), + MAJ_spec_fixed_auto ("exchange_sig", &exchange_sig), + MAJ_spec_fixed_auto ("exchange_pub", &exchange_pub), MAJ_spec_end }; @@ -110,19 +110,19 @@ verify_deposit_wtid_signature_ok (const struct TALER_MINT_DepositWtidHandle *dwh GNUNET_break_op (0); return GNUNET_SYSERR; } - key_state = TALER_MINT_get_keys (dwh->mint); + key_state = TALER_EXCHANGE_get_keys (dwh->exchange); if (GNUNET_OK != - TALER_MINT_test_signing_key (key_state, - &mint_pub)) + TALER_EXCHANGE_test_signing_key (key_state, + &exchange_pub)) { GNUNET_break_op (0); return GNUNET_SYSERR; } if (GNUNET_OK != - GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MINT_CONFIRM_WIRE, + GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE, &dwh->depconf.purpose, - &mint_sig.eddsa_signature, - &mint_pub.eddsa_pub)) + &exchange_sig.eddsa_signature, + &exchange_pub.eddsa_pub)) { GNUNET_break_op (0); return GNUNET_SYSERR; @@ -135,14 +135,14 @@ verify_deposit_wtid_signature_ok (const struct TALER_MINT_DepositWtidHandle *dwh * Function called when we're done processing the * HTTP /deposit/wtid request. * - * @param cls the `struct TALER_MINT_DepositWtidHandle` + * @param cls the `struct TALER_EXCHANGE_DepositWtidHandle` * @param eh the curl request handle */ static void handle_deposit_wtid_finished (void *cls, CURL *eh) { - struct TALER_MINT_DepositWtidHandle *dwh = cls; + struct TALER_EXCHANGE_DepositWtidHandle *dwh = cls; long response_code; json_t *json; const struct TALER_WireTransferIdentifierRawP *wtid = NULL; @@ -208,16 +208,16 @@ handle_deposit_wtid_finished (void *cls, } break; case MHD_HTTP_BAD_REQUEST: - /* This should never happen, either us or the mint is buggy + /* This should never happen, either us or the exchange is buggy (or API version conflict); just pass JSON reply to the application */ break; case MHD_HTTP_UNAUTHORIZED: - /* Nothing really to verify, mint says one of the signatures is + /* Nothing really to verify, exchange says one of the signatures is invalid; as we checked them, this should never happen, we should pass the JSON reply to the application */ break; case MHD_HTTP_NOT_FOUND: - /* Mint does not know about transaction; + /* Exchange does not know about transaction; we should pass the reply to the application */ break; case MHD_HTTP_INTERNAL_SERVER_ERROR: @@ -240,14 +240,14 @@ handle_deposit_wtid_finished (void *cls, execution_time, coin_contribution); json_decref (json); - TALER_MINT_deposit_wtid_cancel (dwh); + TALER_EXCHANGE_deposit_wtid_cancel (dwh); } /** * Obtain wire transfer details about an existing deposit operation. * - * @param mint the mint to query + * @param exchange the exchange to query * @param merchant_priv the merchant's private key * @param h_wire hash of merchant's wire transfer details * @param h_contract hash of the contract @@ -257,25 +257,25 @@ handle_deposit_wtid_finished (void *cls, * @param cb_cls closure for @a cb * @return handle to abort request */ -struct TALER_MINT_DepositWtidHandle * -TALER_MINT_deposit_wtid (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_DepositWtidHandle * +TALER_EXCHANGE_deposit_wtid (struct TALER_EXCHANGE_Handle *exchange, const struct TALER_MerchantPrivateKeyP *merchant_priv, const struct GNUNET_HashCode *h_wire, const struct GNUNET_HashCode *h_contract, const struct TALER_CoinSpendPublicKeyP *coin_pub, uint64_t transaction_id, - TALER_MINT_DepositWtidCallback cb, + TALER_EXCHANGE_DepositWtidCallback cb, void *cb_cls) { struct TALER_DepositTrackPS dtp; struct TALER_MerchantSignatureP merchant_sig; - struct TALER_MINT_DepositWtidHandle *dwh; - struct TALER_MINT_Context *ctx; + struct TALER_EXCHANGE_DepositWtidHandle *dwh; + struct TALER_EXCHANGE_Context *ctx; json_t *deposit_wtid_obj; CURL *eh; if (GNUNET_YES != - MAH_handle_is_ready (mint)) + MAH_handle_is_ready (exchange)) { GNUNET_break (0); return NULL; @@ -308,13 +308,13 @@ TALER_MINT_deposit_wtid (struct TALER_MINT_Handle *mint, "merchant_sig", TALER_json_from_data (&merchant_sig, sizeof (merchant_sig))); - dwh = GNUNET_new (struct TALER_MINT_DepositWtidHandle); - dwh->mint = mint; + dwh = GNUNET_new (struct TALER_EXCHANGE_DepositWtidHandle); + dwh->exchange = exchange; dwh->cb = cb; dwh->cb_cls = cb_cls; - dwh->url = MAH_path_to_url (mint, "/deposit/wtid"); + dwh->url = MAH_path_to_url (exchange, "/deposit/wtid"); dwh->depconf.purpose.size = htonl (sizeof (struct TALER_DepositConfirmationPS)); - dwh->depconf.purpose.purpose = htonl (TALER_SIGNATURE_MINT_CONFIRM_WIRE); + dwh->depconf.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE); dwh->depconf.h_wire = *h_wire; dwh->depconf.h_contract = *h_contract; dwh->depconf.coin_pub = *coin_pub; @@ -345,7 +345,7 @@ TALER_MINT_deposit_wtid (struct TALER_MINT_Handle *mint, curl_easy_setopt (eh, CURLOPT_WRITEDATA, &dwh->db)); - ctx = MAH_handle_to_context (mint); + ctx = MAH_handle_to_context (exchange); dwh->job = MAC_job_add (ctx, eh, GNUNET_YES, @@ -362,7 +362,7 @@ TALER_MINT_deposit_wtid (struct TALER_MINT_Handle *mint, * @param dwh the wire deposits request handle */ void -TALER_MINT_deposit_wtid_cancel (struct TALER_MINT_DepositWtidHandle *dwh) +TALER_EXCHANGE_deposit_wtid_cancel (struct TALER_EXCHANGE_DepositWtidHandle *dwh) { if (NULL != dwh->job) { @@ -376,4 +376,4 @@ TALER_MINT_deposit_wtid_cancel (struct TALER_MINT_DepositWtidHandle *dwh) } -/* end of mint_api_deposit_wtid.c */ +/* end of exchange_api_deposit_wtid.c */ diff --git a/src/mint-lib/mint_api_handle.c b/src/exchange-lib/exchange_api_handle.c similarity index 76% rename from src/mint-lib/mint_api_handle.c rename to src/exchange-lib/exchange_api_handle.c index ef26cd838..d4b3e4deb 100644 --- a/src/mint-lib/mint_api_handle.c +++ b/src/exchange-lib/exchange_api_handle.c @@ -15,8 +15,8 @@ */ /** - * @file mint-lib/mint_api_handle.c - * @brief Implementation of the "handle" component of the mint's HTTP API + * @file exchange-lib/exchange_api_handle.c + * @brief Implementation of the "handle" component of the exchange's HTTP API * @author Sree Harsha Totakura * @author Christian Grothoff */ @@ -25,11 +25,11 @@ #include #include #include -#include "taler_mint_service.h" +#include "taler_exchange_service.h" #include "taler_signatures.h" -#include "mint_api_context.h" -#include "mint_api_json.h" -#include "mint_api_handle.h" +#include "exchange_api_context.h" +#include "exchange_api_json.h" +#include "exchange_api_handle.h" /** @@ -45,9 +45,9 @@ /** - * Stages of initialization for the `struct TALER_MINT_Handle` + * Stages of initialization for the `struct TALER_EXCHANGE_Handle` */ -enum MintHandleState +enum ExchangeHandleState { /** * Just allocated. @@ -55,7 +55,7 @@ enum MintHandleState MHS_INIT = 0, /** - * Obtained the mint's certification data and keys. + * Obtained the exchange's certification data and keys. */ MHS_CERT = 1, @@ -67,31 +67,31 @@ enum MintHandleState /** - * Data for the request to get the /keys of a mint. + * Data for the request to get the /keys of a exchange. */ struct KeysRequest; /** - * Handle to the mint + * Handle to the exchange */ -struct TALER_MINT_Handle +struct TALER_EXCHANGE_Handle { /** * The context of this handle */ - struct TALER_MINT_Context *ctx; + struct TALER_EXCHANGE_Context *ctx; /** - * The URL of the mint (i.e. "http://mint.taler.net/") + * The URL of the exchange (i.e. "http://exchange.taler.net/") */ char *url; /** - * Function to call with the mint's certification data, + * Function to call with the exchange's certification data, * NULL if this has already been done. */ - TALER_MINT_CertificationCallback cert_cb; + TALER_EXCHANGE_CertificationCallback cert_cb; /** * Closure to pass to @e cert_cb. @@ -99,21 +99,21 @@ struct TALER_MINT_Handle void *cert_cb_cls; /** - * Data for the request to get the /keys of a mint, + * Data for the request to get the /keys of a exchange, * NULL once we are past stage #MHS_INIT. */ struct KeysRequest *kr; /** - * Key data of the mint, only valid if + * Key data of the exchange, only valid if * @e handshake_complete is past stage #MHS_CERT. */ - struct TALER_MINT_Keys key_data; + struct TALER_EXCHANGE_Keys key_data; /** - * Stage of the mint's initialization routines. + * Stage of the exchange's initialization routines. */ - enum MintHandleState state; + enum ExchangeHandleState state; }; @@ -121,14 +121,14 @@ struct TALER_MINT_Handle /* ***************** Internal /keys fetching ************* */ /** - * Data for the request to get the /keys of a mint. + * Data for the request to get the /keys of a exchange. */ struct KeysRequest { /** - * The connection to mint this request handle will use + * The connection to exchange this request handle will use */ - struct TALER_MINT_Handle *mint; + struct TALER_EXCHANGE_Handle *exchange; /** * The url for this handle @@ -136,7 +136,7 @@ struct KeysRequest char *url; /** - * Entry for this request with the `struct TALER_MINT_Context`. + * Entry for this request with the `struct TALER_EXCHANGE_Context`. */ struct MAC_Job *job; @@ -171,7 +171,7 @@ free_keys_request (struct KeysRequest *kr) /** - * Parse a mint's signing key encoded in JSON. + * Parse a exchange's signing key encoded in JSON. * * @param[out] sign_key where to return the result * @param[in] sign_key_obj json to parse @@ -180,11 +180,11 @@ free_keys_request (struct KeysRequest *kr) * invalid or the json malformed. */ static int -parse_json_signkey (struct TALER_MINT_SigningPublicKey *sign_key, +parse_json_signkey (struct TALER_EXCHANGE_SigningPublicKey *sign_key, json_t *sign_key_obj, const struct TALER_MasterPublicKeyP *master_key) { - struct TALER_MintSigningKeyValidityPS sign_key_issue; + struct TALER_ExchangeSigningKeyValidityPS sign_key_issue; struct GNUNET_CRYPTO_EddsaSignature sig; struct GNUNET_TIME_Absolute valid_from; struct GNUNET_TIME_Absolute valid_until; @@ -213,8 +213,8 @@ parse_json_signkey (struct TALER_MINT_SigningPublicKey *sign_key, sign_key_issue.purpose.purpose = htonl (TALER_SIGNATURE_MASTER_SIGNING_KEY_VALIDITY); sign_key_issue.purpose.size = - htonl (sizeof (struct TALER_MintSigningKeyValidityPS) - - offsetof (struct TALER_MintSigningKeyValidityPS, + htonl (sizeof (struct TALER_ExchangeSigningKeyValidityPS) + - offsetof (struct TALER_ExchangeSigningKeyValidityPS, purpose)); sign_key_issue.master_public_key = *master_key; sign_key_issue.start = GNUNET_TIME_absolute_hton (valid_from); @@ -237,7 +237,7 @@ parse_json_signkey (struct TALER_MINT_SigningPublicKey *sign_key, /** - * Parse a mint's denomination key encoded in JSON. + * Parse a exchange's denomination key encoded in JSON. * * @param[out] denom_key where to return the result * @param[in] denom_key_obj json to parse @@ -247,7 +247,7 @@ parse_json_signkey (struct TALER_MINT_SigningPublicKey *sign_key, * invalid or the json malformed. */ static int -parse_json_denomkey (struct TALER_MINT_DenomPublicKey *denom_key, +parse_json_denomkey (struct TALER_EXCHANGE_DenomPublicKey *denom_key, json_t *denom_key_obj, struct TALER_MasterPublicKeyP *master_key, struct GNUNET_HashContext *hash_context) @@ -343,7 +343,7 @@ parse_json_denomkey (struct TALER_MINT_DenomPublicKey *denom_key, /** - * Parse a mint's auditor information encoded in JSON. + * Parse a exchange's auditor information encoded in JSON. * * @param[out] auditor where to return the result * @param[in] auditor_obj json to parse @@ -352,16 +352,16 @@ parse_json_denomkey (struct TALER_MINT_DenomPublicKey *denom_key, * invalid or the json malformed. */ static int -parse_json_auditor (struct TALER_MINT_AuditorInformation *auditor, +parse_json_auditor (struct TALER_EXCHANGE_AuditorInformation *auditor, json_t *auditor_obj, - const struct TALER_MINT_Keys *key_data) + const struct TALER_EXCHANGE_Keys *key_data) { json_t *keys; json_t *key; unsigned int len; unsigned int off; unsigned int i; - struct TALER_MintKeyValidityPS kv; + struct TALER_ExchangeKeyValidityPS kv; struct MAJ_Specification spec[] = { MAJ_spec_fixed_auto ("auditor_pub", &auditor->auditor_pub), @@ -378,18 +378,18 @@ parse_json_auditor (struct TALER_MINT_AuditorInformation *auditor, GNUNET_break_op (0); return GNUNET_SYSERR; } - kv.purpose.purpose = htonl (TALER_SIGNATURE_AUDITOR_MINT_KEYS); - kv.purpose.size = htonl (sizeof (struct TALER_MintKeyValidityPS)); + kv.purpose.purpose = htonl (TALER_SIGNATURE_AUDITOR_EXCHANGE_KEYS); + kv.purpose.size = htonl (sizeof (struct TALER_ExchangeKeyValidityPS)); kv.master = key_data->master_pub; len = json_array_size (keys); auditor->denom_keys = GNUNET_new_array (len, - const struct TALER_MINT_DenomPublicKey *); + const struct TALER_EXCHANGE_DenomPublicKey *); i = 0; off = 0; json_array_foreach (keys, i, key) { struct TALER_AuditorSignatureP auditor_sig; struct GNUNET_HashCode denom_h; - const struct TALER_MINT_DenomPublicKey *dk; + const struct TALER_EXCHANGE_DenomPublicKey *dk; unsigned int j; struct MAJ_Specification spec[] = { MAJ_spec_fixed_auto ("denom_pub_h", @@ -436,7 +436,7 @@ parse_json_auditor (struct TALER_MINT_AuditorInformation *auditor, &dk->fee_refresh); kv.denom_hash = dk->h_key; if (GNUNET_OK != - GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_AUDITOR_MINT_KEYS, + GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_AUDITOR_EXCHANGE_KEYS, &kv.purpose, &auditor_sig.eddsa_sig, &auditor->auditor_pub.eddsa_pub)) @@ -462,13 +462,13 @@ parse_json_auditor (struct TALER_MINT_AuditorInformation *auditor, */ static int decode_keys_json (json_t *resp_obj, - struct TALER_MINT_Keys *key_data) + struct TALER_EXCHANGE_Keys *key_data) { struct GNUNET_TIME_Absolute list_issue_date; - struct TALER_MintSignatureP sig; - struct TALER_MintKeySetPS ks; + struct TALER_ExchangeSignatureP sig; + struct TALER_ExchangeKeySetPS ks; struct GNUNET_HashContext *hash_context; - struct TALER_MintPublicKeyP pub; + struct TALER_ExchangePublicKeyP pub; if (JSON_OBJECT != json_typeof (resp_obj)) return GNUNET_SYSERR; @@ -507,7 +507,7 @@ decode_keys_json (json_t *resp_obj, json_array_size (sign_keys_array))); key_data->sign_keys = GNUNET_new_array (key_data->num_sign_keys, - struct TALER_MINT_SigningPublicKey); + struct TALER_EXCHANGE_SigningPublicKey); index = 0; json_array_foreach (sign_keys_array, index, sign_key_obj) { EXITIF (GNUNET_SYSERR == @@ -528,7 +528,7 @@ decode_keys_json (json_t *resp_obj, EXITIF (JSON_ARRAY != json_typeof (denom_keys_array)); EXITIF (0 == (key_data->num_denom_keys = json_array_size (denom_keys_array))); key_data->denom_keys = GNUNET_new_array (key_data->num_denom_keys, - struct TALER_MINT_DenomPublicKey); + struct TALER_EXCHANGE_DenomPublicKey); index = 0; json_array_foreach (denom_keys_array, index, denom_key_obj) { EXITIF (GNUNET_SYSERR == @@ -553,7 +553,7 @@ decode_keys_json (json_t *resp_obj, if (0 != len) { key_data->auditors = GNUNET_new_array (len, - struct TALER_MINT_AuditorInformation); + struct TALER_EXCHANGE_AuditorInformation); index = 0; json_array_foreach (auditors_array, index, auditor_info) { EXITIF (GNUNET_SYSERR == @@ -566,16 +566,16 @@ decode_keys_json (json_t *resp_obj, /* Validate signature... */ ks.purpose.size = htonl (sizeof (ks)); - ks.purpose.purpose = htonl (TALER_SIGNATURE_MINT_KEY_SET); + ks.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_KEY_SET); ks.list_issue_date = GNUNET_TIME_absolute_hton (list_issue_date); GNUNET_CRYPTO_hash_context_finish (hash_context, &ks.hc); hash_context = NULL; EXITIF (GNUNET_OK != - TALER_MINT_test_signing_key (key_data, + TALER_EXCHANGE_test_signing_key (key_data, &pub)); EXITIF (GNUNET_OK != - GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MINT_KEY_SET, + GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_EXCHANGE_KEY_SET, &ks.purpose, &sig.eddsa_signature, &pub.eddsa_pub)); @@ -600,10 +600,10 @@ keys_completed_cb (void *cls, CURL *eh) { struct KeysRequest *kr = cls; - struct TALER_MINT_Handle *mint = kr->mint; + struct TALER_EXCHANGE_Handle *exchange = kr->exchange; json_t *resp_obj; long response_code; - TALER_MINT_CertificationCallback cb; + TALER_EXCHANGE_CertificationCallback cb; resp_obj = MAC_download_get_result (&kr->db, eh, @@ -619,7 +619,7 @@ keys_completed_cb (void *cls, if ( (NULL == resp_obj) || (GNUNET_OK != decode_keys_json (resp_obj, - &kr->mint->key_data)) ) + &kr->exchange->key_data)) ) response_code = 0; break; default: @@ -633,27 +633,27 @@ keys_completed_cb (void *cls, if (MHD_HTTP_OK != response_code) { - mint->kr = NULL; + exchange->kr = NULL; free_keys_request (kr); - mint->state = MHS_FAILED; + exchange->state = MHS_FAILED; /* notify application that we failed */ - if (NULL != (cb = mint->cert_cb)) + if (NULL != (cb = exchange->cert_cb)) { - mint->cert_cb = NULL; - cb (mint->cert_cb_cls, + exchange->cert_cb = NULL; + cb (exchange->cert_cb_cls, NULL); } return; } - mint->kr = NULL; + exchange->kr = NULL; free_keys_request (kr); - mint->state = MHS_CERT; + exchange->state = MHS_CERT; /* notify application about the key information */ - if (NULL != (cb = mint->cert_cb)) + if (NULL != (cb = exchange->cert_cb)) { - mint->cert_cb = NULL; - cb (mint->cert_cb_cls, - &mint->key_data); + exchange->cert_cb = NULL; + cb (exchange->cert_cb_cls, + &exchange->key_data); } } @@ -662,13 +662,13 @@ keys_completed_cb (void *cls, /** - * Get the context of a mint. + * Get the context of a exchange. * - * @param h the mint handle to query + * @param h the exchange handle to query * @return ctx context to execute jobs in */ -struct TALER_MINT_Context * -MAH_handle_to_context (struct TALER_MINT_Handle *h) +struct TALER_EXCHANGE_Context * +MAH_handle_to_context (struct TALER_EXCHANGE_Handle *h) { return h->ctx; } @@ -677,11 +677,11 @@ MAH_handle_to_context (struct TALER_MINT_Handle *h) /** * Check if the handle is ready to process requests. * - * @param h the mint handle to query + * @param h the exchange handle to query * @return #GNUNET_YES if we are ready, #GNUNET_NO if not */ int -MAH_handle_is_ready (struct TALER_MINT_Handle *h) +MAH_handle_is_ready (struct TALER_EXCHANGE_Handle *h) { return (MHS_CERT == h->state) ? GNUNET_YES : GNUNET_NO; } @@ -690,12 +690,12 @@ MAH_handle_is_ready (struct TALER_MINT_Handle *h) /** * Obtain the URL to use for an API request. * - * @param h the mint handle to query + * @param h the exchange handle to query * @param path Taler API path (i.e. "/reserve/withdraw") * @return the full URI to use with cURL */ char * -MAH_path_to_url (struct TALER_MINT_Handle *h, +MAH_path_to_url (struct TALER_EXCHANGE_Handle *h, const char *path) { char *url; @@ -715,39 +715,39 @@ MAH_path_to_url (struct TALER_MINT_Handle *h, /* ********************* public API ******************* */ /** - * Initialise a connection to the mint. Will connect to the - * mint and obtain information about the mint's master public - * key and the mint's auditor. The respective information will + * Initialise a connection to the exchange. Will connect to the + * exchange and obtain information about the exchange's master public + * key and the exchange's auditor. The respective information will * be passed to the @a cert_cb once available, and all future - * interactions with the mint will be checked to be signed + * interactions with the exchange will be checked to be signed * (where appropriate) by the respective master key. * * @param ctx the context - * @param url HTTP base URL for the mint - * @param cert_cb function to call with the mint's certification information + * @param url HTTP base URL for the exchange + * @param cert_cb function to call with the exchange's certification information * @param cert_cb_cls closure for @a cert_cb - * @param ... list of additional arguments, terminated by #TALER_MINT_OPTION_END. - * @return the mint handle; NULL upon error + * @param ... list of additional arguments, terminated by #TALER_EXCHANGE_OPTION_END. + * @return the exchange handle; NULL upon error */ -struct TALER_MINT_Handle * -TALER_MINT_connect (struct TALER_MINT_Context *ctx, +struct TALER_EXCHANGE_Handle * +TALER_EXCHANGE_connect (struct TALER_EXCHANGE_Context *ctx, const char *url, - TALER_MINT_CertificationCallback cert_cb, + TALER_EXCHANGE_CertificationCallback cert_cb, void *cert_cb_cls, ...) { - struct TALER_MINT_Handle *mint; + struct TALER_EXCHANGE_Handle *exchange; struct KeysRequest *kr; CURL *c; - mint = GNUNET_new (struct TALER_MINT_Handle); - mint->ctx = ctx; - mint->url = GNUNET_strdup (url); - mint->cert_cb = cert_cb; - mint->cert_cb_cls = cert_cb_cls; + exchange = GNUNET_new (struct TALER_EXCHANGE_Handle); + exchange->ctx = ctx; + exchange->url = GNUNET_strdup (url); + exchange->cert_cb = cert_cb; + exchange->cert_cb_cls = cert_cb_cls; kr = GNUNET_new (struct KeysRequest); - kr->mint = mint; - kr->url = MAH_path_to_url (mint, "/keys"); + kr->exchange = exchange; + kr->url = MAH_path_to_url (exchange, "/keys"); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Requesting keys with URL `%s'.\n", kr->url); @@ -772,59 +772,59 @@ TALER_MINT_connect (struct TALER_MINT_Context *ctx, curl_easy_setopt (c, CURLOPT_WRITEDATA, &kr->db)); - kr->job = MAC_job_add (mint->ctx, + kr->job = MAC_job_add (exchange->ctx, c, GNUNET_NO, &keys_completed_cb, kr); - mint->kr = kr; - return mint; + exchange->kr = kr; + return exchange; } /** - * Disconnect from the mint + * Disconnect from the exchange * - * @param mint the mint handle + * @param exchange the exchange handle */ void -TALER_MINT_disconnect (struct TALER_MINT_Handle *mint) +TALER_EXCHANGE_disconnect (struct TALER_EXCHANGE_Handle *exchange) { unsigned int i; - if (NULL != mint->kr) + if (NULL != exchange->kr) { - MAC_job_cancel (mint->kr->job); - free_keys_request (mint->kr); - mint->kr = NULL; + MAC_job_cancel (exchange->kr->job); + free_keys_request (exchange->kr); + exchange->kr = NULL; } - GNUNET_array_grow (mint->key_data.sign_keys, - mint->key_data.num_sign_keys, + GNUNET_array_grow (exchange->key_data.sign_keys, + exchange->key_data.num_sign_keys, 0); - for (i=0;ikey_data.num_denom_keys;i++) - GNUNET_CRYPTO_rsa_public_key_free (mint->key_data.denom_keys[i].key.rsa_public_key); - GNUNET_array_grow (mint->key_data.denom_keys, - mint->key_data.num_denom_keys, + for (i=0;ikey_data.num_denom_keys;i++) + GNUNET_CRYPTO_rsa_public_key_free (exchange->key_data.denom_keys[i].key.rsa_public_key); + GNUNET_array_grow (exchange->key_data.denom_keys, + exchange->key_data.num_denom_keys, 0); - GNUNET_array_grow (mint->key_data.auditors, - mint->key_data.num_auditors, + GNUNET_array_grow (exchange->key_data.auditors, + exchange->key_data.num_auditors, 0); - GNUNET_free (mint->url); - GNUNET_free (mint); + GNUNET_free (exchange->url); + GNUNET_free (exchange); } /** - * Test if the given @a pub is a the current signing key from the mint + * Test if the given @a pub is a the current signing key from the exchange * according to @a keys. * - * @param keys the mint's key set - * @param pub claimed current online signing key for the mint + * @param keys the exchange's key set + * @param pub claimed current online signing key for the exchange * @return #GNUNET_OK if @a pub is (according to /keys) a current signing key */ int -TALER_MINT_test_signing_key (const struct TALER_MINT_Keys *keys, - const struct TALER_MintPublicKeyP *pub) +TALER_EXCHANGE_test_signing_key (const struct TALER_EXCHANGE_Keys *keys, + const struct TALER_ExchangePublicKeyP *pub) { struct GNUNET_TIME_Absolute now; unsigned int i; @@ -836,22 +836,22 @@ TALER_MINT_test_signing_key (const struct TALER_MINT_Keys *keys, (keys->sign_keys[i].valid_until.abs_value_us > now.abs_value_us - 60 * 60 * 1000LL * 1000LL) && (0 == memcmp (pub, &keys->sign_keys[i].key, - sizeof (struct TALER_MintPublicKeyP))) ) + sizeof (struct TALER_ExchangePublicKeyP))) ) return GNUNET_OK; return GNUNET_SYSERR; } /** - * Obtain the denomination key details from the mint. + * Obtain the denomination key details from the exchange. * - * @param keys the mint's key set + * @param keys the exchange's key set * @param pk public key of the denomination to lookup * @return details about the given denomination key, NULL if the key is * not found */ -const struct TALER_MINT_DenomPublicKey * -TALER_MINT_get_denomination_key (const struct TALER_MINT_Keys *keys, +const struct TALER_EXCHANGE_DenomPublicKey * +TALER_EXCHANGE_get_denomination_key (const struct TALER_EXCHANGE_Keys *keys, const struct TALER_DenominationPublicKey *pk) { unsigned int i; @@ -865,14 +865,14 @@ TALER_MINT_get_denomination_key (const struct TALER_MINT_Keys *keys, /** - * Obtain the denomination key details from the mint. + * Obtain the denomination key details from the exchange. * - * @param keys the mint's key set + * @param keys the exchange's key set * @param hc hash of the public key of the denomination to lookup * @return details about the given denomination key */ -const struct TALER_MINT_DenomPublicKey * -TALER_MINT_get_denomination_key_by_hash (const struct TALER_MINT_Keys *keys, +const struct TALER_EXCHANGE_DenomPublicKey * +TALER_EXCHANGE_get_denomination_key_by_hash (const struct TALER_EXCHANGE_Keys *keys, const struct GNUNET_HashCode *hc) { unsigned int i; @@ -887,16 +887,16 @@ TALER_MINT_get_denomination_key_by_hash (const struct TALER_MINT_Keys *keys, /** - * Obtain the keys from the mint. + * Obtain the keys from the exchange. * - * @param mint the mint handle - * @return the mint's key set + * @param exchange the exchange handle + * @return the exchange's key set */ -const struct TALER_MINT_Keys * -TALER_MINT_get_keys (const struct TALER_MINT_Handle *mint) +const struct TALER_EXCHANGE_Keys * +TALER_EXCHANGE_get_keys (const struct TALER_EXCHANGE_Handle *exchange) { - return &mint->key_data; + return &exchange->key_data; } -/* end of mint_api_handle.c */ +/* end of exchange_api_handle.c */ diff --git a/src/mint-lib/mint_api_handle.h b/src/exchange-lib/exchange_api_handle.h similarity index 68% rename from src/mint-lib/mint_api_handle.h rename to src/exchange-lib/exchange_api_handle.h index 0dae58db6..48423a7b8 100644 --- a/src/mint-lib/mint_api_handle.h +++ b/src/exchange-lib/exchange_api_handle.h @@ -15,45 +15,45 @@ */ /** - * @file mint-lib/mint_api_handle.h - * @brief Internal interface to the handle part of the mint's HTTP API + * @file exchange-lib/exchange_api_handle.h + * @brief Internal interface to the handle part of the exchange's HTTP API * @author Christian Grothoff */ #include "platform.h" #include -#include "taler_mint_service.h" +#include "taler_exchange_service.h" /** - * Get the context of a mint. + * Get the context of a exchange. * - * @param h the mint handle to query + * @param h the exchange handle to query * @return ctx context to execute jobs in */ -struct TALER_MINT_Context * -MAH_handle_to_context (struct TALER_MINT_Handle *h); +struct TALER_EXCHANGE_Context * +MAH_handle_to_context (struct TALER_EXCHANGE_Handle *h); /** * Check if the handle is ready to process requests. * - * @param h the mint handle to query + * @param h the exchange handle to query * @return #GNUNET_YES if we are ready, #GNUNET_NO if not */ int -MAH_handle_is_ready (struct TALER_MINT_Handle *h); +MAH_handle_is_ready (struct TALER_EXCHANGE_Handle *h); /** * Obtain the URL to use for an API request. * - * @param h the mint handle to query + * @param h the exchange handle to query * @param path Taler API path (i.e. "/reserve/withdraw") * @return the full URI to use with cURL */ char * -MAH_path_to_url (struct TALER_MINT_Handle *h, +MAH_path_to_url (struct TALER_EXCHANGE_Handle *h, const char *path); -/* end of mint_api_handle.h */ +/* end of exchange_api_handle.h */ diff --git a/src/mint-lib/mint_api_json.c b/src/exchange-lib/exchange_api_json.c similarity index 99% rename from src/mint-lib/mint_api_json.c rename to src/exchange-lib/exchange_api_json.c index 7de33e5eb..d91feba0e 100644 --- a/src/mint-lib/mint_api_json.c +++ b/src/exchange-lib/exchange_api_json.c @@ -14,14 +14,14 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file mint-lib/mint_api_json.c + * @file exchange-lib/exchange_api_json.c * @brief functions to parse incoming requests (JSON snippets) * @author Florian Dold * @author Benedikt Mueller * @author Christian Grothoff */ #include "platform.h" -#include "mint_api_json.h" +#include "exchange_api_json.h" /** * Navigate and parse data in a JSON tree. @@ -522,4 +522,4 @@ MAJ_spec_rsa_signature (const char *name, } -/* end of mint_api_json.c */ +/* end of exchange_api_json.c */ diff --git a/src/mint-lib/mint_api_json.h b/src/exchange-lib/exchange_api_json.h similarity index 99% rename from src/mint-lib/mint_api_json.h rename to src/exchange-lib/exchange_api_json.h index 6bc3a5572..41efcea68 100644 --- a/src/mint-lib/mint_api_json.h +++ b/src/exchange-lib/exchange_api_json.h @@ -14,7 +14,7 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file mint-lib/mint_api_json.h + * @file exchange-lib/exchange_api_json.h * @brief functions to parse incoming requests (JSON snippets) * @author Florian Dold * @author Benedikt Mueller @@ -349,4 +349,4 @@ MAJ_spec_rsa_signature (const char *name, -/* end of mint_api_json.h */ +/* end of exchange_api_json.h */ diff --git a/src/mint-lib/mint_api_refresh.c b/src/exchange-lib/exchange_api_refresh.c similarity index 91% rename from src/mint-lib/mint_api_refresh.c rename to src/exchange-lib/exchange_api_refresh.c index cea16b153..03d59ea3b 100644 --- a/src/mint-lib/mint_api_refresh.c +++ b/src/exchange-lib/exchange_api_refresh.c @@ -15,8 +15,8 @@ */ /** - * @file mint-lib/mint_api_refresh.c - * @brief Implementation of the /refresh/melt+reveal requests of the mint's HTTP API + * @file exchange-lib/exchange_api_refresh.c + * @brief Implementation of the /refresh/melt+reveal requests of the exchange's HTTP API * @author Christian Grothoff */ #include "platform.h" @@ -24,11 +24,11 @@ #include #include /* just for HTTP status codes */ #include -#include "taler_mint_service.h" -#include "mint_api_common.h" -#include "mint_api_json.h" -#include "mint_api_context.h" -#include "mint_api_handle.h" +#include "taler_exchange_service.h" +#include "exchange_api_common.h" +#include "exchange_api_json.h" +#include "exchange_api_context.h" +#include "exchange_api_handle.h" #include "taler_signatures.h" @@ -145,7 +145,7 @@ struct MeltDataP /* Followed by serializations of: 1) struct MeltedCoinP melted_coins[num_melted_coins]; - 2) struct TALER_MINT_DenomPublicKey fresh_pks[num_fresh_coins]; + 2) struct TALER_EXCHANGE_DenomPublicKey fresh_pks[num_fresh_coins]; 3) TALER_CNC_KAPPA times: 3a) struct FreshCoinP fresh_coins[num_fresh_coins]; */ @@ -196,7 +196,7 @@ struct MeltedCoin struct TALER_DenominationPublicKey pub_key; /** - * Mint's signature over the coin. + * Exchange's signature over the coin. */ struct TALER_DenominationSignature sig; @@ -257,7 +257,7 @@ struct MeltData /** * Array of @e num_fresh_coins denomination keys for the coins to be - * freshly minted. + * freshly exchangeed. */ struct TALER_DenominationPublicKey *fresh_pks; @@ -794,7 +794,7 @@ deserialize_melt_data (const char *buf, */ static void setup_fresh_coin (struct FreshCoin *fc, - const struct TALER_MINT_DenomPublicKey *pk) + const struct TALER_EXCHANGE_DenomPublicKey *pk) { struct GNUNET_CRYPTO_EddsaPrivateKey *epk; unsigned int len; @@ -818,7 +818,7 @@ setup_fresh_coin (struct FreshCoin *fc, * no money is lost in case of hardware failures, is operation does * not actually initiate the request. Instead, it generates a buffer * which the caller must store before proceeding with the actual call - * to #TALER_MINT_refresh_melt() that will generate the request. + * to #TALER_EXCHANGE_refresh_melt() that will generate the request. * * This function does verify that the given request data is internally * consistent. However, the @a melts_sigs are only verified if @@ -845,20 +845,20 @@ setup_fresh_coin (struct FreshCoin *fc, * @param fresh_pks array of @a pks_len denominations of fresh coins to create * @param[out] res_size set to the size of the return value, or 0 on error * @return NULL - * if the inputs are invalid (i.e. denomination key not with this mint). + * if the inputs are invalid (i.e. denomination key not with this exchange). * Otherwise, pointer to a buffer of @a res_size to store persistently - * before proceeding to #TALER_MINT_refresh_melt(). + * before proceeding to #TALER_EXCHANGE_refresh_melt(). * Non-null results should be freed using #GNUNET_free(). */ char * -TALER_MINT_refresh_prepare (unsigned int num_melts, +TALER_EXCHANGE_refresh_prepare (unsigned int num_melts, const struct TALER_CoinSpendPrivateKeyP *melt_privs, const struct TALER_Amount *melt_amounts, const struct TALER_DenominationSignature *melt_sigs, - const struct TALER_MINT_DenomPublicKey *melt_pks, + const struct TALER_EXCHANGE_DenomPublicKey *melt_pks, int check_sigs, unsigned int fresh_pks_len, - const struct TALER_MINT_DenomPublicKey *fresh_pks, + const struct TALER_EXCHANGE_DenomPublicKey *fresh_pks, size_t *res_size) { struct MeltData md; @@ -1022,13 +1022,13 @@ TALER_MINT_refresh_prepare (unsigned int num_melts, /** * @brief A /refresh/melt Handle */ -struct TALER_MINT_RefreshMeltHandle +struct TALER_EXCHANGE_RefreshMeltHandle { /** - * The connection to mint this request handle will use + * The connection to exchange this request handle will use */ - struct TALER_MINT_Handle *mint; + struct TALER_EXCHANGE_Handle *exchange; /** * The url for this request. @@ -1048,7 +1048,7 @@ struct TALER_MINT_RefreshMeltHandle /** * Function to call with refresh melt failure results. */ - TALER_MINT_RefreshMeltCallback melt_cb; + TALER_EXCHANGE_RefreshMeltCallback melt_cb; /** * Closure for @e result_cb and @e melt_failure_cb. @@ -1069,24 +1069,24 @@ struct TALER_MINT_RefreshMeltHandle /** * Verify that the signature on the "200 OK" response - * from the mint is valid. + * from the exchange is valid. * * @param rmh melt handle * @param json json reply with the signature - * @param[out] noreveal_index set to the noreveal index selected by the mint + * @param[out] noreveal_index set to the noreveal index selected by the exchange * @return #GNUNET_OK if the signature is valid, #GNUNET_SYSERR if not */ static int -verify_refresh_melt_signature_ok (struct TALER_MINT_RefreshMeltHandle *rmh, +verify_refresh_melt_signature_ok (struct TALER_EXCHANGE_RefreshMeltHandle *rmh, json_t *json, uint16_t *noreveal_index) { - struct TALER_MintSignatureP mint_sig; - struct TALER_MintPublicKeyP mint_pub; - const struct TALER_MINT_Keys *key_state; + struct TALER_ExchangeSignatureP exchange_sig; + struct TALER_ExchangePublicKeyP exchange_pub; + const struct TALER_EXCHANGE_Keys *key_state; struct MAJ_Specification spec[] = { - MAJ_spec_fixed_auto ("mint_sig", &mint_sig), - MAJ_spec_fixed_auto ("mint_pub", &mint_pub), + MAJ_spec_fixed_auto ("exchange_sig", &exchange_sig), + MAJ_spec_fixed_auto ("exchange_pub", &exchange_pub), MAJ_spec_uint16 ("noreveal_index", noreveal_index), MAJ_spec_end }; @@ -1100,11 +1100,11 @@ verify_refresh_melt_signature_ok (struct TALER_MINT_RefreshMeltHandle *rmh, return GNUNET_SYSERR; } - /* check that mint signing key is permitted */ - key_state = TALER_MINT_get_keys (rmh->mint); + /* check that exchange signing key is permitted */ + key_state = TALER_EXCHANGE_get_keys (rmh->exchange); if (GNUNET_OK != - TALER_MINT_test_signing_key (key_state, - &mint_pub)) + TALER_EXCHANGE_test_signing_key (key_state, + &exchange_pub)) { GNUNET_break_op (0); return GNUNET_SYSERR; @@ -1117,17 +1117,17 @@ verify_refresh_melt_signature_ok (struct TALER_MINT_RefreshMeltHandle *rmh, return GNUNET_SYSERR; } - /* verify signature by mint */ - confirm.purpose.purpose = htonl (TALER_SIGNATURE_MINT_CONFIRM_MELT); + /* verify signature by exchange */ + confirm.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_MELT); confirm.purpose.size = htonl (sizeof (struct TALER_RefreshMeltConfirmationPS)); confirm.session_hash = rmh->md->melt_session_hash; confirm.noreveal_index = htons (*noreveal_index); confirm.reserved = htons (0); if (GNUNET_OK != - GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MINT_CONFIRM_MELT, + GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_EXCHANGE_CONFIRM_MELT, &confirm.purpose, - &mint_sig.eddsa_signature, - &mint_pub.eddsa_pub)) + &exchange_sig.eddsa_signature, + &exchange_pub.eddsa_pub)) { GNUNET_break_op (0); return GNUNET_SYSERR; @@ -1138,14 +1138,14 @@ verify_refresh_melt_signature_ok (struct TALER_MINT_RefreshMeltHandle *rmh, /** * Verify that the signatures on the "403 FORBIDDEN" response from the - * mint demonstrating customer double-spending are valid. + * exchange demonstrating customer double-spending are valid. * * @param rmh melt handle * @param json json reply with the signature(s) and transaction history * @return #GNUNET_OK if the signature(s) is valid, #GNUNET_SYSERR if not */ static int -verify_refresh_melt_signature_forbidden (struct TALER_MINT_RefreshMeltHandle *rmh, +verify_refresh_melt_signature_forbidden (struct TALER_EXCHANGE_RefreshMeltHandle *rmh, json_t *json) { json_t *history; @@ -1172,7 +1172,7 @@ verify_refresh_melt_signature_forbidden (struct TALER_MINT_RefreshMeltHandle *rm return GNUNET_SYSERR; } - /* Find out which coin was deemed problematic by the mint */ + /* Find out which coin was deemed problematic by the exchange */ mc = NULL; for (i=0;imd->num_melted_coins;i++) { @@ -1222,7 +1222,7 @@ verify_refresh_melt_signature_forbidden (struct TALER_MINT_RefreshMeltHandle *rm history = json_object_get (json, "history"); if (GNUNET_OK != - TALER_MINT_verify_coin_history_ (original_value.currency, + TALER_EXCHANGE_verify_coin_history_ (original_value.currency, &coin_pub, history, &total)) @@ -1261,14 +1261,14 @@ verify_refresh_melt_signature_forbidden (struct TALER_MINT_RefreshMeltHandle *rm * Function called when we're done processing the * HTTP /refresh/melt request. * - * @param cls the `struct TALER_MINT_RefreshMeltHandle` + * @param cls the `struct TALER_EXCHANGE_RefreshMeltHandle` * @param eh the curl request handle */ static void handle_refresh_melt_finished (void *cls, CURL *eh) { - struct TALER_MINT_RefreshMeltHandle *rmh = cls; + struct TALER_EXCHANGE_RefreshMeltHandle *rmh = cls; long response_code; json_t *json; uint16_t noreveal_index = TALER_CNC_KAPPA; /* invalid value */ @@ -1300,7 +1300,7 @@ handle_refresh_melt_finished (void *cls, } break; case MHD_HTTP_BAD_REQUEST: - /* This should never happen, either us or the mint is buggy + /* This should never happen, either us or the exchange is buggy (or API version conflict); just pass JSON reply to the application */ break; case MHD_HTTP_FORBIDDEN: @@ -1314,7 +1314,7 @@ handle_refresh_melt_finished (void *cls, } break; case MHD_HTTP_UNAUTHORIZED: - /* Nothing really to verify, mint says one of the signatures is + /* Nothing really to verify, exchange says one of the signatures is invalid; assuming we checked them, this should never happen, we should pass the JSON reply to the application */ break; @@ -1341,7 +1341,7 @@ handle_refresh_melt_finished (void *cls, UINT16_MAX, json); json_decref (json); - TALER_MINT_refresh_melt_cancel (rmh); + TALER_EXCHANGE_refresh_melt_cancel (rmh); } @@ -1388,30 +1388,30 @@ melted_coin_to_json (const struct GNUNET_HashCode *melt_session_hash, /** - * Submit a melt request to the mint and get the mint's + * Submit a melt request to the exchange and get the exchange's * response. * * This API is typically used by a wallet. Note that to ensure that * no money is lost in case of hardware failures, the provided * argument should have been constructed using - * #TALER_MINT_refresh_prepare and committed to persistent storage + * #TALER_EXCHANGE_refresh_prepare and committed to persistent storage * prior to calling this function. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param refresh_data_length size of the @a refresh_data (returned - * in the `res_size` argument from #TALER_MINT_refresh_prepare()) + * in the `res_size` argument from #TALER_EXCHANGE_refresh_prepare()) * @param refresh_data the refresh data as returned from - #TALER_MINT_refresh_prepare()) + #TALER_EXCHANGE_refresh_prepare()) * @param melt_cb the callback to call with the result * @param melt_cb_cls closure for @a melt_cb * @return a handle for this request; NULL if the argument was invalid. * In this case, neither callback will be called. */ -struct TALER_MINT_RefreshMeltHandle * -TALER_MINT_refresh_melt (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_RefreshMeltHandle * +TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange, size_t refresh_data_length, const char *refresh_data, - TALER_MINT_RefreshMeltCallback melt_cb, + TALER_EXCHANGE_RefreshMeltCallback melt_cb, void *melt_cb_cls) { json_t *melt_obj; @@ -1422,15 +1422,15 @@ TALER_MINT_refresh_melt (struct TALER_MINT_Handle *mint, json_t *secret_encs; json_t *link_encs; json_t *tmp; - struct TALER_MINT_RefreshMeltHandle *rmh; + struct TALER_EXCHANGE_RefreshMeltHandle *rmh; CURL *eh; - struct TALER_MINT_Context *ctx; + struct TALER_EXCHANGE_Context *ctx; struct MeltData *md; unsigned int i; unsigned int j; if (GNUNET_YES != - MAH_handle_is_ready (mint)) + MAH_handle_is_ready (exchange)) { GNUNET_break (0); return NULL; @@ -1582,12 +1582,12 @@ TALER_MINT_refresh_melt (struct TALER_MINT_Handle *mint, "link_encs", link_encs); /* and now we can at last begin the actual request handling */ - rmh = GNUNET_new (struct TALER_MINT_RefreshMeltHandle); - rmh->mint = mint; + rmh = GNUNET_new (struct TALER_EXCHANGE_RefreshMeltHandle); + rmh->exchange = exchange; rmh->melt_cb = melt_cb; rmh->melt_cb_cls = melt_cb_cls; rmh->md = md; - rmh->url = MAH_path_to_url (mint, + rmh->url = MAH_path_to_url (exchange, "/refresh/melt"); eh = curl_easy_init (); @@ -1615,7 +1615,7 @@ TALER_MINT_refresh_melt (struct TALER_MINT_Handle *mint, curl_easy_setopt (eh, CURLOPT_WRITEDATA, &rmh->db)); - ctx = MAH_handle_to_context (mint); + ctx = MAH_handle_to_context (exchange); rmh->job = MAC_job_add (ctx, eh, GNUNET_YES, @@ -1632,7 +1632,7 @@ TALER_MINT_refresh_melt (struct TALER_MINT_Handle *mint, * @param rmh the refresh melt handle */ void -TALER_MINT_refresh_melt_cancel (struct TALER_MINT_RefreshMeltHandle *rmh) +TALER_EXCHANGE_refresh_melt_cancel (struct TALER_EXCHANGE_RefreshMeltHandle *rmh) { if (NULL != rmh->job) { @@ -1654,13 +1654,13 @@ TALER_MINT_refresh_melt_cancel (struct TALER_MINT_RefreshMeltHandle *rmh) /** * @brief A /refresh/reveal Handle */ -struct TALER_MINT_RefreshRevealHandle +struct TALER_EXCHANGE_RefreshRevealHandle { /** - * The connection to mint this request handle will use + * The connection to exchange this request handle will use */ - struct TALER_MINT_Handle *mint; + struct TALER_EXCHANGE_Handle *exchange; /** * The url for this request. @@ -1680,7 +1680,7 @@ struct TALER_MINT_RefreshRevealHandle /** * Function to call with the result. */ - TALER_MINT_RefreshRevealCallback reveal_cb; + TALER_EXCHANGE_RefreshRevealCallback reveal_cb; /** * Closure for @e reveal_cb. @@ -1698,7 +1698,7 @@ struct TALER_MINT_RefreshRevealHandle struct MeltData *md; /** - * The index selected by the mint in cut-and-choose to not be revealed. + * The index selected by the exchange in cut-and-choose to not be revealed. */ uint16_t noreveal_index; @@ -1708,7 +1708,7 @@ struct TALER_MINT_RefreshRevealHandle /** * We got a 200 OK response for the /refresh/reveal operation. * Extract the coin signatures and return them to the caller. - * The signatures we get from the mint is for the blinded value. + * The signatures we get from the exchange is for the blinded value. * Thus, we first must unblind them and then should verify their * validity. * @@ -1716,13 +1716,13 @@ struct TALER_MINT_RefreshRevealHandle * to the application via the callback. * * @param rrh operation handle - * @param json reply from the mint + * @param json reply from the exchange * @param[out] coin_privs array of length `num_fresh_coins`, initialized to contain private keys * @param[out] sigs array of length `num_fresh_coins`, initialized to cointain RSA signatures * @return #GNUNET_OK on success, #GNUNET_SYSERR on errors */ static int -refresh_reveal_ok (struct TALER_MINT_RefreshRevealHandle *rrh, +refresh_reveal_ok (struct TALER_EXCHANGE_RefreshRevealHandle *rrh, json_t *json, struct TALER_CoinSpendPrivateKeyP *coin_privs, struct TALER_DenominationSignature *sigs) @@ -1814,14 +1814,14 @@ refresh_reveal_ok (struct TALER_MINT_RefreshRevealHandle *rrh, * Function called when we're done processing the * HTTP /refresh/reveal request. * - * @param cls the `struct TALER_MINT_RefreshHandle` + * @param cls the `struct TALER_EXCHANGE_RefreshHandle` * @param eh the curl request handle */ static void handle_refresh_reveal_finished (void *cls, CURL *eh) { - struct TALER_MINT_RefreshRevealHandle *rrh = cls; + struct TALER_EXCHANGE_RefreshRevealHandle *rrh = cls; long response_code; json_t *json; @@ -1865,11 +1865,11 @@ handle_refresh_reveal_finished (void *cls, } break; case MHD_HTTP_BAD_REQUEST: - /* This should never happen, either us or the mint is buggy + /* This should never happen, either us or the exchange is buggy (or API version conflict); just pass JSON reply to the application */ break; case MHD_HTTP_CONFLICT: - /* Nothing really to verify, mint says our reveal is inconsitent + /* Nothing really to verify, exchange says our reveal is inconsitent with our commitment, so either side is buggy; we should pass the JSON reply to the application */ break; @@ -1892,12 +1892,12 @@ handle_refresh_reveal_finished (void *cls, 0, NULL, NULL, json); json_decref (json); - TALER_MINT_refresh_reveal_cancel (rrh); + TALER_EXCHANGE_refresh_reveal_cancel (rrh); } /** - * Submit a /refresh/reval request to the mint and get the mint's + * Submit a /refresh/reval request to the exchange and get the exchange's * response. * * This API is typically used by a wallet. Note that to ensure that @@ -1905,39 +1905,39 @@ handle_refresh_reveal_finished (void *cls, * arguments should have been committed to persistent storage * prior to calling this function. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param refresh_data_length size of the @a refresh_data (returned - * in the `res_size` argument from #TALER_MINT_refresh_prepare()) + * in the `res_size` argument from #TALER_EXCHANGE_refresh_prepare()) * @param refresh_data the refresh data as returned from - #TALER_MINT_refresh_prepare()) - * @param noreveal_index response from the mint to the - * #TALER_MINT_refresh_melt() invocation + #TALER_EXCHANGE_refresh_prepare()) + * @param noreveal_index response from the exchange to the + * #TALER_EXCHANGE_refresh_melt() invocation * @param reveal_cb the callback to call with the final result of the * refresh operation * @param reveal_cb_cls closure for the above callback * @return a handle for this request; NULL if the argument was invalid. * In this case, neither callback will be called. */ -struct TALER_MINT_RefreshRevealHandle * -TALER_MINT_refresh_reveal (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_RefreshRevealHandle * +TALER_EXCHANGE_refresh_reveal (struct TALER_EXCHANGE_Handle *exchange, size_t refresh_data_length, const char *refresh_data, uint16_t noreveal_index, - TALER_MINT_RefreshRevealCallback reveal_cb, + TALER_EXCHANGE_RefreshRevealCallback reveal_cb, void *reveal_cb_cls) { - struct TALER_MINT_RefreshRevealHandle *rrh; + struct TALER_EXCHANGE_RefreshRevealHandle *rrh; json_t *transfer_privs; json_t *reveal_obj; json_t *tmp; CURL *eh; - struct TALER_MINT_Context *ctx; + struct TALER_EXCHANGE_Context *ctx; struct MeltData *md; unsigned int i; unsigned int j; if (GNUNET_YES != - MAH_handle_is_ready (mint)) + MAH_handle_is_ready (exchange)) { GNUNET_break (0); return NULL; @@ -1953,7 +1953,7 @@ TALER_MINT_refresh_reveal (struct TALER_MINT_Handle *mint, { /* We check this here, as it would be really bad to below just disclose all the transfer keys. Note that this error should - have been caught way earlier when the mint replied, but maybe + have been caught way earlier when the exchange replied, but maybe we had some internal corruption that changed the value... */ GNUNET_break (0); return NULL; @@ -1991,13 +1991,13 @@ TALER_MINT_refresh_reveal (struct TALER_MINT_Handle *mint, transfer_privs); /* finally, we can actually issue the request */ - rrh = GNUNET_new (struct TALER_MINT_RefreshRevealHandle); - rrh->mint = mint; + rrh = GNUNET_new (struct TALER_EXCHANGE_RefreshRevealHandle); + rrh->exchange = exchange; rrh->noreveal_index = noreveal_index; rrh->reveal_cb = reveal_cb; rrh->reveal_cb_cls = reveal_cb_cls; rrh->md = md; - rrh->url = MAH_path_to_url (rrh->mint, + rrh->url = MAH_path_to_url (rrh->exchange, "/refresh/reveal"); eh = curl_easy_init (); @@ -2025,7 +2025,7 @@ TALER_MINT_refresh_reveal (struct TALER_MINT_Handle *mint, curl_easy_setopt (eh, CURLOPT_WRITEDATA, &rrh->db)); - ctx = MAH_handle_to_context (rrh->mint); + ctx = MAH_handle_to_context (rrh->exchange); rrh->job = MAC_job_add (ctx, eh, GNUNET_YES, @@ -2042,7 +2042,7 @@ TALER_MINT_refresh_reveal (struct TALER_MINT_Handle *mint, * @param rrh the refresh reval handle */ void -TALER_MINT_refresh_reveal_cancel (struct TALER_MINT_RefreshRevealHandle *rrh) +TALER_EXCHANGE_refresh_reveal_cancel (struct TALER_EXCHANGE_RefreshRevealHandle *rrh) { if (NULL != rrh->job) { @@ -2058,4 +2058,4 @@ TALER_MINT_refresh_reveal_cancel (struct TALER_MINT_RefreshRevealHandle *rrh) } -/* end of mint_api_refresh.c */ +/* end of exchange_api_refresh.c */ diff --git a/src/mint-lib/mint_api_refresh_link.c b/src/exchange-lib/exchange_api_refresh_link.c similarity index 87% rename from src/mint-lib/mint_api_refresh_link.c rename to src/exchange-lib/exchange_api_refresh_link.c index dcd2326ca..9576916bc 100644 --- a/src/mint-lib/mint_api_refresh_link.c +++ b/src/exchange-lib/exchange_api_refresh_link.c @@ -15,8 +15,8 @@ */ /** - * @file mint-lib/mint_api_refresh_link.c - * @brief Implementation of the /refresh/link request of the mint's HTTP API + * @file exchange-lib/exchange_api_refresh_link.c + * @brief Implementation of the /refresh/link request of the exchange's HTTP API * @author Christian Grothoff */ #include "platform.h" @@ -24,23 +24,23 @@ #include #include /* just for HTTP status codes */ #include -#include "taler_mint_service.h" -#include "mint_api_json.h" -#include "mint_api_context.h" -#include "mint_api_handle.h" +#include "taler_exchange_service.h" +#include "exchange_api_json.h" +#include "exchange_api_context.h" +#include "exchange_api_handle.h" #include "taler_signatures.h" /** * @brief A /refresh/link Handle */ -struct TALER_MINT_RefreshLinkHandle +struct TALER_EXCHANGE_RefreshLinkHandle { /** - * The connection to mint this request handle will use + * The connection to exchange this request handle will use */ - struct TALER_MINT_Handle *mint; + struct TALER_EXCHANGE_Handle *exchange; /** * The url for this request. @@ -55,7 +55,7 @@ struct TALER_MINT_RefreshLinkHandle /** * Function to call with the result. */ - TALER_MINT_RefreshLinkCallback link_cb; + TALER_EXCHANGE_RefreshLinkCallback link_cb; /** * Closure for @e cb. @@ -89,7 +89,7 @@ struct TALER_MINT_RefreshLinkHandle * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ static int -parse_refresh_link_coin (const struct TALER_MINT_RefreshLinkHandle *rlh, +parse_refresh_link_coin (const struct TALER_EXCHANGE_RefreshLinkHandle *rlh, json_t *json, const struct TALER_TransferPublicKeyP *trans_pub, const struct TALER_EncryptedLinkSecretP *secret_enc, @@ -172,7 +172,7 @@ parse_refresh_link_coin (const struct TALER_MINT_RefreshLinkHandle *rlh, * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ static int -parse_refresh_link_ok (struct TALER_MINT_RefreshLinkHandle *rlh, +parse_refresh_link_ok (struct TALER_EXCHANGE_RefreshLinkHandle *rlh, json_t *json) { unsigned int session; @@ -326,14 +326,14 @@ parse_refresh_link_ok (struct TALER_MINT_RefreshLinkHandle *rlh, * Function called when we're done processing the * HTTP /refresh/link request. * - * @param cls the `struct TALER_MINT_RefreshLinkHandle` + * @param cls the `struct TALER_EXCHANGE_RefreshLinkHandle` * @param eh the curl request handle */ static void handle_refresh_link_finished (void *cls, CURL *eh) { - struct TALER_MINT_RefreshLinkHandle *rlh = cls; + struct TALER_EXCHANGE_RefreshLinkHandle *rlh = cls; long response_code; json_t *json; @@ -355,11 +355,11 @@ handle_refresh_link_finished (void *cls, } break; case MHD_HTTP_BAD_REQUEST: - /* This should never happen, either us or the mint is buggy + /* This should never happen, either us or the exchange is buggy (or API version conflict); just pass JSON reply to the application */ break; case MHD_HTTP_NOT_FOUND: - /* Nothing really to verify, mint says this coin was not melted; we + /* Nothing really to verify, exchange says this coin was not melted; we should pass the JSON reply to the application */ break; case MHD_HTTP_INTERNAL_SERVER_ERROR: @@ -381,39 +381,39 @@ handle_refresh_link_finished (void *cls, 0, NULL, NULL, NULL, json); json_decref (json); - TALER_MINT_refresh_link_cancel (rlh); + TALER_EXCHANGE_refresh_link_cancel (rlh); } /** - * Submit a link request to the mint and get the mint's response. + * Submit a link request to the exchange and get the exchange's response. * * This API is typically not used by anyone, it is more a threat * against those trying to receive a funds transfer by abusing the * /refresh protocol. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param coin_priv private key to request link data for * @param link_cb the callback to call with the useful result of the * refresh operation the @a coin_priv was involved in (if any) * @param link_cb_cls closure for @a link_cb * @return a handle for this request */ -struct TALER_MINT_RefreshLinkHandle * -TALER_MINT_refresh_link (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_RefreshLinkHandle * +TALER_EXCHANGE_refresh_link (struct TALER_EXCHANGE_Handle *exchange, const struct TALER_CoinSpendPrivateKeyP *coin_priv, - TALER_MINT_RefreshLinkCallback link_cb, + TALER_EXCHANGE_RefreshLinkCallback link_cb, void *link_cb_cls) { - struct TALER_MINT_RefreshLinkHandle *rlh; + struct TALER_EXCHANGE_RefreshLinkHandle *rlh; CURL *eh; - struct TALER_MINT_Context *ctx; + struct TALER_EXCHANGE_Context *ctx; struct TALER_CoinSpendPublicKeyP coin_pub; char *pub_str; char *arg_str; if (GNUNET_YES != - MAH_handle_is_ready (mint)) + MAH_handle_is_ready (exchange)) { GNUNET_break (0); return NULL; @@ -428,12 +428,12 @@ TALER_MINT_refresh_link (struct TALER_MINT_Handle *mint, pub_str); GNUNET_free (pub_str); - rlh = GNUNET_new (struct TALER_MINT_RefreshLinkHandle); - rlh->mint = mint; + rlh = GNUNET_new (struct TALER_EXCHANGE_RefreshLinkHandle); + rlh->exchange = exchange; rlh->link_cb = link_cb; rlh->link_cb_cls = link_cb_cls; rlh->coin_priv = *coin_priv; - rlh->url = MAH_path_to_url (mint, arg_str); + rlh->url = MAH_path_to_url (exchange, arg_str); GNUNET_free (arg_str); eh = curl_easy_init (); @@ -449,7 +449,7 @@ TALER_MINT_refresh_link (struct TALER_MINT_Handle *mint, curl_easy_setopt (eh, CURLOPT_WRITEDATA, &rlh->db)); - ctx = MAH_handle_to_context (mint); + ctx = MAH_handle_to_context (exchange); rlh->job = MAC_job_add (ctx, eh, GNUNET_YES, @@ -466,7 +466,7 @@ TALER_MINT_refresh_link (struct TALER_MINT_Handle *mint, * @param rlh the refresh link handle */ void -TALER_MINT_refresh_link_cancel (struct TALER_MINT_RefreshLinkHandle *rlh) +TALER_EXCHANGE_refresh_link_cancel (struct TALER_EXCHANGE_RefreshLinkHandle *rlh) { if (NULL != rlh->job) { @@ -479,4 +479,4 @@ TALER_MINT_refresh_link_cancel (struct TALER_MINT_RefreshLinkHandle *rlh) } -/* end of mint_api_refresh_link.c */ +/* end of exchange_api_refresh_link.c */ diff --git a/src/mint-lib/mint_api_reserve.c b/src/exchange-lib/exchange_api_reserve.c similarity index 85% rename from src/mint-lib/mint_api_reserve.c rename to src/exchange-lib/exchange_api_reserve.c index 1f8140cff..e694b8d95 100644 --- a/src/mint-lib/mint_api_reserve.c +++ b/src/exchange-lib/exchange_api_reserve.c @@ -15,8 +15,8 @@ */ /** - * @file mint-lib/mint_api_reserve.c - * @brief Implementation of the /reserve requests of the mint's HTTP API + * @file exchange-lib/exchange_api_reserve.c + * @brief Implementation of the /reserve requests of the exchange's HTTP API * @author Christian Grothoff */ #include "platform.h" @@ -24,10 +24,10 @@ #include #include /* just for HTTP status codes */ #include -#include "taler_mint_service.h" -#include "mint_api_json.h" -#include "mint_api_context.h" -#include "mint_api_handle.h" +#include "taler_exchange_service.h" +#include "exchange_api_json.h" +#include "exchange_api_context.h" +#include "exchange_api_handle.h" #include "taler_signatures.h" @@ -36,13 +36,13 @@ /** * @brief A Withdraw Status Handle */ -struct TALER_MINT_ReserveStatusHandle +struct TALER_EXCHANGE_ReserveStatusHandle { /** - * The connection to mint this request handle will use + * The connection to exchange this request handle will use */ - struct TALER_MINT_Handle *mint; + struct TALER_EXCHANGE_Handle *exchange; /** * The url for this request. @@ -57,7 +57,7 @@ struct TALER_MINT_ReserveStatusHandle /** * Function to call with the result. */ - TALER_MINT_ReserveStatusResultCallback cb; + TALER_EXCHANGE_ReserveStatusResultCallback cb; /** * Public key of the reserve we are querying. @@ -98,7 +98,7 @@ parse_reserve_history (json_t *history, const char *currency, struct TALER_Amount *balance, unsigned int history_length, - struct TALER_MINT_ReserveHistory *rhistory) + struct TALER_EXCHANGE_ReserveHistory *rhistory) { struct GNUNET_HashCode uuid[history_length]; unsigned int uuid_off; @@ -140,13 +140,13 @@ parse_reserve_history (json_t *history, { json_t *wire; - rhistory[off].type = TALER_MINT_RTT_DEPOSIT; + rhistory[off].type = TALER_EXCHANGE_RTT_DEPOSIT; if (GNUNET_OK != TALER_amount_add (&total_in, &total_in, &amount)) { - /* overflow in history already!? inconceivable! Bad mint! */ + /* overflow in history already!? inconceivable! Bad exchange! */ GNUNET_break_op (0); return GNUNET_SYSERR; } @@ -179,7 +179,7 @@ parse_reserve_history (json_t *history, }; unsigned int i; - rhistory[off].type = TALER_MINT_RTT_WITHDRAWAL; + rhistory[off].type = TALER_EXCHANGE_RTT_WITHDRAWAL; if (GNUNET_OK != MAJ_parse_json (transaction, withdraw_spec)) @@ -210,7 +210,7 @@ parse_reserve_history (json_t *history, rhistory[off].details.out_authorization_sig = json_object_get (transaction, "signature"); /* Check check that the same withdraw transaction - isn't listed twice by the mint. We use the + isn't listed twice by the exchange. We use the "uuid" array to remember the hashes of all purposes, and compare the hashes to find duplicates. */ @@ -235,7 +235,7 @@ parse_reserve_history (json_t *history, &total_out, &amount)) { - /* overflow in history already!? inconceivable! Bad mint! */ + /* overflow in history already!? inconceivable! Bad exchange! */ GNUNET_break_op (0); MAJ_parse_free (withdraw_spec); return GNUNET_SYSERR; @@ -256,7 +256,7 @@ parse_reserve_history (json_t *history, &total_in, &total_out)) { - /* total_in < total_out, why did the mint ever allow this!? */ + /* total_in < total_out, why did the exchange ever allow this!? */ GNUNET_break_op (0); return GNUNET_SYSERR; } @@ -269,14 +269,14 @@ parse_reserve_history (json_t *history, * Function called when we're done processing the * HTTP /reserve/status request. * - * @param cls the `struct TALER_MINT_ReserveStatusHandle` + * @param cls the `struct TALER_EXCHANGE_ReserveStatusHandle` * @param eh curl handle of the request that finished */ static void handle_reserve_status_finished (void *cls, CURL *eh) { - struct TALER_MINT_ReserveStatusHandle *wsh = cls; + struct TALER_EXCHANGE_ReserveStatusHandle *wsh = cls; long response_code; json_t *json; @@ -318,7 +318,7 @@ handle_reserve_status_finished (void *cls, } len = json_array_size (history); { - struct TALER_MINT_ReserveHistory rhistory[len]; + struct TALER_EXCHANGE_ReserveHistory rhistory[len]; if (GNUNET_OK != parse_reserve_history (history, @@ -336,7 +336,7 @@ handle_reserve_status_finished (void *cls, TALER_amount_cmp (&balance_from_history, &balance)) { - /* mint cannot add up balances!? */ + /* exchange cannot add up balances!? */ GNUNET_break_op (0); response_code = 0; break; @@ -352,7 +352,7 @@ handle_reserve_status_finished (void *cls, } break; case MHD_HTTP_BAD_REQUEST: - /* This should never happen, either us or the mint is buggy + /* This should never happen, either us or the exchange is buggy (or API version conflict); just pass JSON reply to the application */ break; case MHD_HTTP_NOT_FOUND: @@ -379,40 +379,40 @@ handle_reserve_status_finished (void *cls, NULL, 0, NULL); json_decref (json); - TALER_MINT_reserve_status_cancel (wsh); + TALER_EXCHANGE_reserve_status_cancel (wsh); } /** * Submit a request to obtain the transaction history of a reserve - * from the mint. Note that while we return the full response to the + * from the exchange. Note that while we return the full response to the * caller for further processing, we do already verify that the * response is well-formed (i.e. that signatures included in the - * response are all valid and add up to the balance). If the mint's + * response are all valid and add up to the balance). If the exchange's * reply is not well-formed, we return an HTTP status code of zero to * @a cb. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param reserve_pub public key of the reserve to inspect * @param cb the callback to call when a reply for this request is available * @param cb_cls closure for the above callback * @return a handle for this request; NULL if the inputs are invalid (i.e. * signatures fail to verify). In this case, the callback is not called. */ -struct TALER_MINT_ReserveStatusHandle * -TALER_MINT_reserve_status (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_ReserveStatusHandle * +TALER_EXCHANGE_reserve_status (struct TALER_EXCHANGE_Handle *exchange, const struct TALER_ReservePublicKeyP *reserve_pub, - TALER_MINT_ReserveStatusResultCallback cb, + TALER_EXCHANGE_ReserveStatusResultCallback cb, void *cb_cls) { - struct TALER_MINT_ReserveStatusHandle *wsh; - struct TALER_MINT_Context *ctx; + struct TALER_EXCHANGE_ReserveStatusHandle *wsh; + struct TALER_EXCHANGE_Context *ctx; CURL *eh; char *pub_str; char *arg_str; if (GNUNET_YES != - MAH_handle_is_ready (mint)) + MAH_handle_is_ready (exchange)) { GNUNET_break (0); return NULL; @@ -423,12 +423,12 @@ TALER_MINT_reserve_status (struct TALER_MINT_Handle *mint, "/reserve/status?reserve_pub=%s", pub_str); GNUNET_free (pub_str); - wsh = GNUNET_new (struct TALER_MINT_ReserveStatusHandle); - wsh->mint = mint; + wsh = GNUNET_new (struct TALER_EXCHANGE_ReserveStatusHandle); + wsh->exchange = exchange; wsh->cb = cb; wsh->cb_cls = cb_cls; wsh->reserve_pub = *reserve_pub; - wsh->url = MAH_path_to_url (mint, + wsh->url = MAH_path_to_url (exchange, arg_str); GNUNET_free (arg_str); @@ -445,7 +445,7 @@ TALER_MINT_reserve_status (struct TALER_MINT_Handle *mint, curl_easy_setopt (eh, CURLOPT_WRITEDATA, &wsh->db)); - ctx = MAH_handle_to_context (mint); + ctx = MAH_handle_to_context (exchange); wsh->job = MAC_job_add (ctx, eh, GNUNET_NO, @@ -462,7 +462,7 @@ TALER_MINT_reserve_status (struct TALER_MINT_Handle *mint, * @param wsh the withdraw status request handle */ void -TALER_MINT_reserve_status_cancel (struct TALER_MINT_ReserveStatusHandle *wsh) +TALER_EXCHANGE_reserve_status_cancel (struct TALER_EXCHANGE_ReserveStatusHandle *wsh) { if (NULL != wsh->job) { @@ -480,13 +480,13 @@ TALER_MINT_reserve_status_cancel (struct TALER_MINT_ReserveStatusHandle *wsh) /** * @brief A Withdraw Sign Handle */ -struct TALER_MINT_ReserveWithdrawHandle +struct TALER_EXCHANGE_ReserveWithdrawHandle { /** - * The connection to mint this request handle will use + * The connection to exchange this request handle will use */ - struct TALER_MINT_Handle *mint; + struct TALER_EXCHANGE_Handle *exchange; /** * The url for this request. @@ -506,7 +506,7 @@ struct TALER_MINT_ReserveWithdrawHandle /** * Function to call with the result. */ - TALER_MINT_ReserveWithdrawResultCallback cb; + TALER_EXCHANGE_ReserveWithdrawResultCallback cb; /** * Key used to blind the value. @@ -516,7 +516,7 @@ struct TALER_MINT_ReserveWithdrawHandle /** * Denomination key we are withdrawing. */ - const struct TALER_MINT_DenomPublicKey *pk; + const struct TALER_EXCHANGE_DenomPublicKey *pk; /** * Closure for @a cb. @@ -544,7 +544,7 @@ struct TALER_MINT_ReserveWithdrawHandle /** * We got a 200 OK response for the /reserve/withdraw operation. * Extract the coin's signature and return it to the caller. - * The signature we get from the mint is for the blinded value. + * The signature we get from the exchange is for the blinded value. * Thus, we first must unblind it and then should verify its * validity against our coin's hash. * @@ -552,11 +552,11 @@ struct TALER_MINT_ReserveWithdrawHandle * to the application via the callback. * * @param wsh operation handle - * @param json reply from the mint + * @param json reply from the exchange * @return #GNUNET_OK on success, #GNUNET_SYSERR on errors */ static int -reserve_withdraw_ok (struct TALER_MINT_ReserveWithdrawHandle *wsh, +reserve_withdraw_ok (struct TALER_EXCHANGE_ReserveWithdrawHandle *wsh, json_t *json) { struct GNUNET_CRYPTO_rsa_Signature *blind_sig; @@ -605,15 +605,15 @@ reserve_withdraw_ok (struct TALER_MINT_ReserveWithdrawHandle *wsh, * Check the signatures on the withdraw transactions in the provided * history and that the balances add up. We don't do anything directly * with the information, as the JSON will be returned to the application. - * However, our job is ensuring that the mint followed the protocol, and + * However, our job is ensuring that the exchange followed the protocol, and * this in particular means checking all of the signatures in the history. * * @param wsh operation handle - * @param json reply from the mint + * @param json reply from the exchange * @return #GNUNET_OK on success, #GNUNET_SYSERR on errors */ static int -reserve_withdraw_payment_required (struct TALER_MINT_ReserveWithdrawHandle *wsh, +reserve_withdraw_payment_required (struct TALER_EXCHANGE_ReserveWithdrawHandle *wsh, json_t *json) { struct TALER_Amount balance; @@ -645,7 +645,7 @@ reserve_withdraw_payment_required (struct TALER_MINT_ReserveWithdrawHandle *wsh, total incoming and outgoing amounts */ len = json_array_size (history); { - struct TALER_MINT_ReserveHistory rhistory[len]; + struct TALER_EXCHANGE_ReserveHistory rhistory[len]; if (GNUNET_OK != parse_reserve_history (history, @@ -664,7 +664,7 @@ reserve_withdraw_payment_required (struct TALER_MINT_ReserveWithdrawHandle *wsh, TALER_amount_cmp (&balance_from_history, &balance)) { - /* mint cannot add up balances!? */ + /* exchange cannot add up balances!? */ GNUNET_break_op (0); return GNUNET_SYSERR; } @@ -695,14 +695,14 @@ reserve_withdraw_payment_required (struct TALER_MINT_ReserveWithdrawHandle *wsh, * Function called when we're done processing the * HTTP /reserve/withdraw request. * - * @param cls the `struct TALER_MINT_ReserveWithdrawHandle` + * @param cls the `struct TALER_EXCHANGE_ReserveWithdrawHandle` * @param eh curl handle of the request that finished */ static void handle_reserve_withdraw_finished (void *cls, CURL *eh) { - struct TALER_MINT_ReserveWithdrawHandle *wsh = cls; + struct TALER_EXCHANGE_ReserveWithdrawHandle *wsh = cls; long response_code; json_t *json; @@ -724,11 +724,11 @@ handle_reserve_withdraw_finished (void *cls, } break; case MHD_HTTP_BAD_REQUEST: - /* This should never happen, either us or the mint is buggy + /* This should never happen, either us or the exchange is buggy (or API version conflict); just pass JSON reply to the application */ break; case MHD_HTTP_PAYMENT_REQUIRED: - /* The mint says that the reserve has insufficient funds; + /* The exchange says that the reserve has insufficient funds; check the signatures in the history... */ if (GNUNET_OK != reserve_withdraw_payment_required (wsh, @@ -740,12 +740,12 @@ handle_reserve_withdraw_finished (void *cls, break; case MHD_HTTP_UNAUTHORIZED: GNUNET_break (0); - /* Nothing really to verify, mint says one of the signatures is + /* Nothing really to verify, exchange says one of the signatures is invalid; as we checked them, this should never happen, we should pass the JSON reply to the application */ break; case MHD_HTTP_NOT_FOUND: - /* Nothing really to verify, the mint basically just says + /* Nothing really to verify, the exchange basically just says that it doesn't know this reserve. Can happen if we query before the wire transfer went through. We should simply pass the JSON reply to the application. */ @@ -769,18 +769,18 @@ handle_reserve_withdraw_finished (void *cls, NULL, json); json_decref (json); - TALER_MINT_reserve_withdraw_cancel (wsh); + TALER_EXCHANGE_reserve_withdraw_cancel (wsh); } /** - * Withdraw a coin from the mint using a /reserve/withdraw request. Note + * Withdraw a coin from the exchange using a /reserve/withdraw request. Note * that to ensure that no money is lost in case of hardware failures, * the caller must have committed (most of) the arguments to disk * before calling, and be ready to repeat the request with the same * arguments in case of failures. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param pk kind of coin to create * @param reserve_priv private key of the reserve to withdraw from * @param coin_priv where to store the coin's private key, @@ -790,31 +790,31 @@ handle_reserve_withdraw_finished (void *cls, * @param res_cb the callback to call when the final result for this request is available * @param res_cb_cls closure for the above callback * @return #GNUNET_OK on success, #GNUNET_SYSERR - * if the inputs are invalid (i.e. denomination key not with this mint). + * if the inputs are invalid (i.e. denomination key not with this exchange). * In this case, the callback is not called. */ -struct TALER_MINT_ReserveWithdrawHandle * -TALER_MINT_reserve_withdraw (struct TALER_MINT_Handle *mint, - const struct TALER_MINT_DenomPublicKey *pk, +struct TALER_EXCHANGE_ReserveWithdrawHandle * +TALER_EXCHANGE_reserve_withdraw (struct TALER_EXCHANGE_Handle *exchange, + const struct TALER_EXCHANGE_DenomPublicKey *pk, const struct TALER_ReservePrivateKeyP *reserve_priv, const struct TALER_CoinSpendPrivateKeyP *coin_priv, const struct TALER_DenominationBlindingKey *blinding_key, - TALER_MINT_ReserveWithdrawResultCallback res_cb, + TALER_EXCHANGE_ReserveWithdrawResultCallback res_cb, void *res_cb_cls) { - struct TALER_MINT_ReserveWithdrawHandle *wsh; + struct TALER_EXCHANGE_ReserveWithdrawHandle *wsh; struct TALER_WithdrawRequestPS req; struct TALER_ReserveSignatureP reserve_sig; struct TALER_CoinSpendPublicKeyP coin_pub; - struct TALER_MINT_Context *ctx; + struct TALER_EXCHANGE_Context *ctx; struct TALER_Amount amount_with_fee; char *coin_ev; size_t coin_ev_size; json_t *withdraw_obj; CURL *eh; - wsh = GNUNET_new (struct TALER_MINT_ReserveWithdrawHandle); - wsh->mint = mint; + wsh = GNUNET_new (struct TALER_EXCHANGE_ReserveWithdrawHandle); + wsh->exchange = exchange; wsh->cb = res_cb; wsh->cb_cls = res_cb_cls; wsh->pk = pk; @@ -838,7 +838,7 @@ TALER_MINT_reserve_withdraw (struct TALER_MINT_Handle *mint, &pk->fee_withdraw, &pk->value)) { - /* mint gave us denomination keys that overflow like this!? */ + /* exchange gave us denomination keys that overflow like this!? */ GNUNET_break_op (0); GNUNET_free (coin_ev); GNUNET_free (wsh); @@ -869,7 +869,7 @@ TALER_MINT_reserve_withdraw (struct TALER_MINT_Handle *mint, GNUNET_free (coin_ev); wsh->blinding_key = blinding_key; - wsh->url = MAH_path_to_url (mint, "/reserve/withdraw"); + wsh->url = MAH_path_to_url (exchange, "/reserve/withdraw"); eh = curl_easy_init (); GNUNET_assert (NULL != (wsh->json_enc = @@ -896,7 +896,7 @@ TALER_MINT_reserve_withdraw (struct TALER_MINT_Handle *mint, curl_easy_setopt (eh, CURLOPT_WRITEDATA, &wsh->db)); - ctx = MAH_handle_to_context (mint); + ctx = MAH_handle_to_context (exchange); wsh->job = MAC_job_add (ctx, eh, GNUNET_YES, @@ -913,7 +913,7 @@ TALER_MINT_reserve_withdraw (struct TALER_MINT_Handle *mint, * @param sign the withdraw sign request handle */ void -TALER_MINT_reserve_withdraw_cancel (struct TALER_MINT_ReserveWithdrawHandle *sign) +TALER_EXCHANGE_reserve_withdraw_cancel (struct TALER_EXCHANGE_ReserveWithdrawHandle *sign) { if (NULL != sign->job) { @@ -927,4 +927,4 @@ TALER_MINT_reserve_withdraw_cancel (struct TALER_MINT_ReserveWithdrawHandle *sig } -/* end of mint_api_reserve.c */ +/* end of exchange_api_reserve.c */ diff --git a/src/mint-lib/mint_api_wire.c b/src/exchange-lib/exchange_api_wire.c similarity index 79% rename from src/mint-lib/mint_api_wire.c rename to src/exchange-lib/exchange_api_wire.c index 0947354ad..fd40230c7 100644 --- a/src/mint-lib/mint_api_wire.c +++ b/src/exchange-lib/exchange_api_wire.c @@ -15,8 +15,8 @@ */ /** - * @file mint-lib/mint_api_wire.c - * @brief Implementation of the /wire request of the mint's HTTP API + * @file exchange-lib/exchange_api_wire.c + * @brief Implementation of the /wire request of the exchange's HTTP API * @author Christian Grothoff */ #include "platform.h" @@ -24,24 +24,24 @@ #include #include /* just for HTTP status codes */ #include -#include "taler_mint_service.h" -#include "mint_api_common.h" -#include "mint_api_json.h" -#include "mint_api_context.h" -#include "mint_api_handle.h" +#include "taler_exchange_service.h" +#include "exchange_api_common.h" +#include "exchange_api_json.h" +#include "exchange_api_context.h" +#include "exchange_api_handle.h" #include "taler_signatures.h" /** * @brief A Wire Handle */ -struct TALER_MINT_WireHandle +struct TALER_EXCHANGE_WireHandle { /** - * The connection to mint this request handle will use + * The connection to exchange this request handle will use */ - struct TALER_MINT_Handle *mint; + struct TALER_EXCHANGE_Handle *exchange; /** * The url for this request. @@ -56,7 +56,7 @@ struct TALER_MINT_WireHandle /** * Function to call with the result. */ - TALER_MINT_WireResultCallback cb; + TALER_EXCHANGE_WireResultCallback cb; /** * Closure for @a cb. @@ -84,7 +84,7 @@ struct TALER_MINT_WireHandle /** * Verify that the signature on the "200 OK" response - * for /wire/sepa from the mint is valid. + * for /wire/sepa from the exchange is valid. * * @param wh wire handle * @param json json reply with the signature @@ -93,18 +93,18 @@ struct TALER_MINT_WireHandle * #GNUNET_OK if the json is valid */ static int -verify_wire_sepa_signature_ok (const struct TALER_MINT_WireHandle *wh, +verify_wire_sepa_signature_ok (const struct TALER_EXCHANGE_WireHandle *wh, json_t *json) { - struct TALER_MasterSignatureP mint_sig; + struct TALER_MasterSignatureP exchange_sig; struct TALER_MasterWireSepaDetailsPS mp; const char *receiver_name; const char *iban; const char *bic; - const struct TALER_MINT_Keys *key_state; + const struct TALER_EXCHANGE_Keys *key_state; struct GNUNET_HashContext *hc; struct MAJ_Specification spec[] = { - MAJ_spec_fixed_auto ("sig", &mint_sig), + MAJ_spec_fixed_auto ("sig", &exchange_sig), MAJ_spec_string ("receiver_name", &receiver_name), MAJ_spec_string ("iban", &iban), MAJ_spec_string ("bic", &bic), @@ -119,7 +119,7 @@ verify_wire_sepa_signature_ok (const struct TALER_MINT_WireHandle *wh, return GNUNET_SYSERR; } - key_state = TALER_MINT_get_keys (wh->mint); + key_state = TALER_EXCHANGE_get_keys (wh->exchange); mp.purpose.purpose = htonl (TALER_SIGNATURE_MASTER_SEPA_DETAILS); mp.purpose.size = htonl (sizeof (struct TALER_MasterWireSepaDetailsPS)); hc = GNUNET_CRYPTO_hash_context_start (); @@ -138,7 +138,7 @@ verify_wire_sepa_signature_ok (const struct TALER_MINT_WireHandle *wh, if (GNUNET_OK != GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MASTER_SEPA_DETAILS, &mp.purpose, - &mint_sig.eddsa_signature, + &exchange_sig.eddsa_signature, &key_state->master_pub.eddsa_pub)) { GNUNET_break_op (0); @@ -152,7 +152,7 @@ verify_wire_sepa_signature_ok (const struct TALER_MINT_WireHandle *wh, /** * Verify that the signature on the "200 OK" response - * for /wire/METHOD from the mint is valid. + * for /wire/METHOD from the exchange is valid. * * @param wh wire handle with key material * @param method method to verify the reply for @@ -162,7 +162,7 @@ verify_wire_sepa_signature_ok (const struct TALER_MINT_WireHandle *wh, * #GNUNET_OK if the json is valid */ static int -verify_wire_method_signature_ok (const struct TALER_MINT_WireHandle *wh, +verify_wire_method_signature_ok (const struct TALER_EXCHANGE_WireHandle *wh, const char *method, json_t *json) { @@ -179,7 +179,7 @@ verify_wire_method_signature_ok (const struct TALER_MINT_WireHandle *wh, * @param wh wire handle with key material * @param json json reply with signature to verify */ - int (*handler)(const struct TALER_MINT_WireHandle *wh, + int (*handler)(const struct TALER_EXCHANGE_WireHandle *wh, json_t *json); } handlers[] = { { "sepa", &verify_wire_sepa_signature_ok }, @@ -207,21 +207,21 @@ verify_wire_method_signature_ok (const struct TALER_MINT_WireHandle *wh, * @return a handle for this request */ static void -request_wire_method (struct TALER_MINT_WireHandle *wh); +request_wire_method (struct TALER_EXCHANGE_WireHandle *wh); /** * Function called when we're done processing the * HTTP /wire/METHOD request. * - * @param cls the `struct TALER_MINT_WireHandle` + * @param cls the `struct TALER_EXCHANGE_WireHandle` * @param eh the curl request handle */ static void handle_wire_method_finished (void *cls, CURL *eh) { - struct TALER_MINT_WireHandle *wh = cls; + struct TALER_EXCHANGE_WireHandle *wh = cls; long response_code; json_t *json; @@ -255,7 +255,7 @@ handle_wire_method_finished (void *cls, this information back to the callback below */ break; case MHD_HTTP_BAD_REQUEST: - /* This should never happen, either us or the mint is buggy + /* This should never happen, either us or the exchange is buggy (or API version conflict); just pass JSON reply to the application */ break; case MHD_HTTP_NOT_FOUND: @@ -283,7 +283,7 @@ handle_wire_method_finished (void *cls, NULL, NULL); json_decref (json); - TALER_MINT_wire_cancel (wh); + TALER_EXCHANGE_wire_cancel (wh); return; } /* pass on successful reply */ @@ -305,9 +305,9 @@ handle_wire_method_finished (void *cls, * @return a handle for this request */ static void -request_wire_method (struct TALER_MINT_WireHandle *wh) +request_wire_method (struct TALER_EXCHANGE_WireHandle *wh) { - struct TALER_MINT_Context *ctx; + struct TALER_EXCHANGE_Context *ctx; CURL *eh; char *path; @@ -318,7 +318,7 @@ request_wire_method (struct TALER_MINT_WireHandle *wh) 0, NULL, NULL); - TALER_MINT_wire_cancel (wh); + TALER_EXCHANGE_wire_cancel (wh); return; } GNUNET_free_non_null (wh->db.buf); @@ -330,7 +330,7 @@ request_wire_method (struct TALER_MINT_WireHandle *wh) "/wire/%s", json_string_value (json_array_get (wh->methods, wh->methods_off++))); - wh->url = MAH_path_to_url (wh->mint, + wh->url = MAH_path_to_url (wh->exchange, path); GNUNET_free (path); @@ -352,19 +352,19 @@ request_wire_method (struct TALER_MINT_WireHandle *wh) curl_easy_setopt (eh, CURLOPT_FOLLOWLOCATION, (long) 0)); - ctx = MAH_handle_to_context (wh->mint); + ctx = MAH_handle_to_context (wh->exchange); wh->job = MAC_job_add (ctx, eh, GNUNET_YES, &handle_wire_method_finished, wh); - TALER_MINT_perform (ctx); + TALER_EXCHANGE_perform (ctx); } /** * Verify that the signature on the "200 OK" response - * for /wire from the mint is valid. + * for /wire from the exchange is valid. * * @param wh wire handle * @param json json reply with the signature @@ -372,18 +372,18 @@ request_wire_method (struct TALER_MINT_WireHandle *wh) * "methods" array (with an RC of 1) */ static json_t * -verify_wire_signature_ok (const struct TALER_MINT_WireHandle *wh, +verify_wire_signature_ok (const struct TALER_EXCHANGE_WireHandle *wh, json_t *json) { - struct TALER_MintSignatureP mint_sig; - struct TALER_MintPublicKeyP mint_pub; - struct TALER_MintWireSupportMethodsPS mp; + struct TALER_ExchangeSignatureP exchange_sig; + struct TALER_ExchangePublicKeyP exchange_pub; + struct TALER_ExchangeWireSupportMethodsPS mp; json_t *methods; - const struct TALER_MINT_Keys *key_state; + const struct TALER_EXCHANGE_Keys *key_state; struct GNUNET_HashContext *hc; struct MAJ_Specification spec[] = { - MAJ_spec_fixed_auto ("sig", &mint_sig), - MAJ_spec_fixed_auto ("pub", &mint_pub), + MAJ_spec_fixed_auto ("sig", &exchange_sig), + MAJ_spec_fixed_auto ("pub", &exchange_pub), MAJ_spec_json ("methods", &methods), MAJ_spec_end }; @@ -403,10 +403,10 @@ verify_wire_signature_ok (const struct TALER_MINT_WireHandle *wh, return NULL; } - key_state = TALER_MINT_get_keys (wh->mint); + key_state = TALER_EXCHANGE_get_keys (wh->exchange); if (GNUNET_OK != - TALER_MINT_test_signing_key (key_state, - &mint_pub)) + TALER_EXCHANGE_test_signing_key (key_state, + &exchange_pub)) { GNUNET_break_op (0); return NULL; @@ -429,16 +429,16 @@ verify_wire_signature_ok (const struct TALER_MINT_WireHandle *wh, method, strlen (method) + 1); } - mp.purpose.purpose = htonl (TALER_SIGNATURE_MINT_WIRE_TYPES); - mp.purpose.size = htonl (sizeof (struct TALER_MintWireSupportMethodsPS)); + mp.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_WIRE_TYPES); + mp.purpose.size = htonl (sizeof (struct TALER_ExchangeWireSupportMethodsPS)); GNUNET_CRYPTO_hash_context_finish (hc, &mp.h_wire_types); if (GNUNET_OK != - GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MINT_WIRE_TYPES, + GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_EXCHANGE_WIRE_TYPES, &mp.purpose, - &mint_sig.eddsa_signature, - &mint_pub.eddsa_pub)) + &exchange_sig.eddsa_signature, + &exchange_pub.eddsa_pub)) { GNUNET_break_op (0); MAJ_parse_free (spec); @@ -452,14 +452,14 @@ verify_wire_signature_ok (const struct TALER_MINT_WireHandle *wh, * Function called when we're done processing the * HTTP /wire request. * - * @param cls the `struct TALER_MINT_WireHandle` + * @param cls the `struct TALER_EXCHANGE_WireHandle` * @param eh the curl request handle */ static void handle_wire_finished (void *cls, CURL *eh) { - struct TALER_MINT_WireHandle *wh = cls; + struct TALER_EXCHANGE_WireHandle *wh = cls; long response_code; json_t *json; @@ -489,7 +489,7 @@ handle_wire_finished (void *cls, } break; case MHD_HTTP_BAD_REQUEST: - /* This should never happen, either us or the mint is buggy + /* This should never happen, either us or the exchange is buggy (or API version conflict); just pass JSON reply to the application */ break; case MHD_HTTP_NOT_FOUND: @@ -524,15 +524,15 @@ handle_wire_finished (void *cls, NULL); if (NULL != json) json_decref (json); - TALER_MINT_wire_cancel (wh); + TALER_EXCHANGE_wire_cancel (wh); } /** - * Obtain information about a mint's wire instructions. - * A mint may provide wire instructions for creating + * Obtain information about a exchange's wire instructions. + * A exchange may provide wire instructions for creating * a reserve. The wire instructions also indicate - * which wire formats merchants may use with the mint. + * which wire formats merchants may use with the exchange. * This API is typically used by a wallet for wiring * funds, and possibly by a merchant to determine * supported wire formats. @@ -540,34 +540,34 @@ handle_wire_finished (void *cls, * Note that while we return the (main) response verbatim to the * caller for further processing, we do already verify that the * response is well-formed (i.e. that signatures included in the - * response are all valid). If the mint's reply is not well-formed, + * response are all valid). If the exchange's reply is not well-formed, * we return an HTTP status code of zero to @a cb. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param wire_cb the callback to call when a reply for this request is available * @param wire_cb_cls closure for the above callback * @return a handle for this request */ -struct TALER_MINT_WireHandle * -TALER_MINT_wire (struct TALER_MINT_Handle *mint, - TALER_MINT_WireResultCallback wire_cb, +struct TALER_EXCHANGE_WireHandle * +TALER_EXCHANGE_wire (struct TALER_EXCHANGE_Handle *exchange, + TALER_EXCHANGE_WireResultCallback wire_cb, void *wire_cb_cls) { - struct TALER_MINT_WireHandle *wh; - struct TALER_MINT_Context *ctx; + struct TALER_EXCHANGE_WireHandle *wh; + struct TALER_EXCHANGE_Context *ctx; CURL *eh; if (GNUNET_YES != - MAH_handle_is_ready (mint)) + MAH_handle_is_ready (exchange)) { GNUNET_break (0); return NULL; } - wh = GNUNET_new (struct TALER_MINT_WireHandle); - wh->mint = mint; + wh = GNUNET_new (struct TALER_EXCHANGE_WireHandle); + wh->exchange = exchange; wh->cb = wire_cb; wh->cb_cls = wire_cb_cls; - wh->url = MAH_path_to_url (mint, "/wire"); + wh->url = MAH_path_to_url (exchange, "/wire"); eh = curl_easy_init (); GNUNET_assert (CURLE_OK == @@ -582,7 +582,7 @@ TALER_MINT_wire (struct TALER_MINT_Handle *mint, curl_easy_setopt (eh, CURLOPT_WRITEDATA, &wh->db)); - ctx = MAH_handle_to_context (mint); + ctx = MAH_handle_to_context (exchange); wh->job = MAC_job_add (ctx, eh, GNUNET_YES, @@ -599,7 +599,7 @@ TALER_MINT_wire (struct TALER_MINT_Handle *mint, * @param wh the wire information request handle */ void -TALER_MINT_wire_cancel (struct TALER_MINT_WireHandle *wh) +TALER_EXCHANGE_wire_cancel (struct TALER_EXCHANGE_WireHandle *wh) { if (NULL != wh->job) { @@ -617,4 +617,4 @@ TALER_MINT_wire_cancel (struct TALER_MINT_WireHandle *wh) } -/* end of mint_api_wire.c */ +/* end of exchange_api_wire.c */ diff --git a/src/mint-lib/mint_api_wire_deposits.c b/src/exchange-lib/exchange_api_wire_deposits.c similarity index 80% rename from src/mint-lib/mint_api_wire_deposits.c rename to src/exchange-lib/exchange_api_wire_deposits.c index f71c5b696..281ae2097 100644 --- a/src/mint-lib/mint_api_wire_deposits.c +++ b/src/exchange-lib/exchange_api_wire_deposits.c @@ -15,8 +15,8 @@ */ /** - * @file mint-lib/mint_api_wire_deposits.c - * @brief Implementation of the /wire/deposits request of the mint's HTTP API + * @file exchange-lib/exchange_api_wire_deposits.c + * @brief Implementation of the /wire/deposits request of the exchange's HTTP API * @author Christian Grothoff */ #include "platform.h" @@ -24,24 +24,24 @@ #include #include /* just for HTTP status codes */ #include -#include "taler_mint_service.h" -#include "mint_api_common.h" -#include "mint_api_json.h" -#include "mint_api_context.h" -#include "mint_api_handle.h" +#include "taler_exchange_service.h" +#include "exchange_api_common.h" +#include "exchange_api_json.h" +#include "exchange_api_context.h" +#include "exchange_api_handle.h" #include "taler_signatures.h" /** * @brief A /wire/deposits Handle */ -struct TALER_MINT_WireDepositsHandle +struct TALER_EXCHANGE_WireDepositsHandle { /** - * The connection to mint this request handle will use + * The connection to exchange this request handle will use */ - struct TALER_MINT_Handle *mint; + struct TALER_EXCHANGE_Handle *exchange; /** * The url for this request. @@ -56,7 +56,7 @@ struct TALER_MINT_WireDepositsHandle /** * Function to call with the result. */ - TALER_MINT_WireDepositsCallback cb; + TALER_EXCHANGE_WireDepositsCallback cb; /** * Closure for @a cb. @@ -75,14 +75,14 @@ struct TALER_MINT_WireDepositsHandle * Function called when we're done processing the * HTTP /wire/deposits request. * - * @param cls the `struct TALER_MINT_WireDepositsHandle` + * @param cls the `struct TALER_EXCHANGE_WireDepositsHandle` * @param eh the curl request handle */ static void handle_wire_deposits_finished (void *cls, CURL *eh) { - struct TALER_MINT_WireDepositsHandle *wdh = cls; + struct TALER_EXCHANGE_WireDepositsHandle *wdh = cls; long response_code; json_t *json; @@ -154,22 +154,22 @@ handle_wire_deposits_finished (void *cls, num_details, details); json_decref (json); - TALER_MINT_wire_deposits_cancel (wdh); + TALER_EXCHANGE_wire_deposits_cancel (wdh); return; } } break; case MHD_HTTP_BAD_REQUEST: - /* This should never happen, either us or the mint is buggy + /* This should never happen, either us or the exchange is buggy (or API version conflict); just pass JSON reply to the application */ break; case MHD_HTTP_UNAUTHORIZED: - /* Nothing really to verify, mint says one of the signatures is + /* Nothing really to verify, exchange says one of the signatures is invalid; as we checked them, this should never happen, we should pass the JSON reply to the application */ break; case MHD_HTTP_NOT_FOUND: - /* Mint does not know about transaction; + /* Exchange does not know about transaction; we should pass the reply to the application */ break; case MHD_HTTP_INTERNAL_SERVER_ERROR: @@ -190,41 +190,41 @@ handle_wire_deposits_finished (void *cls, json, NULL, NULL, 0, NULL); json_decref (json); - TALER_MINT_wire_deposits_cancel (wdh); + TALER_EXCHANGE_wire_deposits_cancel (wdh); } /** - * Query the mint about which transactions were combined + * Query the exchange about which transactions were combined * to create a wire transfer. * - * @param mint mint to query + * @param exchange exchange to query * @param wtid raw wire transfer identifier to get information about * @param cb callback to call * @param cb_cls closure for @a cb * @return handle to cancel operation */ -struct TALER_MINT_WireDepositsHandle * -TALER_MINT_wire_deposits (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_WireDepositsHandle * +TALER_EXCHANGE_wire_deposits (struct TALER_EXCHANGE_Handle *exchange, const struct TALER_WireTransferIdentifierRawP *wtid, - TALER_MINT_WireDepositsCallback cb, + TALER_EXCHANGE_WireDepositsCallback cb, void *cb_cls) { - struct TALER_MINT_WireDepositsHandle *wdh; - struct TALER_MINT_Context *ctx; + struct TALER_EXCHANGE_WireDepositsHandle *wdh; + struct TALER_EXCHANGE_Context *ctx; char *buf; char *path; CURL *eh; if (GNUNET_YES != - MAH_handle_is_ready (mint)) + MAH_handle_is_ready (exchange)) { GNUNET_break (0); return NULL; } - wdh = GNUNET_new (struct TALER_MINT_WireDepositsHandle); - wdh->mint = mint; + wdh = GNUNET_new (struct TALER_EXCHANGE_WireDepositsHandle); + wdh->exchange = exchange; wdh->cb = cb; wdh->cb_cls = cb_cls; @@ -233,7 +233,7 @@ TALER_MINT_wire_deposits (struct TALER_MINT_Handle *mint, GNUNET_asprintf (&path, "/wire/deposits?wtid=%s", buf); - wdh->url = MAH_path_to_url (wdh->mint, + wdh->url = MAH_path_to_url (wdh->exchange, path); GNUNET_free (buf); GNUNET_free (path); @@ -251,7 +251,7 @@ TALER_MINT_wire_deposits (struct TALER_MINT_Handle *mint, curl_easy_setopt (eh, CURLOPT_WRITEDATA, &wdh->db)); - ctx = MAH_handle_to_context (mint); + ctx = MAH_handle_to_context (exchange); wdh->job = MAC_job_add (ctx, eh, GNUNET_YES, @@ -268,7 +268,7 @@ TALER_MINT_wire_deposits (struct TALER_MINT_Handle *mint, * @param wdh the wire deposits request handle */ void -TALER_MINT_wire_deposits_cancel (struct TALER_MINT_WireDepositsHandle *wdh) +TALER_EXCHANGE_wire_deposits_cancel (struct TALER_EXCHANGE_WireDepositsHandle *wdh) { if (NULL != wdh->job) { @@ -281,4 +281,4 @@ TALER_MINT_wire_deposits_cancel (struct TALER_MINT_WireDepositsHandle *wdh) } -/* end of mint_api_wire_deposits.c */ +/* end of exchange_api_wire_deposits.c */ diff --git a/src/mint-lib/test-mint-home/config/mint-common.conf b/src/exchange-lib/test-exchange-home/config/mint-common.conf similarity index 56% rename from src/mint-lib/test-mint-home/config/mint-common.conf rename to src/exchange-lib/test-exchange-home/config/mint-common.conf index b2b948268..01dd6c896 100644 --- a/src/mint-lib/test-mint-home/config/mint-common.conf +++ b/src/exchange-lib/test-exchange-home/config/mint-common.conf @@ -1,16 +1,16 @@ -[mint] -# Currency supported by the mint (can only be one) +[exchange] +# Currency supported by the exchange (can only be one) CURRENCY = EUR -# Wire format supported by the mint +# Wire format supported by the exchange # We use 'test' for testing of the actual # coin operations, and 'sepa' to test SEPA-specific routines. WIREFORMAT = test sepa -# HTTP port the mint listens to +# HTTP port the exchange listens to PORT = 8081 -# Master public key used to sign the mint's various keys +# Master public key used to sign the exchange's various keys MASTER_PUBLIC_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG # How to access our database @@ -19,12 +19,12 @@ DB = postgres # Is this is a testcase, use transient DB actions? TESTRUN = YES -[mintdb-postgres] +[exchangedb-postgres] DB_CONN_STR = "postgres:///talercheck" -[mint-wire-sepa] -SEPA_RESPONSE_FILE = "test-mint-home/sepa.json" +[exchange-wire-sepa] +SEPA_RESPONSE_FILE = "test-exchange-home/sepa.json" -[mint-wire-test] +[exchange-wire-test] REDIRECT_URL = "http://www.taler.net/" diff --git a/src/mint-lib/test-mint-home/config/mint-keyup.conf b/src/exchange-lib/test-exchange-home/config/mint-keyup.conf similarity index 99% rename from src/mint-lib/test-mint-home/config/mint-keyup.conf rename to src/exchange-lib/test-exchange-home/config/mint-keyup.conf index 8ad1f3bb2..4a80da7e9 100644 --- a/src/mint-lib/test-mint-home/config/mint-keyup.conf +++ b/src/exchange-lib/test-exchange-home/config/mint-keyup.conf @@ -1,4 +1,4 @@ -[mint_keys] +[exchange_keys] # how long is one signkey valid? signkey_duration = 4 weeks diff --git a/src/mint-lib/test-mint-home/master.priv b/src/exchange-lib/test-exchange-home/master.priv similarity index 100% rename from src/mint-lib/test-mint-home/master.priv rename to src/exchange-lib/test-exchange-home/master.priv diff --git a/src/mint-lib/test-mint-home/sepa.json b/src/exchange-lib/test-exchange-home/sepa.json similarity index 100% rename from src/mint-lib/test-mint-home/sepa.json rename to src/exchange-lib/test-exchange-home/sepa.json diff --git a/src/mint-lib/test_mint_api.c b/src/exchange-lib/test_exchange_api.c similarity index 91% rename from src/mint-lib/test_mint_api.c rename to src/exchange-lib/test_exchange_api.c index b243cc2cf..a6da380df 100644 --- a/src/mint-lib/test_mint_api.c +++ b/src/exchange-lib/test_exchange_api.c @@ -14,15 +14,15 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file mint/test_mint_api.c - * @brief testcase to test mint's HTTP API interface + * @file exchange/test_exchange_api.c + * @brief testcase to test exchange's HTTP API interface * @author Sree Harsha Totakura * @author Christian Grothoff */ #include "platform.h" #include "taler_util.h" #include "taler_signatures.h" -#include "taler_mint_service.h" +#include "taler_exchange_service.h" #include #include @@ -39,12 +39,12 @@ /** * Main execution context for the main loop. */ -static struct TALER_MINT_Context *ctx; +static struct TALER_EXCHANGE_Context *ctx; /** - * Handle to access the mint. + * Handle to access the exchange. */ -static struct TALER_MINT_Handle *mint; +static struct TALER_EXCHANGE_Handle *exchange; /** * Task run on shutdown. @@ -103,23 +103,23 @@ enum OpCode OC_REFRESH_REVEAL, /** - * Verify mint's /refresh/link by linking original private key to + * Verify exchange's /refresh/link by linking original private key to * results from #OC_REFRESH_REVEAL step. */ OC_REFRESH_LINK, /** - * Verify the mint's /wire-method. + * Verify the exchange's /wire-method. */ OC_WIRE, /** - * Verify mint's /wire/deposits method. + * Verify exchange's /wire/deposits method. */ OC_WIRE_DEPOSITS, /** - * Verify mint's /deposit/wtid method. + * Verify exchange's /deposit/wtid method. */ OC_DEPOSIT_WTID @@ -159,10 +159,10 @@ struct FreshCoin * use. Otherwise, this will be set (by the interpreter) to the * denomination PK matching @e amount. */ - const struct TALER_MINT_DenomPublicKey *pk; + const struct TALER_EXCHANGE_DenomPublicKey *pk; /** - * Set (by the interpreter) to the mint's signature over the + * Set (by the interpreter) to the exchange's signature over the * coin's public key. */ struct TALER_DenominationSignature sig; @@ -176,7 +176,7 @@ struct FreshCoin /** - * Details for a mint operation to execute. + * Details for a exchange operation to execute. */ struct Command { @@ -233,7 +233,7 @@ struct Command /** * Set to the API's handle during the operation. */ - struct TALER_MINT_AdminAddIncomingHandle *aih; + struct TALER_EXCHANGE_AdminAddIncomingHandle *aih; } admin_add_incoming; @@ -252,7 +252,7 @@ struct Command /** * Set to the API's handle during the operation. */ - struct TALER_MINT_ReserveStatusHandle *wsh; + struct TALER_EXCHANGE_ReserveStatusHandle *wsh; /** * Expected reserve balance. @@ -274,7 +274,7 @@ struct Command /** * String describing the denomination value we should withdraw. - * A corresponding denomination key must exist in the mint's + * A corresponding denomination key must exist in the exchange's * offerings. Can be NULL if @e pk is set instead. */ const char *amount; @@ -284,10 +284,10 @@ struct Command * use. Otherwise, this will be set (by the interpreter) to the * denomination PK matching @e amount. */ - const struct TALER_MINT_DenomPublicKey *pk; + const struct TALER_EXCHANGE_DenomPublicKey *pk; /** - * Set (by the interpreter) to the mint's signature over the + * Set (by the interpreter) to the exchange's signature over the * coin's public key. */ struct TALER_DenominationSignature sig; @@ -305,7 +305,7 @@ struct Command /** * Withdraw handle (while operation is running). */ - struct TALER_MINT_ReserveWithdrawHandle *wsh; + struct TALER_EXCHANGE_ReserveWithdrawHandle *wsh; } reserve_withdraw; @@ -362,7 +362,7 @@ struct Command /** * Deposit handle while operation is running. */ - struct TALER_MINT_DepositHandle *dh; + struct TALER_EXCHANGE_DepositHandle *dh; } deposit; @@ -386,12 +386,12 @@ struct Command * Array of the public keys corresponding to * the @e fresh_amounts, set by the interpreter. */ - const struct TALER_MINT_DenomPublicKey **fresh_pks; + const struct TALER_EXCHANGE_DenomPublicKey **fresh_pks; /** * Melt handle while operation is running. */ - struct TALER_MINT_RefreshMeltHandle *rmh; + struct TALER_EXCHANGE_RefreshMeltHandle *rmh; /** * Data used in the refresh operation, set by the interpreter. @@ -405,7 +405,7 @@ struct Command /** * Set by the interpreter (upon completion) to the noreveal - * index selected by the mint. + * index selected by the exchange. */ uint16_t noreveal_index; @@ -425,7 +425,7 @@ struct Command /** * Reveal handle while operation is running. */ - struct TALER_MINT_RefreshRevealHandle *rrh; + struct TALER_EXCHANGE_RefreshRevealHandle *rrh; /** * Number of fresh coins withdrawn, set by the interpreter. @@ -454,7 +454,7 @@ struct Command /** * Link handle while operation is running. */ - struct TALER_MINT_RefreshLinkHandle *rlh; + struct TALER_EXCHANGE_RefreshLinkHandle *rlh; /** * Which of the melted coins should be used for the linkage? @@ -471,7 +471,7 @@ struct Command /** * Handle to the wire request. */ - struct TALER_MINT_WireHandle *wh; + struct TALER_EXCHANGE_WireHandle *wh; /** * Format we expect to see, others will be *ignored*. @@ -488,7 +488,7 @@ struct Command /** * Handle to the wire deposits request. */ - struct TALER_MINT_WireDepositsHandle *wdh; + struct TALER_EXCHANGE_WireDepositsHandle *wdh; /** * Reference to a /deposit/wtid command. If set, we use the @@ -514,7 +514,7 @@ struct Command /** * Handle to the deposit wtid request. */ - struct TALER_MINT_DepositWtidHandle *dwh; + struct TALER_EXCHANGE_DepositWtidHandle *dwh; /** * Which /deposit operation should we obtain WTID data for? @@ -545,9 +545,9 @@ struct Command struct InterpreterState { /** - * Keys from the mint. + * Keys from the exchange. */ - const struct TALER_MINT_Keys *keys; + const struct TALER_EXCHANGE_Keys *keys; /** * Commands the interpreter will run. @@ -637,7 +637,7 @@ find_command (const struct InterpreterState *is, /** - * Run the main interpreter loop that performs mint operations. + * Run the main interpreter loop that performs exchange operations. * * @param cls contains the `struct InterpreterState` * @param tc scheduler context @@ -652,8 +652,8 @@ interpreter_run (void *cls, * * @param cls closure with the interpreter state * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request - * 0 if the mint's reply is bogus (fails to follow the protocol) - * @param full_response full response from the mint (for logging, in case of errors) + * 0 if the exchange's reply is bogus (fails to follow the protocol) + * @param full_response full response from the exchange (for logging, in case of errors) */ static void add_incoming_cb (void *cls, @@ -685,12 +685,12 @@ add_incoming_cb (void *cls, * @return #GNUNET_OK if they match, #GNUNET_SYSERR if not */ static int -compare_admin_add_incoming_history (const struct TALER_MINT_ReserveHistory *h, +compare_admin_add_incoming_history (const struct TALER_EXCHANGE_ReserveHistory *h, const struct Command *cmd) { struct TALER_Amount amount; - if (TALER_MINT_RTT_DEPOSIT != h->type) + if (TALER_EXCHANGE_RTT_DEPOSIT != h->type) { GNUNET_break_op (0); return GNUNET_SYSERR; @@ -717,13 +717,13 @@ compare_admin_add_incoming_history (const struct TALER_MINT_ReserveHistory *h, * @return #GNUNET_OK if they match, #GNUNET_SYSERR if not */ static int -compare_reserve_withdraw_history (const struct TALER_MINT_ReserveHistory *h, +compare_reserve_withdraw_history (const struct TALER_EXCHANGE_ReserveHistory *h, const struct Command *cmd) { struct TALER_Amount amount; struct TALER_Amount amount_with_fee; - if (TALER_MINT_RTT_WITHDRAWAL != h->type) + if (TALER_EXCHANGE_RTT_WITHDRAWAL != h->type) { GNUNET_break_op (0); return GNUNET_SYSERR; @@ -750,7 +750,7 @@ compare_reserve_withdraw_history (const struct TALER_MINT_ReserveHistory *h, * * @param cls closure with the interpreter state * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request - * 0 if the mint's reply is bogus (fails to follow the protocol) + * 0 if the exchange's reply is bogus (fails to follow the protocol) * @param[in] json original response in JSON format (useful only for diagnostics) * @param balance current balance in the reserve, NULL on error * @param history_length number of entries in the transaction history, 0 on error @@ -762,7 +762,7 @@ reserve_status_cb (void *cls, json_t *json, const struct TALER_Amount *balance, unsigned int history_length, - const struct TALER_MINT_ReserveHistory *history) + const struct TALER_EXCHANGE_ReserveHistory *history) { struct InterpreterState *is = cls; struct Command *cmd = &is->commands[is->ip]; @@ -868,9 +868,9 @@ reserve_status_cb (void *cls, * * @param cls closure with the interpreter state * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request - * 0 if the mint's reply is bogus (fails to follow the protocol) + * 0 if the exchange's reply is bogus (fails to follow the protocol) * @param sig signature over the coin, NULL on error - * @param full_response full response from the mint (for logging, in case of errors) + * @param full_response full response from the exchange (for logging, in case of errors) */ static void reserve_withdraw_cb (void *cls, @@ -924,7 +924,7 @@ reserve_withdraw_cb (void *cls, * * @param cls closure with the interpreter state * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful deposit; - * 0 if the mint's reply is bogus (fails to follow the protocol) + * 0 if the exchange's reply is bogus (fails to follow the protocol) * @param obj the received JSON reply, should be kept as proof (and, in case of errors, * be forwarded to the customer) */ @@ -958,10 +958,10 @@ deposit_cb (void *cls, * * @param cls closure with the interpreter state * @param http_status HTTP response code, never #MHD_HTTP_OK (200) as for successful intermediate response this callback is skipped. - * 0 if the mint's reply is bogus (fails to follow the protocol) - * @param noreveal_index choice by the mint in the cut-and-choose protocol, + * 0 if the exchange's reply is bogus (fails to follow the protocol) + * @param noreveal_index choice by the exchange in the cut-and-choose protocol, * UINT16_MAX on error - * @param full_response full response from the mint (for logging, in case of errors) + * @param full_response full response from the exchange (for logging, in case of errors) */ static void melt_cb (void *cls, @@ -995,11 +995,11 @@ melt_cb (void *cls, * * @param cls closure with the interpreter state * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request - * 0 if the mint's reply is bogus (fails to follow the protocol) + * 0 if the exchange's reply is bogus (fails to follow the protocol) * @param num_coins number of fresh coins created, length of the @a sigs and @a coin_privs arrays, 0 if the operation failed * @param coin_privs array of @a num_coins private keys for the coins that were created, NULL on error * @param sigs array of signature over @a num_coins coins, NULL on error - * @param full_response full response from the mint (for logging, in case of errors) + * @param full_response full response from the exchange (for logging, in case of errors) */ static void reveal_cb (void *cls, @@ -1059,12 +1059,12 @@ reveal_cb (void *cls, * * @param cls closure with the interpreter state * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request - * 0 if the mint's reply is bogus (fails to follow the protocol) + * 0 if the exchange's reply is bogus (fails to follow the protocol) * @param num_coins number of fresh coins created, length of the @a sigs and @a coin_privs arrays, 0 if the operation failed * @param coin_privs array of @a num_coins private keys for the coins that were created, NULL on error * @param sigs array of signature over @a num_coins coins, NULL on error * @param pubs array of public keys for the @a sigs, NULL on error - * @param full_response full response from the mint (for logging, in case of errors) + * @param full_response full response from the exchange (for logging, in case of errors) */ static void link_cb (void *cls, @@ -1159,13 +1159,13 @@ link_cb (void *cls, * @param amount coin value to look for * @return NULL if no matching key was found */ -static const struct TALER_MINT_DenomPublicKey * -find_pk (const struct TALER_MINT_Keys *keys, +static const struct TALER_EXCHANGE_DenomPublicKey * +find_pk (const struct TALER_EXCHANGE_Keys *keys, const struct TALER_Amount *amount) { unsigned int i; struct GNUNET_TIME_Absolute now; - struct TALER_MINT_DenomPublicKey *pk; + struct TALER_EXCHANGE_DenomPublicKey *pk; char *str; now = GNUNET_TIME_absolute_get (); @@ -1208,26 +1208,26 @@ find_pk (const struct TALER_MINT_Keys *keys, /** * Callbacks called with the result(s) of a - * wire format inquiry request to the mint. + * wire format inquiry request to the exchange. * * The callback is invoked multiple times, once for each supported @a * method. Finally, it is invoked one more time with cls/0/NULL/NULL * to indicate the end of the iteration. If any request fails to - * generate a valid response from the mint, @a http_status will also + * generate a valid response from the exchange, @a http_status will also * be zero and the iteration will also end. Thus, the iteration * always ends with a final call with an @a http_status of 0. If the * @a http_status is already 0 on the first call, then the response to * the /wire request was invalid. Later, clients can tell the * difference between @a http_status of 0 indicating a failed * /wire/method request and a regular end of the iteration by @a - * method being non-NULL. If the mint simply correctly asserts that + * method being non-NULL. If the exchange simply correctly asserts that * it does not support any methods, @a method will be NULL but the @a * http_status will be #MHD_HTTP_OK for the first call (followed by a * cls/0/NULL/NULL call to signal the end of the iteration). * * @param cls closure with the interpreter state * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful request; - * 0 if the mint's reply is bogus (fails to follow the protocol) + * 0 if the exchange's reply is bogus (fails to follow the protocol) * @param method wire format method supported, i.e. "test" or "sepa", or NULL * if already the /wire request failed. * @param obj the received JSON reply, if successful this should be the wire @@ -1288,12 +1288,12 @@ wire_cb (void *cls, * of the coin transactions that were combined into the wire transfer. * * @param cls closure - * @param http_status HTTP status code we got, 0 on mint protocol violation + * @param http_status HTTP status code we got, 0 on exchange protocol violation * @param json original json reply (may include signatures, those have then been * validated already) - * @param wtid extracted wire transfer identifier, or NULL if the mint could + * @param wtid extracted wire transfer identifier, or NULL if the exchange could * not provide any (set only if @a http_status is #MHD_HTTP_OK) - * @param total_amount total amount of the wire transfer, or NULL if the mint could + * @param total_amount total amount of the wire transfer, or NULL if the exchange could * not provide any @a wtid (set only if @a http_status is #MHD_HTTP_OK) * @param details_length length of the @a details array * @param details array with details about the combined transactions @@ -1376,14 +1376,14 @@ wire_deposits_cb (void *cls, * Function called with detailed wire transfer data. * * @param cls closure - * @param http_status HTTP status code we got, 0 on mint protocol violation + * @param http_status HTTP status code we got, 0 on exchange protocol violation * @param json original json reply (may include signatures, those have then been * validated already) - * @param wtid wire transfer identifier used by the mint, NULL if mint did not + * @param wtid wire transfer identifier used by the exchange, NULL if exchange did not * yet execute the transaction * @param execution_time actual or planned execution time for the wire transfer * @param coin_contribution contribution to the @a total_amount of the deposited coin (may be NULL) - * @param total_amount total amount of the wire transfer, or NULL if the mint could + * @param total_amount total amount of the wire transfer, or NULL if the exchange could * not provide any @a wtid (set only if @a http_status is #MHD_HTTP_OK) */ static void @@ -1425,7 +1425,7 @@ deposit_wtid_cb (void *cls, /** - * Run the main interpreter loop that performs mint operations. + * Run the main interpreter loop that performs exchange operations. * * @param cls contains the `struct InterpreterState` * @param tc scheduler context @@ -1504,7 +1504,7 @@ interpreter_run (void *cls, execution_date = GNUNET_TIME_absolute_get (); TALER_round_abs_time (&execution_date); cmd->details.admin_add_incoming.aih - = TALER_MINT_admin_add_incoming (mint, + = TALER_EXCHANGE_admin_add_incoming (exchange, &reserve_pub, &amount, execution_date, @@ -1529,7 +1529,7 @@ interpreter_run (void *cls, GNUNET_CRYPTO_eddsa_key_get_public (&ref->details.admin_add_incoming.reserve_priv.eddsa_priv, &reserve_pub.eddsa_pub); cmd->details.reserve_status.wsh - = TALER_MINT_reserve_status (mint, + = TALER_EXCHANGE_reserve_status (exchange, &reserve_pub, &reserve_status_cb, is); @@ -1580,7 +1580,7 @@ interpreter_run (void *cls, cmd->details.reserve_withdraw.blinding_key.rsa_blinding_key = GNUNET_CRYPTO_rsa_blinding_key_create (GNUNET_CRYPTO_rsa_public_key_len (cmd->details.reserve_withdraw.pk->key.rsa_public_key)); cmd->details.reserve_withdraw.wsh - = TALER_MINT_reserve_withdraw (mint, + = TALER_EXCHANGE_reserve_withdraw (exchange, cmd->details.reserve_withdraw.pk, &ref->details.admin_add_incoming.reserve_priv, &cmd->details.reserve_withdraw.coin_priv, @@ -1599,7 +1599,7 @@ interpreter_run (void *cls, { struct GNUNET_HashCode h_contract; const struct TALER_CoinSpendPrivateKeyP *coin_priv; - const struct TALER_MINT_DenomPublicKey *coin_pk; + const struct TALER_EXCHANGE_DenomPublicKey *coin_pk; const struct TALER_DenominationSignature *coin_pk_sig; struct TALER_CoinSpendPublicKeyP coin_pub; struct TALER_CoinSpendSignatureP coin_sig; @@ -1723,7 +1723,7 @@ interpreter_run (void *cls, &coin_sig.eddsa_signature)); } cmd->details.deposit.dh - = TALER_MINT_deposit (mint, + = TALER_EXCHANGE_deposit (exchange, &amount, wire_deadline, wire, @@ -1764,13 +1764,13 @@ interpreter_run (void *cls, cmd->details.refresh_melt.fresh_pks = GNUNET_new_array (num_fresh_coins, - const struct TALER_MINT_DenomPublicKey *); + const struct TALER_EXCHANGE_DenomPublicKey *); { struct TALER_CoinSpendPrivateKeyP melt_privs[num_melted_coins]; struct TALER_Amount melt_amounts[num_melted_coins]; struct TALER_DenominationSignature melt_sigs[num_melted_coins]; - struct TALER_MINT_DenomPublicKey melt_pks[num_melted_coins]; - struct TALER_MINT_DenomPublicKey fresh_pks[num_fresh_coins]; + struct TALER_EXCHANGE_DenomPublicKey melt_pks[num_melted_coins]; + struct TALER_EXCHANGE_DenomPublicKey fresh_pks[num_fresh_coins]; unsigned int i; for (i=0;idetails.refresh_melt.fresh_pks[i]; } cmd->details.refresh_melt.refresh_data - = TALER_MINT_refresh_prepare (num_melted_coins, + = TALER_EXCHANGE_refresh_prepare (num_melted_coins, melt_privs, melt_amounts, melt_sigs, @@ -1831,7 +1831,7 @@ interpreter_run (void *cls, return; } cmd->details.refresh_melt.rmh - = TALER_MINT_refresh_melt (mint, + = TALER_EXCHANGE_refresh_melt (exchange, cmd->details.refresh_melt.refresh_data_length, cmd->details.refresh_melt.refresh_data, &melt_cb, @@ -1850,7 +1850,7 @@ interpreter_run (void *cls, ref = find_command (is, cmd->details.refresh_reveal.melt_ref); cmd->details.refresh_reveal.rrh - = TALER_MINT_refresh_reveal (mint, + = TALER_EXCHANGE_refresh_reveal (exchange, ref->details.refresh_melt.refresh_data_length, ref->details.refresh_melt.refresh_data, ref->details.refresh_melt.noreveal_index, @@ -1889,7 +1889,7 @@ interpreter_run (void *cls, GNUNET_assert (OC_WITHDRAW_SIGN == ref->oc); /* finally, use private key from withdraw sign command */ cmd->details.refresh_link.rlh - = TALER_MINT_refresh_link (mint, + = TALER_EXCHANGE_refresh_link (exchange, &ref->details.reserve_withdraw.coin_priv, &link_cb, is); @@ -1902,7 +1902,7 @@ interpreter_run (void *cls, trigger_context_task (); return; case OC_WIRE: - cmd->details.wire.wh = TALER_MINT_wire (mint, + cmd->details.wire.wh = TALER_EXCHANGE_wire (exchange, &wire_cb, is); trigger_context_task (); @@ -1916,7 +1916,7 @@ interpreter_run (void *cls, cmd->details.wire_deposits.wtid = ref->details.deposit_wtid.wtid; } cmd->details.wire_deposits.wdh - = TALER_MINT_wire_deposits (mint, + = TALER_EXCHANGE_wire_deposits (exchange, &cmd->details.wire_deposits.wtid, &wire_deposits_cb, is); @@ -1975,7 +1975,7 @@ interpreter_run (void *cls, &h_contract); json_decref (contract); cmd->details.deposit_wtid.dwh - = TALER_MINT_deposit_wtid (mint, + = TALER_EXCHANGE_deposit_wtid (exchange, &ref->details.deposit.merchant_priv, &h_wire, &h_contract, @@ -2028,7 +2028,7 @@ do_shutdown (void *cls, "Command %u (%s) did not complete\n", i, cmd->label); - TALER_MINT_admin_add_incoming_cancel (cmd->details.admin_add_incoming.aih); + TALER_EXCHANGE_admin_add_incoming_cancel (cmd->details.admin_add_incoming.aih); cmd->details.admin_add_incoming.aih = NULL; } break; @@ -2039,7 +2039,7 @@ do_shutdown (void *cls, "Command %u (%s) did not complete\n", i, cmd->label); - TALER_MINT_reserve_status_cancel (cmd->details.reserve_status.wsh); + TALER_EXCHANGE_reserve_status_cancel (cmd->details.reserve_status.wsh); cmd->details.reserve_status.wsh = NULL; } break; @@ -2050,7 +2050,7 @@ do_shutdown (void *cls, "Command %u (%s) did not complete\n", i, cmd->label); - TALER_MINT_reserve_withdraw_cancel (cmd->details.reserve_withdraw.wsh); + TALER_EXCHANGE_reserve_withdraw_cancel (cmd->details.reserve_withdraw.wsh); cmd->details.reserve_withdraw.wsh = NULL; } if (NULL != cmd->details.reserve_withdraw.sig.rsa_signature) @@ -2071,7 +2071,7 @@ do_shutdown (void *cls, "Command %u (%s) did not complete\n", i, cmd->label); - TALER_MINT_deposit_cancel (cmd->details.deposit.dh); + TALER_EXCHANGE_deposit_cancel (cmd->details.deposit.dh); cmd->details.deposit.dh = NULL; } break; @@ -2082,7 +2082,7 @@ do_shutdown (void *cls, "Command %u (%s) did not complete\n", i, cmd->label); - TALER_MINT_refresh_melt_cancel (cmd->details.refresh_melt.rmh); + TALER_EXCHANGE_refresh_melt_cancel (cmd->details.refresh_melt.rmh); cmd->details.refresh_melt.rmh = NULL; } GNUNET_free_non_null (cmd->details.refresh_melt.fresh_pks); @@ -2098,7 +2098,7 @@ do_shutdown (void *cls, "Command %u (%s) did not complete\n", i, cmd->label); - TALER_MINT_refresh_reveal_cancel (cmd->details.refresh_reveal.rrh); + TALER_EXCHANGE_refresh_reveal_cancel (cmd->details.refresh_reveal.rrh); cmd->details.refresh_reveal.rrh = NULL; } { @@ -2120,7 +2120,7 @@ do_shutdown (void *cls, "Command %u (%s) did not complete\n", i, cmd->label); - TALER_MINT_refresh_link_cancel (cmd->details.refresh_link.rlh); + TALER_EXCHANGE_refresh_link_cancel (cmd->details.refresh_link.rlh); cmd->details.refresh_link.rlh = NULL; } break; @@ -2131,7 +2131,7 @@ do_shutdown (void *cls, "Command %u (%s) did not complete\n", i, cmd->label); - TALER_MINT_wire_cancel (cmd->details.wire.wh); + TALER_EXCHANGE_wire_cancel (cmd->details.wire.wh); cmd->details.wire.wh = NULL; } break; @@ -2142,7 +2142,7 @@ do_shutdown (void *cls, "Command %u (%s) did not complete\n", i, cmd->label); - TALER_MINT_wire_deposits_cancel (cmd->details.wire_deposits.wdh); + TALER_EXCHANGE_wire_deposits_cancel (cmd->details.wire_deposits.wdh); cmd->details.wire_deposits.wdh = NULL; } break; @@ -2153,7 +2153,7 @@ do_shutdown (void *cls, "Command %u (%s) did not complete\n", i, cmd->label); - TALER_MINT_deposit_wtid_cancel (cmd->details.deposit_wtid.dwh); + TALER_EXCHANGE_deposit_wtid_cancel (cmd->details.deposit_wtid.dwh); cmd->details.deposit_wtid.dwh = NULL; } break; @@ -2177,14 +2177,14 @@ do_shutdown (void *cls, GNUNET_SCHEDULER_cancel (ctx_task); ctx_task = NULL; } - if (NULL != mint) + if (NULL != exchange) { - TALER_MINT_disconnect (mint); - mint = NULL; + TALER_EXCHANGE_disconnect (exchange); + exchange = NULL; } if (NULL != ctx) { - TALER_MINT_fini (ctx); + TALER_EXCHANGE_fini (ctx); ctx = NULL; } } @@ -2192,15 +2192,15 @@ do_shutdown (void *cls, /** * Functions of this type are called to provide the retrieved signing and - * denomination keys of the mint. No TALER_MINT_*() functions should be called + * denomination keys of the exchange. No TALER_EXCHANGE_*() functions should be called * in this callback. * * @param cls closure - * @param keys information about keys of the mint + * @param keys information about keys of the exchange */ static void cert_cb (void *cls, - const struct TALER_MINT_Keys *keys) + const struct TALER_EXCHANGE_Keys *keys) { struct InterpreterState *is = cls; @@ -2244,13 +2244,13 @@ context_task (void *cls, struct GNUNET_TIME_Relative delay; ctx_task = NULL; - TALER_MINT_perform (ctx); + TALER_EXCHANGE_perform (ctx); max_fd = -1; timeout = -1; FD_ZERO (&read_fd_set); FD_ZERO (&write_fd_set); FD_ZERO (&except_fd_set); - TALER_MINT_get_select_info (ctx, + TALER_EXCHANGE_get_select_info (ctx, &read_fd_set, &write_fd_set, &except_fd_set, @@ -2496,20 +2496,20 @@ run (void *cls, /* ************** Test tracking API ******************** */ /* Try resolving a deposit's WTID, as we never triggered execution of transactions, the answer should be that - the mint knows about the deposit, but has no WTID yet. */ + the exchange knows about the deposit, but has no WTID yet. */ { .oc = OC_DEPOSIT_WTID, .label = "deposit-wtid-found", .expected_response_code = MHD_HTTP_ACCEPTED, .details.deposit_wtid.deposit_ref = "deposit-simple" }, /* Try resolving a deposit's WTID for a failed deposit. As the deposit failed, the answer should be that - the mint does NOT know about the deposit. */ + the exchange does NOT know about the deposit. */ { .oc = OC_DEPOSIT_WTID, .label = "deposit-wtid-failing", .expected_response_code = MHD_HTTP_NOT_FOUND, .details.deposit_wtid.deposit_ref = "deposit-double-2" }, /* Try resolving an undefined (all zeros) WTID; this - should fail as obviously the mint didn't use that + should fail as obviously the exchange didn't use that WTID value for any transaction. */ { .oc = OC_WIRE_DEPOSITS, .label = "wire-deposit-failing", @@ -2529,15 +2529,15 @@ run (void *cls, is = GNUNET_new (struct InterpreterState); is->commands = commands; - ctx = TALER_MINT_init (); + ctx = TALER_EXCHANGE_init (); GNUNET_assert (NULL != ctx); ctx_task = GNUNET_SCHEDULER_add_now (&context_task, ctx); - mint = TALER_MINT_connect (ctx, + exchange = TALER_EXCHANGE_connect (ctx, "http://localhost:8081", &cert_cb, is, - TALER_MINT_OPTION_END); - GNUNET_assert (NULL != mint); + TALER_EXCHANGE_OPTION_END); + GNUNET_assert (NULL != exchange); shutdown_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 150), @@ -2546,7 +2546,7 @@ run (void *cls, /** - * Main function for the testcase for the mint API. + * Main function for the testcase for the exchange API. * * @param argc expected to be 1 * @param argv expected to only contain the program name @@ -2556,30 +2556,30 @@ main (int argc, char * const *argv) { struct GNUNET_OS_Process *proc; - struct GNUNET_OS_Process *mintd; + struct GNUNET_OS_Process *exchanged; - GNUNET_log_setup ("test-mint-api", + GNUNET_log_setup ("test-exchange-api", "WARNING", NULL); proc = GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_ALL, NULL, NULL, NULL, - "taler-mint-keyup", - "taler-mint-keyup", - "-d", "test-mint-home", - "-m", "test-mint-home/master.priv", + "taler-exchange-keyup", + "taler-exchange-keyup", + "-d", "test-exchange-home", + "-m", "test-exchange-home/master.priv", NULL); GNUNET_OS_process_wait (proc); GNUNET_OS_process_destroy (proc); - mintd = GNUNET_OS_start_process (GNUNET_NO, + exchanged = GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_ALL, NULL, NULL, NULL, - "taler-mint-httpd", - "taler-mint-httpd", - "-d", "test-mint-home", + "taler-exchange-httpd", + "taler-exchange-httpd", + "-d", "test-exchange-home", NULL); /* give child time to start and bind against the socket */ - fprintf (stderr, "Waiting for taler-mint-httpd to be ready"); + fprintf (stderr, "Waiting for taler-exchange-httpd to be ready"); do { fprintf (stderr, "."); @@ -2589,11 +2589,11 @@ main (int argc, fprintf (stderr, "\n"); result = GNUNET_SYSERR; GNUNET_SCHEDULER_run (&run, NULL); - GNUNET_OS_process_kill (mintd, + GNUNET_OS_process_kill (exchanged, SIGTERM); - GNUNET_OS_process_wait (mintd); - GNUNET_OS_process_destroy (mintd); + GNUNET_OS_process_wait (exchanged); + GNUNET_OS_process_destroy (exchanged); return (GNUNET_OK == result) ? 0 : 1; } -/* end of test_mint_api.c */ +/* end of test_exchange_api.c */ diff --git a/src/exchange-tools/Makefile.am b/src/exchange-tools/Makefile.am new file mode 100644 index 000000000..4ffabd15d --- /dev/null +++ b/src/exchange-tools/Makefile.am @@ -0,0 +1,81 @@ +# This Makefile.am is in the public domain +AM_CPPFLAGS = -I$(top_srcdir)/src/include + +if USE_COVERAGE + AM_CFLAGS = --coverage -O0 + XLIB = -lgcov +endif + +bin_PROGRAMS = \ + taler-auditor-sign \ + taler-exchange-keyup \ + taler-exchange-keycheck \ + taler-exchange-reservemod \ + taler-exchange-sepa \ + taler-exchange-dbinit + +taler_exchange_keyup_SOURCES = \ + taler-exchange-keyup.c +taler_exchange_keyup_LDADD = \ + $(LIBGCRYPT_LIBS) \ + $(top_builddir)/src/util/libtalerutil.la \ + $(top_builddir)/src/pq/libtalerpq.la \ + $(top_builddir)/src/exchangedb/libtalerexchangedb.la \ + -lgnunetutil $(XLIB) +taler_exchange_keyup_LDFLAGS = $(POSTGRESQL_LDFLAGS) + +taler_auditor_sign_SOURCES = \ + taler-auditor-sign.c +taler_auditor_sign_LDADD = \ + $(LIBGCRYPT_LIBS) \ + $(top_builddir)/src/util/libtalerutil.la \ + $(top_builddir)/src/exchangedb/libtalerexchangedb.la \ + -lgnunetutil $(XLIB) + + +taler_exchange_sepa_SOURCES = \ + taler-exchange-sepa.c +taler_exchange_sepa_LDADD = \ + $(LIBGCRYPT_LIBS) \ + $(top_builddir)/src/util/libtalerutil.la \ + -lgnunetutil -ljansson $(XLIB) +taler_exchange_sepa_LDFLAGS = $(POSTGRESQL_LDFLAGS) + +taler_exchange_keycheck_SOURCES = \ + taler-exchange-keycheck.c +taler_exchange_keycheck_LDADD = \ + $(LIBGCRYPT_LIBS) \ + $(top_builddir)/src/util/libtalerutil.la \ + $(top_builddir)/src/exchangedb/libtalerexchangedb.la \ + -lgnunetutil $(XLIB) +taler_exchange_keycheck_LDFLAGS = $(POSTGRESQL_LDFLAGS) + +taler_exchange_reservemod_SOURCES = \ + taler-exchange-reservemod.c +taler_exchange_reservemod_LDADD = \ + $(LIBGCRYPT_LIBS) \ + $(top_builddir)/src/util/libtalerutil.la \ + $(top_builddir)/src/pq/libtalerpq.la \ + $(top_builddir)/src/exchangedb/libtalerexchangedb.la \ + -lgnunetutil -ljansson $(XLIB) +taler_exchange_reservemod_LDFLAGS = \ + $(POSTGRESQL_LDFLAGS) +taler_exchange_reservemod_CPPFLAGS = \ + -I$(top_srcdir)/src/include \ + -I$(top_srcdir)/src/pq/ \ + $(POSTGRESQL_CPPFLAGS) + +taler_exchange_dbinit_SOURCES = \ + taler-exchange-dbinit.c +taler_exchange_dbinit_LDADD = \ + $(LIBGCRYPT_LIBS) \ + $(top_builddir)/src/util/libtalerutil.la \ + $(top_builddir)/src/pq/libtalerpq.la \ + $(top_builddir)/src/exchangedb/libtalerexchangedb.la \ + -lgnunetutil $(XLIB) +taler_exchange_dbinit_LDFLAGS = \ + $(POSTGRESQL_LDFLAGS) +taler_exchange_dbinit_CPPFLAGS = \ + -I$(top_srcdir)/src/include \ + -I$(top_srcdir)/src/pq/ \ + $(POSTGRESQL_CPPFLAGS) diff --git a/src/mint-tools/taler-auditor-sign.c b/src/exchange-tools/taler-auditor-sign.c similarity index 82% rename from src/mint-tools/taler-auditor-sign.c rename to src/exchange-tools/taler-auditor-sign.c index 7e6d3b12a..e4821f411 100644 --- a/src/mint-tools/taler-auditor-sign.c +++ b/src/exchange-tools/taler-auditor-sign.c @@ -15,12 +15,12 @@ */ /** * @file taler-auditor-sign.c - * @brief Tool used by the auditor to sign the mint's master key and the + * @brief Tool used by the auditor to sign the exchange's master key and the * denomination key(s). * @author Christian Grothoff */ #include -#include "taler_mintdb_lib.h" +#include "taler_exchangedb_lib.h" /** @@ -34,15 +34,15 @@ static int verbose; static char *auditor_key_file; /** - * Mint's public key (in Crockford base32 encoding). + * Exchange's public key (in Crockford base32 encoding). */ -static char *mint_public_key; +static char *exchange_public_key; /** - * File with the Mint's denomination keys to sign, itself - * signed by the Mint's public key. + * File with the Exchange's denomination keys to sign, itself + * signed by the Exchange's public key. */ -static char *mint_request_file; +static char *exchange_request_file; /** * Where should we write the auditor's signature? @@ -50,7 +50,7 @@ static char *mint_request_file; static char *output_file; /** - * Master public key of the mint. + * Master public key of the exchange. */ static struct TALER_MasterPublicKeyP master_public_key; @@ -114,8 +114,8 @@ print_dk (const struct TALER_DenominationKeyValidityPS *dk) /** * The main function of the taler-auditor-sign tool. This tool is used - * to sign a mint's master and denomination keys, affirming that the - * auditor is aware of them and will validate the mint's database with + * to sign a exchange's master and denomination keys, affirming that the + * auditor is aware of them and will validate the exchange's database with * respect to these keys. * * @param argc number of arguments from the command line @@ -131,12 +131,12 @@ main (int argc, "file containing the private key of the auditor", 1, &GNUNET_GETOPT_set_filename, &auditor_key_file}, TALER_GETOPT_OPTION_HELP ("Private key of the auditor to use for signing"), - {'m', "mint-key", "KEY", - "public key of the mint (Crockford base32 encoded)", 1, - &GNUNET_GETOPT_set_filename, &mint_public_key}, - {'r', "mint-request", "FILE", - "set of keys the mint requested the auditor to sign", 1, - &GNUNET_GETOPT_set_string, &mint_request_file}, + {'m', "exchange-key", "KEY", + "public key of the exchange (Crockford base32 encoded)", 1, + &GNUNET_GETOPT_set_filename, &exchange_public_key}, + {'r', "exchange-request", "FILE", + "set of keys the exchange requested the auditor to sign", 1, + &GNUNET_GETOPT_set_string, &exchange_request_file}, {'o', "output", "FILE", "where to write our signature", 1, &GNUNET_GETOPT_set_string, &output_file}, @@ -150,15 +150,15 @@ main (int argc, struct GNUNET_DISK_FileHandle *fh; struct TALER_DenominationKeyValidityPS *dks; unsigned int dks_len; - struct TALER_MintKeyValidityPS kv; + struct TALER_ExchangeKeyValidityPS kv; off_t in_size; unsigned int i; GNUNET_assert (GNUNET_OK == - GNUNET_log_setup ("taler-mint-keyup", + GNUNET_log_setup ("taler-exchange-keyup", "WARNING", NULL)); - if (GNUNET_GETOPT_run ("taler-mint-keyup", + if (GNUNET_GETOPT_run ("taler-exchange-keyup", options, argc, argv) < 0) return 1; @@ -178,40 +178,40 @@ main (int argc, } GNUNET_CRYPTO_eddsa_key_get_public (eddsa_priv, &apub.eddsa_pub); - if (NULL == mint_public_key) + if (NULL == exchange_public_key) { fprintf (stderr, - "Mint public key not given\n"); + "Exchange public key not given\n"); GNUNET_free (eddsa_priv); return 1; } if (GNUNET_OK != - GNUNET_STRINGS_string_to_data (mint_public_key, - strlen (mint_public_key), + GNUNET_STRINGS_string_to_data (exchange_public_key, + strlen (exchange_public_key), &master_public_key, sizeof (master_public_key))) { fprintf (stderr, "Public key `%s' malformed\n", - mint_public_key); + exchange_public_key); GNUNET_free (eddsa_priv); return 1; } - if (NULL == mint_request_file) + if (NULL == exchange_request_file) { fprintf (stderr, - "Mint signing request not given\n"); + "Exchange signing request not given\n"); GNUNET_free (eddsa_priv); return 1; } - fh = GNUNET_DISK_file_open (mint_request_file, + fh = GNUNET_DISK_file_open (exchange_request_file, GNUNET_DISK_OPEN_READ, GNUNET_DISK_PERM_NONE); if (NULL == fh) { fprintf (stderr, "Failed to open file `%s': %s\n", - mint_request_file, + exchange_request_file, STRERROR (errno)); GNUNET_free (eddsa_priv); return 1; @@ -222,7 +222,7 @@ main (int argc, { fprintf (stderr, "Failed to obtain input file size `%s': %s\n", - mint_request_file, + exchange_request_file, STRERROR (errno)); GNUNET_DISK_file_close (fh); GNUNET_free (eddsa_priv); @@ -232,14 +232,14 @@ main (int argc, { fprintf (stderr, "Input file size of file `%s' is invalid\n", - mint_request_file); + exchange_request_file); GNUNET_DISK_file_close (fh); GNUNET_free (eddsa_priv); return 1; } dks_len = in_size / sizeof (struct TALER_DenominationKeyValidityPS); - kv.purpose.purpose = htonl (TALER_SIGNATURE_AUDITOR_MINT_KEYS); - kv.purpose.size = htonl (sizeof (struct TALER_MintKeyValidityPS)); + kv.purpose.purpose = htonl (TALER_SIGNATURE_AUDITOR_EXCHANGE_KEYS); + kv.purpose.size = htonl (sizeof (struct TALER_ExchangeKeyValidityPS)); kv.master = master_public_key; dks = GNUNET_new_array (dks_len, struct TALER_DenominationKeyValidityPS); @@ -252,7 +252,7 @@ main (int argc, { fprintf (stderr, "Failed to read input file `%s': %s\n", - mint_request_file, + exchange_request_file, STRERROR (errno)); GNUNET_DISK_file_close (fh); GNUNET_free (sigs); @@ -297,7 +297,7 @@ main (int argc, /* write result to disk */ if (GNUNET_OK != - TALER_MINTDB_auditor_write (output_file, + TALER_EXCHANGEDB_auditor_write (output_file, &apub, sigs, &master_public_key, diff --git a/src/mint-tools/taler-mint-dbinit.c b/src/exchange-tools/taler-exchange-dbinit.c similarity index 66% rename from src/mint-tools/taler-mint-dbinit.c rename to src/exchange-tools/taler-exchange-dbinit.c index 2d9f77764..43a070228 100644 --- a/src/mint-tools/taler-mint-dbinit.c +++ b/src/exchange-tools/taler-exchange-dbinit.c @@ -14,19 +14,19 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file mint-tools/taler-mint-dbinit.c - * @brief Create tables for the mint database. + * @file exchange-tools/taler-exchange-dbinit.c + * @brief Create tables for the exchange database. * @author Florian Dold */ #include "platform.h" #include #include -#include "taler_mintdb_plugin.h" +#include "taler_exchangedb_plugin.h" /** - * Mint directory with the keys. + * Exchange directory with the keys. */ -static char *mint_base_dir; +static char *exchange_base_dir; /** * Our configuration. @@ -36,12 +36,12 @@ static struct GNUNET_CONFIGURATION_Handle *cfg; /** * Our DB plugin. */ -static struct TALER_MINTDB_Plugin *plugin; +static struct TALER_EXCHANGEDB_Plugin *plugin; /** * The main function of the database initialization tool. - * Used to initialize the Taler Mint's database. + * Used to initialize the Taler Exchange's database. * * @param argc number of arguments from the command line * @param argv command line arguments @@ -52,38 +52,38 @@ main (int argc, char *const *argv) { static const struct GNUNET_GETOPT_CommandLineOption options[] = { - {'d', "mint-dir", "DIR", - "mint directory", 1, - &GNUNET_GETOPT_set_filename, &mint_base_dir}, - GNUNET_GETOPT_OPTION_HELP ("Initialize Taler Mint database"), + {'d', "exchange-dir", "DIR", + "exchange directory", 1, + &GNUNET_GETOPT_set_filename, &exchange_base_dir}, + GNUNET_GETOPT_OPTION_HELP ("Initialize Taler Exchange database"), GNUNET_GETOPT_OPTION_VERSION (VERSION "-" VCS_VERSION), GNUNET_GETOPT_OPTION_END }; - if (GNUNET_GETOPT_run ("taler-mint-dbinit", + if (GNUNET_GETOPT_run ("taler-exchange-dbinit", options, argc, argv) < 0) return 1; GNUNET_assert (GNUNET_OK == - GNUNET_log_setup ("taler-mint-dbinit", + GNUNET_log_setup ("taler-exchange-dbinit", "INFO", NULL)); - if (NULL == mint_base_dir) + if (NULL == exchange_base_dir) { fprintf (stderr, - "Mint base directory not given.\n"); + "Exchange base directory not given.\n"); return 1; } - cfg = TALER_config_load (mint_base_dir); + cfg = TALER_config_load (exchange_base_dir); if (NULL == cfg) { fprintf (stderr, - "Failed to load mint configuration.\n"); + "Failed to load exchange configuration.\n"); return 1; } if (NULL == - (plugin = TALER_MINTDB_plugin_load (cfg))) + (plugin = TALER_EXCHANGEDB_plugin_load (cfg))) { fprintf (stderr, "Failed to initialize database plugin.\n"); @@ -95,11 +95,11 @@ main (int argc, { fprintf (stderr, "Failed to initialize database.\n"); - TALER_MINTDB_plugin_unload (plugin); + TALER_EXCHANGEDB_plugin_unload (plugin); return 1; } - TALER_MINTDB_plugin_unload (plugin); + TALER_EXCHANGEDB_plugin_unload (plugin); return 0; } -/* end of taler-mint-dbinit.c */ +/* end of taler-exchange-dbinit.c */ diff --git a/src/mint-tools/taler-mint-keycheck.c b/src/exchange-tools/taler-exchange-keycheck.c similarity index 81% rename from src/mint-tools/taler-mint-keycheck.c rename to src/exchange-tools/taler-exchange-keycheck.c index 4fa2707f8..d6566cd03 100644 --- a/src/mint-tools/taler-mint-keycheck.c +++ b/src/exchange-tools/taler-exchange-keycheck.c @@ -14,9 +14,9 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-keycheck.c - * @brief Check mint keys for validity. Reads the signing and denomination - * keys from the mint directory and checks to make sure they are + * @file taler-exchange-keycheck.c + * @brief Check exchange keys for validity. Reads the signing and denomination + * keys from the exchange directory and checks to make sure they are * well-formed. This is purely a diagnostic tool. * @author Florian Dold * @author Benedikt Mueller @@ -24,12 +24,12 @@ */ #include #include -#include "taler_mintdb_lib.h" +#include "taler_exchangedb_lib.h" /** - * Mint directory with the keys. + * Exchange directory with the keys. */ -static char *mint_directory; +static char *exchange_directory; /** * Our configuration. @@ -50,7 +50,7 @@ static struct GNUNET_CONFIGURATION_Handle *kcfg; static int signkeys_iter (void *cls, const char *filename, - const struct TALER_MINTDB_PrivateSigningKeyInformationP *ski) + const struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP *ski) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Iterating over key `%s' for start time %s\n", @@ -59,8 +59,8 @@ signkeys_iter (void *cls, (GNUNET_TIME_absolute_ntoh (ski->issue.start))); if (ntohl (ski->issue.purpose.size) != - (sizeof (struct TALER_MintSigningKeyValidityPS) - - offsetof (struct TALER_MintSigningKeyValidityPS, + (sizeof (struct TALER_ExchangeSigningKeyValidityPS) - + offsetof (struct TALER_ExchangeSigningKeyValidityPS, purpose))) { fprintf (stderr, @@ -101,9 +101,9 @@ signkeys_iter (void *cls, * #GNUNET_NO if not */ static int -mint_signkeys_check () +exchange_signkeys_check () { - if (0 > TALER_MINTDB_signing_keys_iterate (mint_directory, + if (0 > TALER_EXCHANGEDB_signing_keys_iterate (exchange_directory, &signkeys_iter, NULL)) return GNUNET_NO; @@ -124,7 +124,7 @@ mint_signkeys_check () static int denomkeys_iter (void *cls, const char *alias, - const struct TALER_MINTDB_DenominationKeyIssueInformation *dki) + const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki) { struct GNUNET_HashCode hc; @@ -183,9 +183,9 @@ denomkeys_iter (void *cls, * #GNUNET_NO if not */ static int -mint_denomkeys_check () +exchange_denomkeys_check () { - if (0 > TALER_MINTDB_denomination_keys_iterate (mint_directory, + if (0 > TALER_EXCHANGEDB_denomination_keys_iterate (exchange_directory, &denomkeys_iter, NULL)) return GNUNET_NO; @@ -204,38 +204,38 @@ int main (int argc, char *const *argv) { static const struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_HELP ("gnunet-mint-keycheck OPTIONS"), + GNUNET_GETOPT_OPTION_HELP ("gnunet-exchange-keycheck OPTIONS"), {'d', "directory", "DIRECTORY", - "mint directory with keys to check", 1, - &GNUNET_GETOPT_set_filename, &mint_directory}, + "exchange directory with keys to check", 1, + &GNUNET_GETOPT_set_filename, &exchange_directory}, GNUNET_GETOPT_OPTION_END }; GNUNET_assert (GNUNET_OK == - GNUNET_log_setup ("taler-mint-keycheck", + GNUNET_log_setup ("taler-exchange-keycheck", "WARNING", NULL)); - if (GNUNET_GETOPT_run ("taler-mint-keycheck", + if (GNUNET_GETOPT_run ("taler-exchange-keycheck", options, argc, argv) < 0) return 1; - if (NULL == mint_directory) + if (NULL == exchange_directory) { fprintf (stderr, - "Mint directory not given\n"); + "Exchange directory not given\n"); return 1; } - kcfg = TALER_config_load (mint_directory); + kcfg = TALER_config_load (exchange_directory); if (NULL == kcfg) { fprintf (stderr, - "Failed to load mint configuration\n"); + "Failed to load exchange configuration\n"); return 1; } - if ( (GNUNET_OK != mint_signkeys_check ()) || - (GNUNET_OK != mint_denomkeys_check ()) ) + if ( (GNUNET_OK != exchange_signkeys_check ()) || + (GNUNET_OK != exchange_denomkeys_check ()) ) { GNUNET_CONFIGURATION_destroy (kcfg); return 1; @@ -244,4 +244,4 @@ main (int argc, char *const *argv) return 0; } -/* end of taler-mint-keycheck.c */ +/* end of taler-exchange-keycheck.c */ diff --git a/src/mint-tools/taler-mint-keyup.c b/src/exchange-tools/taler-exchange-keyup.c similarity index 89% rename from src/mint-tools/taler-mint-keyup.c rename to src/exchange-tools/taler-exchange-keyup.c index b82554b94..779e3a3d3 100644 --- a/src/mint-tools/taler-mint-keyup.c +++ b/src/exchange-tools/taler-exchange-keyup.c @@ -14,15 +14,15 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-keyup.c - * @brief Update the mint's keys for coins and signatures, - * using the mint's offline master key. + * @file taler-exchange-keyup.c + * @brief Update the exchange's keys for coins and signatures, + * using the exchange's offline master key. * @author Florian Dold * @author Benedikt Mueller * @author Christian Grothoff */ #include -#include "taler_mintdb_lib.h" +#include "taler_exchangedb_lib.h" /** * When generating filenames from a cryptographic hash, we do not use @@ -169,9 +169,9 @@ static char *auditorrequestfile; static FILE *auditor_output_file; /** - * Director of the mint, containing the keys. + * Director of the exchange, containing the keys. */ -static char *mint_directory; +static char *exchange_directory; /** * Time to pretend when the key update is executed. @@ -179,7 +179,7 @@ static char *mint_directory; static char *pretend_time_str; /** - * Handle to the mint's configuration + * Handle to the exchange's configuration */ static struct GNUNET_CONFIGURATION_Handle *kcfg; @@ -190,12 +190,12 @@ static struct GNUNET_CONFIGURATION_Handle *kcfg; static struct GNUNET_TIME_Absolute now; /** - * Master private key of the mint. + * Master private key of the exchange. */ static struct TALER_MasterPrivateKeyP master_priv; /** - * Master public key of the mint. + * Master public key of the exchange. */ static struct TALER_MasterPublicKeyP master_public_key; @@ -210,7 +210,7 @@ static struct GNUNET_TIME_Absolute lookahead_sign_stamp; * keys created at time @a start. * * @param start time at which we create the signing key - * @return name of the directory we should use, basically "$MINTDIR/$TIME/"; + * @return name of the directory we should use, basically "$EXCHANGEDIR/$TIME/"; * (valid until next call to this function) */ static const char * @@ -220,8 +220,8 @@ get_signkey_file (struct GNUNET_TIME_Absolute start) GNUNET_snprintf (dir, sizeof (dir), - "%s" DIR_SEPARATOR_STR TALER_MINTDB_DIR_SIGNING_KEYS DIR_SEPARATOR_STR "%llu", - mint_directory, + "%s" DIR_SEPARATOR_STR TALER_EXCHANGEDB_DIR_SIGNING_KEYS DIR_SEPARATOR_STR "%llu", + exchange_directory, (unsigned long long) start.abs_value_us); return dir; } @@ -265,7 +265,7 @@ hash_coin_type (const struct CoinTypeParams *p, /** * Obtain the name of the directory we should use to store coins of * the given type. The directory name has the format - * "$MINTDIR/$VALUE/$HASH/" where "$VALUE" represents the value of the + * "$EXCHANGEDIR/$VALUE/$HASH/" where "$VALUE" represents the value of the * coin and "$HASH" encodes all of the coin's parameters, generating a * unique string for each type of coin. Note that the "$HASH" * includes neither the absolute creation time nor the key of the @@ -299,8 +299,8 @@ get_cointype_dir (const struct CoinTypeParams *p) GNUNET_snprintf (dir, sizeof (dir), - "%s" DIR_SEPARATOR_STR TALER_MINTDB_DIR_DENOMINATION_KEYS DIR_SEPARATOR_STR "%s-%s", - mint_directory, + "%s" DIR_SEPARATOR_STR TALER_EXCHANGEDB_DIR_DENOMINATION_KEYS DIR_SEPARATOR_STR "%s-%s", + exchange_directory, val_str, hash_str); GNUNET_free (hash_str); @@ -434,7 +434,7 @@ get_anchor (const char *dir, /** - * Create a mint signing key (for signing mint messages, not for coins) + * Create a exchange signing key (for signing exchange messages, not for coins) * and assert its correctness by signing it with the master key. * * @param start start time of the validity period for the key @@ -446,10 +446,10 @@ static void create_signkey_issue_priv (struct GNUNET_TIME_Absolute start, struct GNUNET_TIME_Relative duration, struct GNUNET_TIME_Absolute end, - struct TALER_MINTDB_PrivateSigningKeyInformationP *pi) + struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP *pi) { struct GNUNET_CRYPTO_EddsaPrivateKey *priv; - struct TALER_MintSigningKeyValidityPS *issue = &pi->issue; + struct TALER_ExchangeSigningKeyValidityPS *issue = &pi->issue; priv = GNUNET_CRYPTO_eddsa_key_create (); pi->signkey_priv.eddsa_priv = *priv; @@ -462,8 +462,8 @@ create_signkey_issue_priv (struct GNUNET_TIME_Absolute start, GNUNET_CRYPTO_eddsa_key_get_public (&pi->signkey_priv.eddsa_priv, &issue->signkey_pub.eddsa_pub); issue->purpose.purpose = htonl (TALER_SIGNATURE_MASTER_SIGNING_KEY_VALIDITY); - issue->purpose.size = htonl (sizeof (struct TALER_MintSigningKeyValidityPS) - - offsetof (struct TALER_MintSigningKeyValidityPS, + issue->purpose.size = htonl (sizeof (struct TALER_ExchangeSigningKeyValidityPS) - + offsetof (struct TALER_ExchangeSigningKeyValidityPS, purpose)); GNUNET_assert (GNUNET_OK == @@ -480,7 +480,7 @@ create_signkey_issue_priv (struct GNUNET_TIME_Absolute start, * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ static int -mint_keys_update_signkeys () +exchange_keys_update_signkeys () { struct GNUNET_TIME_Relative signkey_duration; struct GNUNET_TIME_Relative legal_duration; @@ -489,23 +489,23 @@ mint_keys_update_signkeys () if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_time (kcfg, - "mint_keys", + "exchange_keys", "signkey_duration", &signkey_duration)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "mint_keys", + "exchange_keys", "signkey_duration"); return GNUNET_SYSERR; } if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_time (kcfg, - "mint_keys", + "exchange_keys", "legal_duration", &legal_duration)) { GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR, - "mint_keys", + "exchange_keys", "legal_duration", "fails to specify valid timeframe"); return GNUNET_SYSERR; @@ -513,15 +513,15 @@ mint_keys_update_signkeys () if (signkey_duration.rel_value_us > legal_duration.rel_value_us) { GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR, - "mint_keys", + "exchange_keys", "legal_duration", "must be longer than signkey_duration"); return GNUNET_SYSERR; } TALER_round_rel_time (&signkey_duration); GNUNET_asprintf (&signkey_dir, - "%s" DIR_SEPARATOR_STR TALER_MINTDB_DIR_SIGNING_KEYS, - mint_directory); + "%s" DIR_SEPARATOR_STR TALER_EXCHANGEDB_DIR_SIGNING_KEYS, + exchange_directory); /* make sure the directory exists */ if (GNUNET_OK != GNUNET_DISK_directory_create (signkey_dir)) @@ -539,7 +539,7 @@ mint_keys_update_signkeys () while (anchor.abs_value_us < lookahead_sign_stamp.abs_value_us) { const char *skf; - struct TALER_MINTDB_PrivateSigningKeyInformationP signkey_issue; + struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP signkey_issue; ssize_t nwrite; struct GNUNET_TIME_Absolute end; @@ -557,9 +557,9 @@ mint_keys_update_signkeys () &signkey_issue); nwrite = GNUNET_DISK_fn_write (skf, &signkey_issue, - sizeof (struct TALER_MINTDB_PrivateSigningKeyInformationP), + sizeof (struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP), GNUNET_DISK_PERM_USER_WRITE | GNUNET_DISK_PERM_USER_READ); - if (sizeof (struct TALER_MINTDB_PrivateSigningKeyInformationP) != nwrite) + if (sizeof (struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP) != nwrite) { fprintf (stderr, "Failed to write to file `%s': %s\n", @@ -633,7 +633,7 @@ get_cointype_params (const char *ct, { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, ct, - "mint_denom_duration_overlap"); + "exchange_denom_duration_overlap"); return GNUNET_SYSERR; } TALER_round_rel_time (¶ms->duration_overlap); @@ -722,7 +722,7 @@ get_cointype_params (const char *ct, */ static void create_denomkey_issue (const struct CoinTypeParams *params, - struct TALER_MINTDB_DenominationKeyIssueInformation *dki) + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki) { dki->denom_priv.rsa_private_key = GNUNET_CRYPTO_rsa_private_key_create (params->rsa_keysize); @@ -769,13 +769,13 @@ create_denomkey_issue (const struct CoinTypeParams *params, * @param coin_alias name of the coin's section in the configuration */ static void -mint_keys_update_cointype (void *cls, +exchange_keys_update_cointype (void *cls, const char *coin_alias) { int *ret = cls; struct CoinTypeParams p; const char *dkf; - struct TALER_MINTDB_DenominationKeyIssueInformation denomkey_issue; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation denomkey_issue; if (0 != strncasecmp (coin_alias, "coin_", @@ -808,7 +808,7 @@ mint_keys_update_cointype (void *cls, create_denomkey_issue (&p, &denomkey_issue); if (GNUNET_OK != - TALER_MINTDB_denomination_key_write (dkf, + TALER_EXCHANGEDB_denomination_key_write (dkf, &denomkey_issue)) { fprintf (stderr, @@ -842,28 +842,28 @@ mint_keys_update_cointype (void *cls, /** - * Update all of the denomination keys of the mint. + * Update all of the denomination keys of the exchange. * * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ static int -mint_keys_update_denomkeys () +exchange_keys_update_denomkeys () { int ok; ok = GNUNET_OK; GNUNET_CONFIGURATION_iterate_sections (kcfg, - &mint_keys_update_cointype, + &exchange_keys_update_cointype, &ok); return ok; } /** - * The main function of the taler-mint-keyup tool. This tool is used - * to create the signing and denomination keys for the mint. It uses + * The main function of the taler-exchange-keyup tool. This tool is used + * to create the signing and denomination keys for the exchange. It uses * the long-term offline private key and writes the (additional) key - * files to the respective mint directory (from where they can then be + * files to the respective exchange directory (from where they can then be * copied to the online server). Note that we need (at least) the * most recent generated previous keys so as to align the validity * periods. @@ -877,10 +877,10 @@ main (int argc, char *const *argv) { static const struct GNUNET_GETOPT_CommandLineOption options[] = { - {'d', "mint-dir", "DIR", - "mint directory with keys to update", 1, - &GNUNET_GETOPT_set_filename, &mint_directory}, - TALER_GETOPT_OPTION_HELP ("Setup signing and denomination keys for a Taler mint"), + {'d', "exchange-dir", "DIR", + "exchange directory with keys to update", 1, + &GNUNET_GETOPT_set_filename, &exchange_directory}, + TALER_GETOPT_OPTION_HELP ("Setup signing and denomination keys for a Taler exchange"), {'m', "master-key", "FILE", "master key file (private key)", 1, &GNUNET_GETOPT_set_filename, &masterkeyfile}, @@ -897,18 +897,18 @@ main (int argc, struct GNUNET_CRYPTO_EddsaPrivateKey *eddsa_priv; GNUNET_assert (GNUNET_OK == - GNUNET_log_setup ("taler-mint-keyup", + GNUNET_log_setup ("taler-exchange-keyup", "WARNING", NULL)); - if (GNUNET_GETOPT_run ("taler-mint-keyup", + if (GNUNET_GETOPT_run ("taler-exchange-keyup", options, argc, argv) < 0) return 1; - if (NULL == mint_directory) + if (NULL == exchange_directory) { fprintf (stderr, - "Mint directory not given\n"); + "Exchange directory not given\n"); return 1; } if (NULL != pretend_time_str) @@ -929,11 +929,11 @@ main (int argc, } TALER_round_abs_time (&now); - kcfg = TALER_config_load (mint_directory); + kcfg = TALER_config_load (exchange_directory); if (NULL == kcfg) { fprintf (stderr, - "Failed to load mint configuration\n"); + "Failed to load exchange configuration\n"); return 1; } if (NULL == masterkeyfile) @@ -975,13 +975,13 @@ main (int argc, if (GNUNET_OK != GNUNET_CONFIGURATION_get_data (kcfg, - "mint", + "exchange", "master_public_key", &master_public_key_from_cfg, sizeof (struct GNUNET_CRYPTO_EddsaPublicKey))) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "mint", + "exchange", "master_public_key"); return 1; } @@ -991,7 +991,7 @@ main (int argc, sizeof (struct GNUNET_CRYPTO_EddsaPublicKey))) { GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR, - "mint", + "exchange", "master_public_key", _("does not match with private key")); return 1; @@ -1000,19 +1000,19 @@ main (int argc, if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_time (kcfg, - "mint_keys", + "exchange_keys", "lookahead_sign", &lookahead_sign)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "mint_keys", + "exchange_keys", "lookahead_sign"); return GNUNET_SYSERR; } if (0 == lookahead_sign.rel_value_us) { GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR, - "mint_keys", + "exchange_keys", "lookahead_sign", _("must not be zero")); return GNUNET_SYSERR; @@ -1023,10 +1023,10 @@ main (int argc, /* finally, do actual work */ - if (GNUNET_OK != mint_keys_update_signkeys ()) + if (GNUNET_OK != exchange_keys_update_signkeys ()) return 1; - if (GNUNET_OK != mint_keys_update_denomkeys ()) + if (GNUNET_OK != exchange_keys_update_denomkeys ()) return 1; if (NULL != auditor_output_file) { @@ -1036,4 +1036,4 @@ main (int argc, return 0; } -/* end of taler-mint-keyup.c */ +/* end of taler-exchange-keyup.c */ diff --git a/src/mint-tools/taler-mint-reservemod.c b/src/exchange-tools/taler-exchange-reservemod.c similarity index 85% rename from src/mint-tools/taler-mint-reservemod.c rename to src/exchange-tools/taler-exchange-reservemod.c index 38d27054a..984b7f8ee 100644 --- a/src/mint-tools/taler-mint-reservemod.c +++ b/src/exchange-tools/taler-exchange-reservemod.c @@ -14,7 +14,7 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-reservemod.c + * @file taler-exchange-reservemod.c * @brief Modify reserves. Allows manipulation of reserve balances. * @author Florian Dold * @author Benedikt Mueller @@ -23,22 +23,22 @@ #include #include #include -#include "taler_mintdb_plugin.h" +#include "taler_exchangedb_plugin.h" /** - * Director of the mint, containing the keys. + * Director of the exchange, containing the keys. */ -static char *mint_directory; +static char *exchange_directory; /** - * Handle to the mint's configuration + * Handle to the exchange's configuration */ static struct GNUNET_CONFIGURATION_Handle *cfg; /** * Our DB plugin. */ -static struct TALER_MINTDB_Plugin *plugin; +static struct TALER_EXCHANGEDB_Plugin *plugin; /** @@ -58,14 +58,14 @@ main (int argc, char *const *argv) json_t *jdetails; json_error_t error; struct TALER_ReservePublicKeyP reserve_pub; - struct TALER_MINTDB_Session *session; + struct TALER_EXCHANGEDB_Session *session; const struct GNUNET_GETOPT_CommandLineOption options[] = { {'a', "add", "DENOM", "value to add", 1, &GNUNET_GETOPT_set_string, &add_str}, - {'d', "mint-dir", "DIR", - "mint directory with keys to update", 1, - &GNUNET_GETOPT_set_filename, &mint_directory}, + {'d', "exchange-dir", "DIR", + "exchange directory with keys to update", 1, + &GNUNET_GETOPT_set_filename, &exchange_directory}, {'D', "details", "JSON", "details about the bank transaction which justify why we add this amount", 1, &GNUNET_GETOPT_set_string, &details}, @@ -79,18 +79,18 @@ main (int argc, char *const *argv) int ret; GNUNET_assert (GNUNET_OK == - GNUNET_log_setup ("taler-mint-reservemod", + GNUNET_log_setup ("taler-exchange-reservemod", "WARNING", NULL)); - if (GNUNET_GETOPT_run ("taler-mint-reservemod", + if (GNUNET_GETOPT_run ("taler-exchange-reservemod", options, argc, argv) < 0) return 1; - if (NULL == mint_directory) + if (NULL == exchange_directory) { fprintf (stderr, - "Mint directory not given\n"); + "Exchange directory not given\n"); GNUNET_free_non_null (add_str); GNUNET_free_non_null (details); GNUNET_free_non_null (reserve_pub_str); @@ -133,11 +133,11 @@ main (int argc, char *const *argv) return 1; } - cfg = TALER_config_load (mint_directory); + cfg = TALER_config_load (exchange_directory); if (NULL == cfg) { fprintf (stderr, - "Failed to load mint configuration\n"); + "Failed to load exchange configuration\n"); GNUNET_free_non_null (add_str); GNUNET_free_non_null (details); GNUNET_free_non_null (reserve_pub_str); @@ -145,7 +145,7 @@ main (int argc, char *const *argv) } ret = 1; if (NULL == - (plugin = TALER_MINTDB_plugin_load (cfg))) + (plugin = TALER_EXCHANGEDB_plugin_load (cfg))) { fprintf (stderr, "Failed to initialize database plugin.\n"); @@ -194,7 +194,7 @@ main (int argc, char *const *argv) ret = 0; cleanup: if (NULL != plugin) - TALER_MINTDB_plugin_unload (plugin); + TALER_EXCHANGEDB_plugin_unload (plugin); if (NULL != cfg) GNUNET_CONFIGURATION_destroy (cfg); GNUNET_free_non_null (add_str); @@ -203,4 +203,4 @@ main (int argc, char *const *argv) return ret; } -/* end taler-mint-reservemod.c */ +/* end taler-exchange-reservemod.c */ diff --git a/src/mint-tools/taler-mint-sepa.c b/src/exchange-tools/taler-exchange-sepa.c similarity index 94% rename from src/mint-tools/taler-mint-sepa.c rename to src/exchange-tools/taler-exchange-sepa.c index e66db541e..a3ac95436 100644 --- a/src/mint-tools/taler-mint-sepa.c +++ b/src/exchange-tools/taler-exchange-sepa.c @@ -14,7 +14,7 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-sepa.c + * @file taler-exchange-sepa.c * @brief Create signed response for /wire/sepa requests. * @author Christian Grothoff */ @@ -51,7 +51,7 @@ static char *output_filename; /** - * The main function of the taler-mint-sepa tool. This tool is used + * The main function of the taler-exchange-sepa tool. This tool is used * to sign the SEPA bank account details using the master key. * * @param argc number of arguments from the command line @@ -90,11 +90,11 @@ main (int argc, char *json_str; GNUNET_assert (GNUNET_OK == - GNUNET_log_setup ("taler-mint-sepa", + GNUNET_log_setup ("taler-exchange-sepa", "WARNING", NULL)); - if (GNUNET_GETOPT_run ("taler-mint-sepa", + if (GNUNET_GETOPT_run ("taler-exchange-sepa", options, argc, argv) < 0) return 1; @@ -160,4 +160,4 @@ main (int argc, return 0; } -/* end of taler-mint-sepa.c */ +/* end of taler-exchange-sepa.c */ diff --git a/src/exchange/.gitignore b/src/exchange/.gitignore new file mode 100644 index 000000000..a1e5e9aa7 --- /dev/null +++ b/src/exchange/.gitignore @@ -0,0 +1,6 @@ +taler-exchange-dbinit +taler-exchange-keycheck +taler-exchange-keyup +taler-exchange-pursemod +taler-exchange-reservemod +taler-exchange-httpd \ No newline at end of file diff --git a/src/exchange/Makefile.am b/src/exchange/Makefile.am new file mode 100644 index 000000000..443ac511a --- /dev/null +++ b/src/exchange/Makefile.am @@ -0,0 +1,59 @@ +# This Makefile.am is in the public domain +AM_CPPFLAGS = -I$(top_srcdir)/src/include + +if USE_COVERAGE + AM_CFLAGS = --coverage -O0 + XLIB = -lgcov +endif + +bin_PROGRAMS = \ + taler-exchange-aggregator \ + taler-exchange-httpd + +taler_exchange_aggregator_SOURCES = \ + taler-exchange-aggregator.c +taler_exchange_aggregator_LDADD = \ + $(LIBGCRYPT_LIBS) \ + $(top_builddir)/src/util/libtalerutil.la \ + $(top_builddir)/src/wire/libtalerwire.la \ + $(top_builddir)/src/exchangedb/libtalerexchangedb.la \ + -ljansson \ + -lgnunetutil + +taler_exchange_httpd_SOURCES = \ + taler-exchange-httpd.c taler-exchange-httpd.h \ + taler-exchange-httpd_admin.c taler-exchange-httpd_admin.h \ + taler-exchange-httpd_db.c taler-exchange-httpd_db.h \ + taler-exchange-httpd_deposit.c taler-exchange-httpd_deposit.h \ + taler-exchange-httpd_keystate.c taler-exchange-httpd_keystate.h \ + taler-exchange-httpd_mhd.c taler-exchange-httpd_mhd.h \ + taler-exchange-httpd_parsing.c taler-exchange-httpd_parsing.h \ + taler-exchange-httpd_refresh.c taler-exchange-httpd_refresh.h \ + taler-exchange-httpd_reserve.c taler-exchange-httpd_reserve.h \ + taler-exchange-httpd_responses.c taler-exchange-httpd_responses.h \ + taler-exchange-httpd_tracking.c taler-exchange-httpd_tracking.h \ + taler-exchange-httpd_wire.c taler-exchange-httpd_wire.h \ + taler-exchange-httpd_validation.c taler-exchange-httpd_validation.h +taler_exchange_httpd_LDADD = \ + $(LIBGCRYPT_LIBS) \ + $(top_builddir)/src/util/libtalerutil.la \ + $(top_builddir)/src/exchangedb/libtalerexchangedb.la \ + -lmicrohttpd \ + -ljansson \ + -lgnunetutil \ + -lpthread + +if HAVE_DEVELOPER +taler_exchange_httpd_SOURCES += \ + taler-exchange-httpd_test.c taler-exchange-httpd_test.h +endif + +check_SCRIPTS = \ + test_taler_exchange_httpd.sh + +if HAVE_EXPENSIVE_TESTS +check_SCRIPTS += \ + test_taler_exchange_httpd_afl.sh +endif + +TESTS = $(check_SCRIPTS) diff --git a/src/mint/afl-tests/id:000000,orig:admin_add_incoming.req b/src/exchange/afl-tests/id:000000,orig:admin_add_incoming.req similarity index 100% rename from src/mint/afl-tests/id:000000,orig:admin_add_incoming.req rename to src/exchange/afl-tests/id:000000,orig:admin_add_incoming.req diff --git a/src/mint/afl-tests/id:000001,orig:deposit.req b/src/exchange/afl-tests/id:000001,orig:deposit.req similarity index 100% rename from src/mint/afl-tests/id:000001,orig:deposit.req rename to src/exchange/afl-tests/id:000001,orig:deposit.req diff --git a/src/mint/afl-tests/id:000001,sig:06,src:000004,op:flip1,pos:21060 b/src/exchange/afl-tests/id:000001,sig:06,src:000004,op:flip1,pos:21060 similarity index 100% rename from src/mint/afl-tests/id:000001,sig:06,src:000004,op:flip1,pos:21060 rename to src/exchange/afl-tests/id:000001,sig:06,src:000004,op:flip1,pos:21060 diff --git a/src/mint/afl-tests/id:000002,orig:keys.req b/src/exchange/afl-tests/id:000002,orig:keys.req similarity index 100% rename from src/mint/afl-tests/id:000002,orig:keys.req rename to src/exchange/afl-tests/id:000002,orig:keys.req diff --git a/src/mint/afl-tests/id:000003,orig:refresh_link.req b/src/exchange/afl-tests/id:000003,orig:refresh_link.req similarity index 100% rename from src/mint/afl-tests/id:000003,orig:refresh_link.req rename to src/exchange/afl-tests/id:000003,orig:refresh_link.req diff --git a/src/mint/afl-tests/id:000004,orig:refresh_melt.req b/src/exchange/afl-tests/id:000004,orig:refresh_melt.req similarity index 100% rename from src/mint/afl-tests/id:000004,orig:refresh_melt.req rename to src/exchange/afl-tests/id:000004,orig:refresh_melt.req diff --git a/src/mint/afl-tests/id:000005,orig:refresh_reveal.req b/src/exchange/afl-tests/id:000005,orig:refresh_reveal.req similarity index 100% rename from src/mint/afl-tests/id:000005,orig:refresh_reveal.req rename to src/exchange/afl-tests/id:000005,orig:refresh_reveal.req diff --git a/src/mint/afl-tests/id:000006,orig:reserve_status.req b/src/exchange/afl-tests/id:000006,orig:reserve_status.req similarity index 100% rename from src/mint/afl-tests/id:000006,orig:reserve_status.req rename to src/exchange/afl-tests/id:000006,orig:reserve_status.req diff --git a/src/mint/afl-tests/id:000007,orig:reserve_withdraw.req b/src/exchange/afl-tests/id:000007,orig:reserve_withdraw.req similarity index 100% rename from src/mint/afl-tests/id:000007,orig:reserve_withdraw.req rename to src/exchange/afl-tests/id:000007,orig:reserve_withdraw.req diff --git a/src/mint/afl-tests/id:000008,orig:wire.req b/src/exchange/afl-tests/id:000008,orig:wire.req similarity index 100% rename from src/mint/afl-tests/id:000008,orig:wire.req rename to src/exchange/afl-tests/id:000008,orig:wire.req diff --git a/src/mint/afl-tests/id:000009,orig:wire_sepa.req b/src/exchange/afl-tests/id:000009,orig:wire_sepa.req similarity index 100% rename from src/mint/afl-tests/id:000009,orig:wire_sepa.req rename to src/exchange/afl-tests/id:000009,orig:wire_sepa.req diff --git a/src/mint/afl-tests/id:000010,orig:wire_test.req b/src/exchange/afl-tests/id:000010,orig:wire_test.req similarity index 100% rename from src/mint/afl-tests/id:000010,orig:wire_test.req rename to src/exchange/afl-tests/id:000010,orig:wire_test.req diff --git a/src/mint/afl-tests/id:000011,src:000000,op:flip1,pos:1,+cov b/src/exchange/afl-tests/id:000011,src:000000,op:flip1,pos:1,+cov similarity index 100% rename from src/mint/afl-tests/id:000011,src:000000,op:flip1,pos:1,+cov rename to src/exchange/afl-tests/id:000011,src:000000,op:flip1,pos:1,+cov diff --git a/src/mint/afl-tests/id:000011,src:000000,op:flip1,pos:2,+cov b/src/exchange/afl-tests/id:000011,src:000000,op:flip1,pos:2,+cov similarity index 100% rename from src/mint/afl-tests/id:000011,src:000000,op:flip1,pos:2,+cov rename to src/exchange/afl-tests/id:000011,src:000000,op:flip1,pos:2,+cov diff --git a/src/mint/afl-tests/id:000012,src:000000,op:flip1,pos:3,+cov b/src/exchange/afl-tests/id:000012,src:000000,op:flip1,pos:3,+cov similarity index 100% rename from src/mint/afl-tests/id:000012,src:000000,op:flip1,pos:3,+cov rename to src/exchange/afl-tests/id:000012,src:000000,op:flip1,pos:3,+cov diff --git a/src/mint/afl-tests/id:000012,src:000000,op:flip1,pos:4,+cov b/src/exchange/afl-tests/id:000012,src:000000,op:flip1,pos:4,+cov similarity index 100% rename from src/mint/afl-tests/id:000012,src:000000,op:flip1,pos:4,+cov rename to src/exchange/afl-tests/id:000012,src:000000,op:flip1,pos:4,+cov diff --git a/src/mint/afl-tests/id:000013,src:000000,op:flip1,pos:4,+cov b/src/exchange/afl-tests/id:000013,src:000000,op:flip1,pos:4,+cov similarity index 100% rename from src/mint/afl-tests/id:000013,src:000000,op:flip1,pos:4,+cov rename to src/exchange/afl-tests/id:000013,src:000000,op:flip1,pos:4,+cov diff --git a/src/mint/afl-tests/id:000013,src:000000,op:flip1,pos:5,+cov b/src/exchange/afl-tests/id:000013,src:000000,op:flip1,pos:5,+cov similarity index 100% rename from src/mint/afl-tests/id:000013,src:000000,op:flip1,pos:5,+cov rename to src/exchange/afl-tests/id:000013,src:000000,op:flip1,pos:5,+cov diff --git a/src/mint/afl-tests/id:000014,src:000000,op:flip1,pos:5,+cov b/src/exchange/afl-tests/id:000014,src:000000,op:flip1,pos:5,+cov similarity index 100% rename from src/mint/afl-tests/id:000014,src:000000,op:flip1,pos:5,+cov rename to src/exchange/afl-tests/id:000014,src:000000,op:flip1,pos:5,+cov diff --git a/src/mint/afl-tests/id:000015,src:000000,op:flip1,pos:5,+cov b/src/exchange/afl-tests/id:000015,src:000000,op:flip1,pos:5,+cov similarity index 100% rename from src/mint/afl-tests/id:000015,src:000000,op:flip1,pos:5,+cov rename to src/exchange/afl-tests/id:000015,src:000000,op:flip1,pos:5,+cov diff --git a/src/mint/afl-tests/id:000015,src:000000,op:flip1,pos:8,+cov b/src/exchange/afl-tests/id:000015,src:000000,op:flip1,pos:8,+cov similarity index 100% rename from src/mint/afl-tests/id:000015,src:000000,op:flip1,pos:8,+cov rename to src/exchange/afl-tests/id:000015,src:000000,op:flip1,pos:8,+cov diff --git a/src/mint/afl-tests/id:000016,src:000000,op:flip1,pos:11 b/src/exchange/afl-tests/id:000016,src:000000,op:flip1,pos:11 similarity index 100% rename from src/mint/afl-tests/id:000016,src:000000,op:flip1,pos:11 rename to src/exchange/afl-tests/id:000016,src:000000,op:flip1,pos:11 diff --git a/src/mint/afl-tests/id:000016,src:000000,op:flip1,pos:5,+cov b/src/exchange/afl-tests/id:000016,src:000000,op:flip1,pos:5,+cov similarity index 100% rename from src/mint/afl-tests/id:000016,src:000000,op:flip1,pos:5,+cov rename to src/exchange/afl-tests/id:000016,src:000000,op:flip1,pos:5,+cov diff --git a/src/mint/afl-tests/id:000017,src:000000,op:flip1,pos:13,+cov b/src/exchange/afl-tests/id:000017,src:000000,op:flip1,pos:13,+cov similarity index 100% rename from src/mint/afl-tests/id:000017,src:000000,op:flip1,pos:13,+cov rename to src/exchange/afl-tests/id:000017,src:000000,op:flip1,pos:13,+cov diff --git a/src/mint/afl-tests/id:000017,src:000000,op:flip1,pos:7,+cov b/src/exchange/afl-tests/id:000017,src:000000,op:flip1,pos:7,+cov similarity index 100% rename from src/mint/afl-tests/id:000017,src:000000,op:flip1,pos:7,+cov rename to src/exchange/afl-tests/id:000017,src:000000,op:flip1,pos:7,+cov diff --git a/src/mint/afl-tests/id:000018,src:000000,op:flip1,pos:13,+cov b/src/exchange/afl-tests/id:000018,src:000000,op:flip1,pos:13,+cov similarity index 100% rename from src/mint/afl-tests/id:000018,src:000000,op:flip1,pos:13,+cov rename to src/exchange/afl-tests/id:000018,src:000000,op:flip1,pos:13,+cov diff --git a/src/mint/afl-tests/id:000018,src:000000,op:flip1,pos:9,+cov b/src/exchange/afl-tests/id:000018,src:000000,op:flip1,pos:9,+cov similarity index 100% rename from src/mint/afl-tests/id:000018,src:000000,op:flip1,pos:9,+cov rename to src/exchange/afl-tests/id:000018,src:000000,op:flip1,pos:9,+cov diff --git a/src/mint/afl-tests/id:000019,src:000000,op:flip1,pos:11 b/src/exchange/afl-tests/id:000019,src:000000,op:flip1,pos:11 similarity index 100% rename from src/mint/afl-tests/id:000019,src:000000,op:flip1,pos:11 rename to src/exchange/afl-tests/id:000019,src:000000,op:flip1,pos:11 diff --git a/src/mint/afl-tests/id:000019,src:000000,op:flip1,pos:19,+cov b/src/exchange/afl-tests/id:000019,src:000000,op:flip1,pos:19,+cov similarity index 100% rename from src/mint/afl-tests/id:000019,src:000000,op:flip1,pos:19,+cov rename to src/exchange/afl-tests/id:000019,src:000000,op:flip1,pos:19,+cov diff --git a/src/mint/afl-tests/id:000020,src:000000,op:flip1,pos:12,+cov b/src/exchange/afl-tests/id:000020,src:000000,op:flip1,pos:12,+cov similarity index 100% rename from src/mint/afl-tests/id:000020,src:000000,op:flip1,pos:12,+cov rename to src/exchange/afl-tests/id:000020,src:000000,op:flip1,pos:12,+cov diff --git a/src/mint/afl-tests/id:000020,src:000000,op:flip1,pos:19,+cov b/src/exchange/afl-tests/id:000020,src:000000,op:flip1,pos:19,+cov similarity index 100% rename from src/mint/afl-tests/id:000020,src:000000,op:flip1,pos:19,+cov rename to src/exchange/afl-tests/id:000020,src:000000,op:flip1,pos:19,+cov diff --git a/src/mint/afl-tests/id:000021,src:000000,op:flip1,pos:13,+cov b/src/exchange/afl-tests/id:000021,src:000000,op:flip1,pos:13,+cov similarity index 100% rename from src/mint/afl-tests/id:000021,src:000000,op:flip1,pos:13,+cov rename to src/exchange/afl-tests/id:000021,src:000000,op:flip1,pos:13,+cov diff --git a/src/mint/afl-tests/id:000021,src:000000,op:flip1,pos:21,+cov b/src/exchange/afl-tests/id:000021,src:000000,op:flip1,pos:21,+cov similarity index 100% rename from src/mint/afl-tests/id:000021,src:000000,op:flip1,pos:21,+cov rename to src/exchange/afl-tests/id:000021,src:000000,op:flip1,pos:21,+cov diff --git a/src/mint/afl-tests/id:000022,src:000000,op:flip1,pos:17,+cov b/src/exchange/afl-tests/id:000022,src:000000,op:flip1,pos:17,+cov similarity index 100% rename from src/mint/afl-tests/id:000022,src:000000,op:flip1,pos:17,+cov rename to src/exchange/afl-tests/id:000022,src:000000,op:flip1,pos:17,+cov diff --git a/src/mint/afl-tests/id:000022,src:000000,op:flip1,pos:23,+cov b/src/exchange/afl-tests/id:000022,src:000000,op:flip1,pos:23,+cov similarity index 100% rename from src/mint/afl-tests/id:000022,src:000000,op:flip1,pos:23,+cov rename to src/exchange/afl-tests/id:000022,src:000000,op:flip1,pos:23,+cov diff --git a/src/mint/afl-tests/id:000023,src:000000,op:flip1,pos:22,+cov b/src/exchange/afl-tests/id:000023,src:000000,op:flip1,pos:22,+cov similarity index 100% rename from src/mint/afl-tests/id:000023,src:000000,op:flip1,pos:22,+cov rename to src/exchange/afl-tests/id:000023,src:000000,op:flip1,pos:22,+cov diff --git a/src/mint/afl-tests/id:000023,src:000000,op:flip1,pos:24,+cov b/src/exchange/afl-tests/id:000023,src:000000,op:flip1,pos:24,+cov similarity index 100% rename from src/mint/afl-tests/id:000023,src:000000,op:flip1,pos:24,+cov rename to src/exchange/afl-tests/id:000023,src:000000,op:flip1,pos:24,+cov diff --git a/src/mint/afl-tests/id:000024,src:000000,op:flip1,pos:24,+cov b/src/exchange/afl-tests/id:000024,src:000000,op:flip1,pos:24,+cov similarity index 100% rename from src/mint/afl-tests/id:000024,src:000000,op:flip1,pos:24,+cov rename to src/exchange/afl-tests/id:000024,src:000000,op:flip1,pos:24,+cov diff --git a/src/mint/afl-tests/id:000025,src:000000,op:flip1,pos:24,+cov b/src/exchange/afl-tests/id:000025,src:000000,op:flip1,pos:24,+cov similarity index 100% rename from src/mint/afl-tests/id:000025,src:000000,op:flip1,pos:24,+cov rename to src/exchange/afl-tests/id:000025,src:000000,op:flip1,pos:24,+cov diff --git a/src/mint/afl-tests/id:000026,src:000000,op:flip1,pos:25,+cov b/src/exchange/afl-tests/id:000026,src:000000,op:flip1,pos:25,+cov similarity index 100% rename from src/mint/afl-tests/id:000026,src:000000,op:flip1,pos:25,+cov rename to src/exchange/afl-tests/id:000026,src:000000,op:flip1,pos:25,+cov diff --git a/src/mint/afl-tests/id:000027,src:000000,op:flip1,pos:26,+cov b/src/exchange/afl-tests/id:000027,src:000000,op:flip1,pos:26,+cov similarity index 100% rename from src/mint/afl-tests/id:000027,src:000000,op:flip1,pos:26,+cov rename to src/exchange/afl-tests/id:000027,src:000000,op:flip1,pos:26,+cov diff --git a/src/mint/afl-tests/id:000028,src:000000,op:flip1,pos:26,+cov b/src/exchange/afl-tests/id:000028,src:000000,op:flip1,pos:26,+cov similarity index 100% rename from src/mint/afl-tests/id:000028,src:000000,op:flip1,pos:26,+cov rename to src/exchange/afl-tests/id:000028,src:000000,op:flip1,pos:26,+cov diff --git a/src/mint/afl-tests/id:000029,src:000000,op:flip1,pos:26,+cov b/src/exchange/afl-tests/id:000029,src:000000,op:flip1,pos:26,+cov similarity index 100% rename from src/mint/afl-tests/id:000029,src:000000,op:flip1,pos:26,+cov rename to src/exchange/afl-tests/id:000029,src:000000,op:flip1,pos:26,+cov diff --git a/src/mint/afl-tests/id:000029,src:000000,op:flip1,pos:27,+cov b/src/exchange/afl-tests/id:000029,src:000000,op:flip1,pos:27,+cov similarity index 100% rename from src/mint/afl-tests/id:000029,src:000000,op:flip1,pos:27,+cov rename to src/exchange/afl-tests/id:000029,src:000000,op:flip1,pos:27,+cov diff --git a/src/mint/afl-tests/id:000030,src:000000,op:flip1,pos:27 b/src/exchange/afl-tests/id:000030,src:000000,op:flip1,pos:27 similarity index 100% rename from src/mint/afl-tests/id:000030,src:000000,op:flip1,pos:27 rename to src/exchange/afl-tests/id:000030,src:000000,op:flip1,pos:27 diff --git a/src/mint/afl-tests/id:000030,src:000000,op:flip1,pos:27,+cov b/src/exchange/afl-tests/id:000030,src:000000,op:flip1,pos:27,+cov similarity index 100% rename from src/mint/afl-tests/id:000030,src:000000,op:flip1,pos:27,+cov rename to src/exchange/afl-tests/id:000030,src:000000,op:flip1,pos:27,+cov diff --git a/src/mint/afl-tests/id:000031,src:000000,op:flip1,pos:27,+cov b/src/exchange/afl-tests/id:000031,src:000000,op:flip1,pos:27,+cov similarity index 100% rename from src/mint/afl-tests/id:000031,src:000000,op:flip1,pos:27,+cov rename to src/exchange/afl-tests/id:000031,src:000000,op:flip1,pos:27,+cov diff --git a/src/mint/afl-tests/id:000031,src:000000,op:flip1,pos:28,+cov b/src/exchange/afl-tests/id:000031,src:000000,op:flip1,pos:28,+cov similarity index 100% rename from src/mint/afl-tests/id:000031,src:000000,op:flip1,pos:28,+cov rename to src/exchange/afl-tests/id:000031,src:000000,op:flip1,pos:28,+cov diff --git a/src/mint/afl-tests/id:000032,src:000000,op:flip1,pos:28,+cov b/src/exchange/afl-tests/id:000032,src:000000,op:flip1,pos:28,+cov similarity index 100% rename from src/mint/afl-tests/id:000032,src:000000,op:flip1,pos:28,+cov rename to src/exchange/afl-tests/id:000032,src:000000,op:flip1,pos:28,+cov diff --git a/src/mint/afl-tests/id:000032,src:000000,op:flip1,pos:30,+cov b/src/exchange/afl-tests/id:000032,src:000000,op:flip1,pos:30,+cov similarity index 100% rename from src/mint/afl-tests/id:000032,src:000000,op:flip1,pos:30,+cov rename to src/exchange/afl-tests/id:000032,src:000000,op:flip1,pos:30,+cov diff --git a/src/mint/afl-tests/id:000033,src:000000,op:flip1,pos:28,+cov b/src/exchange/afl-tests/id:000033,src:000000,op:flip1,pos:28,+cov similarity index 100% rename from src/mint/afl-tests/id:000033,src:000000,op:flip1,pos:28,+cov rename to src/exchange/afl-tests/id:000033,src:000000,op:flip1,pos:28,+cov diff --git a/src/mint/afl-tests/id:000033,src:000000,op:flip1,pos:30,+cov b/src/exchange/afl-tests/id:000033,src:000000,op:flip1,pos:30,+cov similarity index 100% rename from src/mint/afl-tests/id:000033,src:000000,op:flip1,pos:30,+cov rename to src/exchange/afl-tests/id:000033,src:000000,op:flip1,pos:30,+cov diff --git a/src/mint/afl-tests/id:000034,src:000000,op:flip1,pos:28,+cov b/src/exchange/afl-tests/id:000034,src:000000,op:flip1,pos:28,+cov similarity index 100% rename from src/mint/afl-tests/id:000034,src:000000,op:flip1,pos:28,+cov rename to src/exchange/afl-tests/id:000034,src:000000,op:flip1,pos:28,+cov diff --git a/src/mint/afl-tests/id:000034,src:000000,op:flip1,pos:30,+cov b/src/exchange/afl-tests/id:000034,src:000000,op:flip1,pos:30,+cov similarity index 100% rename from src/mint/afl-tests/id:000034,src:000000,op:flip1,pos:30,+cov rename to src/exchange/afl-tests/id:000034,src:000000,op:flip1,pos:30,+cov diff --git a/src/mint/afl-tests/id:000035,src:000000,op:flip1,pos:30,+cov b/src/exchange/afl-tests/id:000035,src:000000,op:flip1,pos:30,+cov similarity index 100% rename from src/mint/afl-tests/id:000035,src:000000,op:flip1,pos:30,+cov rename to src/exchange/afl-tests/id:000035,src:000000,op:flip1,pos:30,+cov diff --git a/src/mint/afl-tests/id:000036,src:000000,op:flip1,pos:31,+cov b/src/exchange/afl-tests/id:000036,src:000000,op:flip1,pos:31,+cov similarity index 100% rename from src/mint/afl-tests/id:000036,src:000000,op:flip1,pos:31,+cov rename to src/exchange/afl-tests/id:000036,src:000000,op:flip1,pos:31,+cov diff --git a/src/mint/afl-tests/id:000037,src:000000,op:flip1,pos:32,+cov b/src/exchange/afl-tests/id:000037,src:000000,op:flip1,pos:32,+cov similarity index 100% rename from src/mint/afl-tests/id:000037,src:000000,op:flip1,pos:32,+cov rename to src/exchange/afl-tests/id:000037,src:000000,op:flip1,pos:32,+cov diff --git a/src/mint/afl-tests/id:000038,src:000000,op:flip1,pos:32 b/src/exchange/afl-tests/id:000038,src:000000,op:flip1,pos:32 similarity index 100% rename from src/mint/afl-tests/id:000038,src:000000,op:flip1,pos:32 rename to src/exchange/afl-tests/id:000038,src:000000,op:flip1,pos:32 diff --git a/src/mint/afl-tests/id:000038,src:000000,op:flip1,pos:32,+cov b/src/exchange/afl-tests/id:000038,src:000000,op:flip1,pos:32,+cov similarity index 100% rename from src/mint/afl-tests/id:000038,src:000000,op:flip1,pos:32,+cov rename to src/exchange/afl-tests/id:000038,src:000000,op:flip1,pos:32,+cov diff --git a/src/mint/afl-tests/id:000039,src:000000,op:flip1,pos:32,+cov b/src/exchange/afl-tests/id:000039,src:000000,op:flip1,pos:32,+cov similarity index 100% rename from src/mint/afl-tests/id:000039,src:000000,op:flip1,pos:32,+cov rename to src/exchange/afl-tests/id:000039,src:000000,op:flip1,pos:32,+cov diff --git a/src/mint/afl-tests/id:000039,src:000000,op:flip1,pos:34,+cov b/src/exchange/afl-tests/id:000039,src:000000,op:flip1,pos:34,+cov similarity index 100% rename from src/mint/afl-tests/id:000039,src:000000,op:flip1,pos:34,+cov rename to src/exchange/afl-tests/id:000039,src:000000,op:flip1,pos:34,+cov diff --git a/src/mint/afl-tests/id:000040,src:000000,op:flip1,pos:32,+cov b/src/exchange/afl-tests/id:000040,src:000000,op:flip1,pos:32,+cov similarity index 100% rename from src/mint/afl-tests/id:000040,src:000000,op:flip1,pos:32,+cov rename to src/exchange/afl-tests/id:000040,src:000000,op:flip1,pos:32,+cov diff --git a/src/mint/afl-tests/id:000040,src:000000,op:flip1,pos:34,+cov b/src/exchange/afl-tests/id:000040,src:000000,op:flip1,pos:34,+cov similarity index 100% rename from src/mint/afl-tests/id:000040,src:000000,op:flip1,pos:34,+cov rename to src/exchange/afl-tests/id:000040,src:000000,op:flip1,pos:34,+cov diff --git a/src/mint/afl-tests/id:000041,src:000000,op:flip1,pos:34,+cov b/src/exchange/afl-tests/id:000041,src:000000,op:flip1,pos:34,+cov similarity index 100% rename from src/mint/afl-tests/id:000041,src:000000,op:flip1,pos:34,+cov rename to src/exchange/afl-tests/id:000041,src:000000,op:flip1,pos:34,+cov diff --git a/src/mint/afl-tests/id:000041,src:000000,op:flip1,pos:36,+cov b/src/exchange/afl-tests/id:000041,src:000000,op:flip1,pos:36,+cov similarity index 100% rename from src/mint/afl-tests/id:000041,src:000000,op:flip1,pos:36,+cov rename to src/exchange/afl-tests/id:000041,src:000000,op:flip1,pos:36,+cov diff --git a/src/mint/afl-tests/id:000042,src:000000,op:flip1,pos:36,+cov b/src/exchange/afl-tests/id:000042,src:000000,op:flip1,pos:36,+cov similarity index 100% rename from src/mint/afl-tests/id:000042,src:000000,op:flip1,pos:36,+cov rename to src/exchange/afl-tests/id:000042,src:000000,op:flip1,pos:36,+cov diff --git a/src/mint/afl-tests/id:000043,src:000000,op:flip1,pos:37,+cov b/src/exchange/afl-tests/id:000043,src:000000,op:flip1,pos:37,+cov similarity index 100% rename from src/mint/afl-tests/id:000043,src:000000,op:flip1,pos:37,+cov rename to src/exchange/afl-tests/id:000043,src:000000,op:flip1,pos:37,+cov diff --git a/src/mint/afl-tests/id:000043,src:000000,op:flip1,pos:38 b/src/exchange/afl-tests/id:000043,src:000000,op:flip1,pos:38 similarity index 100% rename from src/mint/afl-tests/id:000043,src:000000,op:flip1,pos:38 rename to src/exchange/afl-tests/id:000043,src:000000,op:flip1,pos:38 diff --git a/src/mint/afl-tests/id:000044,src:000000,op:flip1,pos:38 b/src/exchange/afl-tests/id:000044,src:000000,op:flip1,pos:38 similarity index 100% rename from src/mint/afl-tests/id:000044,src:000000,op:flip1,pos:38 rename to src/exchange/afl-tests/id:000044,src:000000,op:flip1,pos:38 diff --git a/src/mint/afl-tests/id:000044,src:000000,op:flip1,pos:38,+cov b/src/exchange/afl-tests/id:000044,src:000000,op:flip1,pos:38,+cov similarity index 100% rename from src/mint/afl-tests/id:000044,src:000000,op:flip1,pos:38,+cov rename to src/exchange/afl-tests/id:000044,src:000000,op:flip1,pos:38,+cov diff --git a/src/mint/afl-tests/id:000045,src:000000,op:flip1,pos:38,+cov b/src/exchange/afl-tests/id:000045,src:000000,op:flip1,pos:38,+cov similarity index 100% rename from src/mint/afl-tests/id:000045,src:000000,op:flip1,pos:38,+cov rename to src/exchange/afl-tests/id:000045,src:000000,op:flip1,pos:38,+cov diff --git a/src/mint/afl-tests/id:000045,src:000000,op:flip1,pos:39,+cov b/src/exchange/afl-tests/id:000045,src:000000,op:flip1,pos:39,+cov similarity index 100% rename from src/mint/afl-tests/id:000045,src:000000,op:flip1,pos:39,+cov rename to src/exchange/afl-tests/id:000045,src:000000,op:flip1,pos:39,+cov diff --git a/src/mint/afl-tests/id:000046,src:000000,op:flip1,pos:39,+cov b/src/exchange/afl-tests/id:000046,src:000000,op:flip1,pos:39,+cov similarity index 100% rename from src/mint/afl-tests/id:000046,src:000000,op:flip1,pos:39,+cov rename to src/exchange/afl-tests/id:000046,src:000000,op:flip1,pos:39,+cov diff --git a/src/mint/afl-tests/id:000047,src:000000,op:flip1,pos:39 b/src/exchange/afl-tests/id:000047,src:000000,op:flip1,pos:39 similarity index 100% rename from src/mint/afl-tests/id:000047,src:000000,op:flip1,pos:39 rename to src/exchange/afl-tests/id:000047,src:000000,op:flip1,pos:39 diff --git a/src/mint/afl-tests/id:000047,src:000000,op:flip1,pos:39,+cov b/src/exchange/afl-tests/id:000047,src:000000,op:flip1,pos:39,+cov similarity index 100% rename from src/mint/afl-tests/id:000047,src:000000,op:flip1,pos:39,+cov rename to src/exchange/afl-tests/id:000047,src:000000,op:flip1,pos:39,+cov diff --git a/src/mint/afl-tests/id:000048,src:000000,op:flip1,pos:39,+cov b/src/exchange/afl-tests/id:000048,src:000000,op:flip1,pos:39,+cov similarity index 100% rename from src/mint/afl-tests/id:000048,src:000000,op:flip1,pos:39,+cov rename to src/exchange/afl-tests/id:000048,src:000000,op:flip1,pos:39,+cov diff --git a/src/mint/afl-tests/id:000048,src:000000,op:flip1,pos:40,+cov b/src/exchange/afl-tests/id:000048,src:000000,op:flip1,pos:40,+cov similarity index 100% rename from src/mint/afl-tests/id:000048,src:000000,op:flip1,pos:40,+cov rename to src/exchange/afl-tests/id:000048,src:000000,op:flip1,pos:40,+cov diff --git a/src/mint/afl-tests/id:000049,src:000000,op:flip1,pos:41,+cov b/src/exchange/afl-tests/id:000049,src:000000,op:flip1,pos:41,+cov similarity index 100% rename from src/mint/afl-tests/id:000049,src:000000,op:flip1,pos:41,+cov rename to src/exchange/afl-tests/id:000049,src:000000,op:flip1,pos:41,+cov diff --git a/src/mint/afl-tests/id:000050,src:000000,op:flip1,pos:41,+cov b/src/exchange/afl-tests/id:000050,src:000000,op:flip1,pos:41,+cov similarity index 100% rename from src/mint/afl-tests/id:000050,src:000000,op:flip1,pos:41,+cov rename to src/exchange/afl-tests/id:000050,src:000000,op:flip1,pos:41,+cov diff --git a/src/mint/afl-tests/id:000050,src:000000,op:flip1,pos:42,+cov b/src/exchange/afl-tests/id:000050,src:000000,op:flip1,pos:42,+cov similarity index 100% rename from src/mint/afl-tests/id:000050,src:000000,op:flip1,pos:42,+cov rename to src/exchange/afl-tests/id:000050,src:000000,op:flip1,pos:42,+cov diff --git a/src/mint/afl-tests/id:000051,src:000000,op:flip1,pos:41,+cov b/src/exchange/afl-tests/id:000051,src:000000,op:flip1,pos:41,+cov similarity index 100% rename from src/mint/afl-tests/id:000051,src:000000,op:flip1,pos:41,+cov rename to src/exchange/afl-tests/id:000051,src:000000,op:flip1,pos:41,+cov diff --git a/src/mint/afl-tests/id:000051,src:000000,op:flip1,pos:47,+cov b/src/exchange/afl-tests/id:000051,src:000000,op:flip1,pos:47,+cov similarity index 100% rename from src/mint/afl-tests/id:000051,src:000000,op:flip1,pos:47,+cov rename to src/exchange/afl-tests/id:000051,src:000000,op:flip1,pos:47,+cov diff --git a/src/mint/afl-tests/id:000052,src:000000,op:flip1,pos:42,+cov b/src/exchange/afl-tests/id:000052,src:000000,op:flip1,pos:42,+cov similarity index 100% rename from src/mint/afl-tests/id:000052,src:000000,op:flip1,pos:42,+cov rename to src/exchange/afl-tests/id:000052,src:000000,op:flip1,pos:42,+cov diff --git a/src/mint/afl-tests/id:000052,src:000000,op:flip1,pos:47,+cov b/src/exchange/afl-tests/id:000052,src:000000,op:flip1,pos:47,+cov similarity index 100% rename from src/mint/afl-tests/id:000052,src:000000,op:flip1,pos:47,+cov rename to src/exchange/afl-tests/id:000052,src:000000,op:flip1,pos:47,+cov diff --git a/src/mint/afl-tests/id:000053,src:000000,op:flip1,pos:42,+cov b/src/exchange/afl-tests/id:000053,src:000000,op:flip1,pos:42,+cov similarity index 100% rename from src/mint/afl-tests/id:000053,src:000000,op:flip1,pos:42,+cov rename to src/exchange/afl-tests/id:000053,src:000000,op:flip1,pos:42,+cov diff --git a/src/mint/afl-tests/id:000053,src:000000,op:flip1,pos:47,+cov b/src/exchange/afl-tests/id:000053,src:000000,op:flip1,pos:47,+cov similarity index 100% rename from src/mint/afl-tests/id:000053,src:000000,op:flip1,pos:47,+cov rename to src/exchange/afl-tests/id:000053,src:000000,op:flip1,pos:47,+cov diff --git a/src/mint/afl-tests/id:000054,src:000000,op:flip1,pos:43,+cov b/src/exchange/afl-tests/id:000054,src:000000,op:flip1,pos:43,+cov similarity index 100% rename from src/mint/afl-tests/id:000054,src:000000,op:flip1,pos:43,+cov rename to src/exchange/afl-tests/id:000054,src:000000,op:flip1,pos:43,+cov diff --git a/src/mint/afl-tests/id:000054,src:000000,op:flip1,pos:49,+cov b/src/exchange/afl-tests/id:000054,src:000000,op:flip1,pos:49,+cov similarity index 100% rename from src/mint/afl-tests/id:000054,src:000000,op:flip1,pos:49,+cov rename to src/exchange/afl-tests/id:000054,src:000000,op:flip1,pos:49,+cov diff --git a/src/mint/afl-tests/id:000055,src:000000,op:flip1,pos:43,+cov b/src/exchange/afl-tests/id:000055,src:000000,op:flip1,pos:43,+cov similarity index 100% rename from src/mint/afl-tests/id:000055,src:000000,op:flip1,pos:43,+cov rename to src/exchange/afl-tests/id:000055,src:000000,op:flip1,pos:43,+cov diff --git a/src/mint/afl-tests/id:000055,src:000000,op:flip1,pos:52,+cov b/src/exchange/afl-tests/id:000055,src:000000,op:flip1,pos:52,+cov similarity index 100% rename from src/mint/afl-tests/id:000055,src:000000,op:flip1,pos:52,+cov rename to src/exchange/afl-tests/id:000055,src:000000,op:flip1,pos:52,+cov diff --git a/src/mint/afl-tests/id:000056,src:000000,op:flip1,pos:44,+cov b/src/exchange/afl-tests/id:000056,src:000000,op:flip1,pos:44,+cov similarity index 100% rename from src/mint/afl-tests/id:000056,src:000000,op:flip1,pos:44,+cov rename to src/exchange/afl-tests/id:000056,src:000000,op:flip1,pos:44,+cov diff --git a/src/mint/afl-tests/id:000056,src:000000,op:flip1,pos:52,+cov b/src/exchange/afl-tests/id:000056,src:000000,op:flip1,pos:52,+cov similarity index 100% rename from src/mint/afl-tests/id:000056,src:000000,op:flip1,pos:52,+cov rename to src/exchange/afl-tests/id:000056,src:000000,op:flip1,pos:52,+cov diff --git a/src/mint/afl-tests/id:000057,src:000000,op:flip1,pos:47,+cov b/src/exchange/afl-tests/id:000057,src:000000,op:flip1,pos:47,+cov similarity index 100% rename from src/mint/afl-tests/id:000057,src:000000,op:flip1,pos:47,+cov rename to src/exchange/afl-tests/id:000057,src:000000,op:flip1,pos:47,+cov diff --git a/src/mint/afl-tests/id:000057,src:000000,op:flip1,pos:54,+cov b/src/exchange/afl-tests/id:000057,src:000000,op:flip1,pos:54,+cov similarity index 100% rename from src/mint/afl-tests/id:000057,src:000000,op:flip1,pos:54,+cov rename to src/exchange/afl-tests/id:000057,src:000000,op:flip1,pos:54,+cov diff --git a/src/mint/afl-tests/id:000058,src:000000,op:flip1,pos:47,+cov b/src/exchange/afl-tests/id:000058,src:000000,op:flip1,pos:47,+cov similarity index 100% rename from src/mint/afl-tests/id:000058,src:000000,op:flip1,pos:47,+cov rename to src/exchange/afl-tests/id:000058,src:000000,op:flip1,pos:47,+cov diff --git a/src/mint/afl-tests/id:000058,src:000000,op:flip1,pos:54,+cov b/src/exchange/afl-tests/id:000058,src:000000,op:flip1,pos:54,+cov similarity index 100% rename from src/mint/afl-tests/id:000058,src:000000,op:flip1,pos:54,+cov rename to src/exchange/afl-tests/id:000058,src:000000,op:flip1,pos:54,+cov diff --git a/src/mint/afl-tests/id:000059,src:000000,op:flip1,pos:48,+cov b/src/exchange/afl-tests/id:000059,src:000000,op:flip1,pos:48,+cov similarity index 100% rename from src/mint/afl-tests/id:000059,src:000000,op:flip1,pos:48,+cov rename to src/exchange/afl-tests/id:000059,src:000000,op:flip1,pos:48,+cov diff --git a/src/mint/afl-tests/id:000059,src:000000,op:flip1,pos:55,+cov b/src/exchange/afl-tests/id:000059,src:000000,op:flip1,pos:55,+cov similarity index 100% rename from src/mint/afl-tests/id:000059,src:000000,op:flip1,pos:55,+cov rename to src/exchange/afl-tests/id:000059,src:000000,op:flip1,pos:55,+cov diff --git a/src/mint/afl-tests/id:000060,src:000000,op:flip1,pos:49,+cov b/src/exchange/afl-tests/id:000060,src:000000,op:flip1,pos:49,+cov similarity index 100% rename from src/mint/afl-tests/id:000060,src:000000,op:flip1,pos:49,+cov rename to src/exchange/afl-tests/id:000060,src:000000,op:flip1,pos:49,+cov diff --git a/src/mint/afl-tests/id:000060,src:000000,op:flip1,pos:56,+cov b/src/exchange/afl-tests/id:000060,src:000000,op:flip1,pos:56,+cov similarity index 100% rename from src/mint/afl-tests/id:000060,src:000000,op:flip1,pos:56,+cov rename to src/exchange/afl-tests/id:000060,src:000000,op:flip1,pos:56,+cov diff --git a/src/mint/afl-tests/id:000061,src:000000,op:flip1,pos:50,+cov b/src/exchange/afl-tests/id:000061,src:000000,op:flip1,pos:50,+cov similarity index 100% rename from src/mint/afl-tests/id:000061,src:000000,op:flip1,pos:50,+cov rename to src/exchange/afl-tests/id:000061,src:000000,op:flip1,pos:50,+cov diff --git a/src/mint/afl-tests/id:000061,src:000000,op:flip1,pos:59,+cov b/src/exchange/afl-tests/id:000061,src:000000,op:flip1,pos:59,+cov similarity index 100% rename from src/mint/afl-tests/id:000061,src:000000,op:flip1,pos:59,+cov rename to src/exchange/afl-tests/id:000061,src:000000,op:flip1,pos:59,+cov diff --git a/src/mint/afl-tests/id:000062,src:000000,op:flip1,pos:51,+cov b/src/exchange/afl-tests/id:000062,src:000000,op:flip1,pos:51,+cov similarity index 100% rename from src/mint/afl-tests/id:000062,src:000000,op:flip1,pos:51,+cov rename to src/exchange/afl-tests/id:000062,src:000000,op:flip1,pos:51,+cov diff --git a/src/mint/afl-tests/id:000062,src:000000,op:flip1,pos:60,+cov b/src/exchange/afl-tests/id:000062,src:000000,op:flip1,pos:60,+cov similarity index 100% rename from src/mint/afl-tests/id:000062,src:000000,op:flip1,pos:60,+cov rename to src/exchange/afl-tests/id:000062,src:000000,op:flip1,pos:60,+cov diff --git a/src/mint/afl-tests/id:000063,src:000000,op:flip1,pos:54 b/src/exchange/afl-tests/id:000063,src:000000,op:flip1,pos:54 similarity index 100% rename from src/mint/afl-tests/id:000063,src:000000,op:flip1,pos:54 rename to src/exchange/afl-tests/id:000063,src:000000,op:flip1,pos:54 diff --git a/src/mint/afl-tests/id:000063,src:000000,op:flip1,pos:61,+cov b/src/exchange/afl-tests/id:000063,src:000000,op:flip1,pos:61,+cov similarity index 100% rename from src/mint/afl-tests/id:000063,src:000000,op:flip1,pos:61,+cov rename to src/exchange/afl-tests/id:000063,src:000000,op:flip1,pos:61,+cov diff --git a/src/mint/afl-tests/id:000064,src:000000,op:flip1,pos:55,+cov b/src/exchange/afl-tests/id:000064,src:000000,op:flip1,pos:55,+cov similarity index 100% rename from src/mint/afl-tests/id:000064,src:000000,op:flip1,pos:55,+cov rename to src/exchange/afl-tests/id:000064,src:000000,op:flip1,pos:55,+cov diff --git a/src/mint/afl-tests/id:000064,src:000000,op:flip1,pos:62,+cov b/src/exchange/afl-tests/id:000064,src:000000,op:flip1,pos:62,+cov similarity index 100% rename from src/mint/afl-tests/id:000064,src:000000,op:flip1,pos:62,+cov rename to src/exchange/afl-tests/id:000064,src:000000,op:flip1,pos:62,+cov diff --git a/src/mint/afl-tests/id:000065,src:000000,op:flip1,pos:55,+cov b/src/exchange/afl-tests/id:000065,src:000000,op:flip1,pos:55,+cov similarity index 100% rename from src/mint/afl-tests/id:000065,src:000000,op:flip1,pos:55,+cov rename to src/exchange/afl-tests/id:000065,src:000000,op:flip1,pos:55,+cov diff --git a/src/mint/afl-tests/id:000065,src:000000,op:flip1,pos:63,+cov b/src/exchange/afl-tests/id:000065,src:000000,op:flip1,pos:63,+cov similarity index 100% rename from src/mint/afl-tests/id:000065,src:000000,op:flip1,pos:63,+cov rename to src/exchange/afl-tests/id:000065,src:000000,op:flip1,pos:63,+cov diff --git a/src/mint/afl-tests/id:000066,src:000000,op:flip1,pos:56,+cov b/src/exchange/afl-tests/id:000066,src:000000,op:flip1,pos:56,+cov similarity index 100% rename from src/mint/afl-tests/id:000066,src:000000,op:flip1,pos:56,+cov rename to src/exchange/afl-tests/id:000066,src:000000,op:flip1,pos:56,+cov diff --git a/src/mint/afl-tests/id:000066,src:000000,op:flip1,pos:63,+cov b/src/exchange/afl-tests/id:000066,src:000000,op:flip1,pos:63,+cov similarity index 100% rename from src/mint/afl-tests/id:000066,src:000000,op:flip1,pos:63,+cov rename to src/exchange/afl-tests/id:000066,src:000000,op:flip1,pos:63,+cov diff --git a/src/mint/afl-tests/id:000067,src:000000,op:flip1,pos:58,+cov b/src/exchange/afl-tests/id:000067,src:000000,op:flip1,pos:58,+cov similarity index 100% rename from src/mint/afl-tests/id:000067,src:000000,op:flip1,pos:58,+cov rename to src/exchange/afl-tests/id:000067,src:000000,op:flip1,pos:58,+cov diff --git a/src/mint/afl-tests/id:000067,src:000000,op:flip1,pos:65,+cov b/src/exchange/afl-tests/id:000067,src:000000,op:flip1,pos:65,+cov similarity index 100% rename from src/mint/afl-tests/id:000067,src:000000,op:flip1,pos:65,+cov rename to src/exchange/afl-tests/id:000067,src:000000,op:flip1,pos:65,+cov diff --git a/src/mint/afl-tests/id:000068,src:000000,op:flip1,pos:60,+cov b/src/exchange/afl-tests/id:000068,src:000000,op:flip1,pos:60,+cov similarity index 100% rename from src/mint/afl-tests/id:000068,src:000000,op:flip1,pos:60,+cov rename to src/exchange/afl-tests/id:000068,src:000000,op:flip1,pos:60,+cov diff --git a/src/mint/afl-tests/id:000068,src:000000,op:flip1,pos:66,+cov b/src/exchange/afl-tests/id:000068,src:000000,op:flip1,pos:66,+cov similarity index 100% rename from src/mint/afl-tests/id:000068,src:000000,op:flip1,pos:66,+cov rename to src/exchange/afl-tests/id:000068,src:000000,op:flip1,pos:66,+cov diff --git a/src/mint/afl-tests/id:000069,src:000000,op:flip1,pos:61,+cov b/src/exchange/afl-tests/id:000069,src:000000,op:flip1,pos:61,+cov similarity index 100% rename from src/mint/afl-tests/id:000069,src:000000,op:flip1,pos:61,+cov rename to src/exchange/afl-tests/id:000069,src:000000,op:flip1,pos:61,+cov diff --git a/src/mint/afl-tests/id:000069,src:000000,op:flip1,pos:67,+cov b/src/exchange/afl-tests/id:000069,src:000000,op:flip1,pos:67,+cov similarity index 100% rename from src/mint/afl-tests/id:000069,src:000000,op:flip1,pos:67,+cov rename to src/exchange/afl-tests/id:000069,src:000000,op:flip1,pos:67,+cov diff --git a/src/mint/afl-tests/id:000070,src:000000,op:flip1,pos:62,+cov b/src/exchange/afl-tests/id:000070,src:000000,op:flip1,pos:62,+cov similarity index 100% rename from src/mint/afl-tests/id:000070,src:000000,op:flip1,pos:62,+cov rename to src/exchange/afl-tests/id:000070,src:000000,op:flip1,pos:62,+cov diff --git a/src/mint/afl-tests/id:000070,src:000000,op:flip1,pos:69,+cov b/src/exchange/afl-tests/id:000070,src:000000,op:flip1,pos:69,+cov similarity index 100% rename from src/mint/afl-tests/id:000070,src:000000,op:flip1,pos:69,+cov rename to src/exchange/afl-tests/id:000070,src:000000,op:flip1,pos:69,+cov diff --git a/src/mint/afl-tests/id:000071,src:000000,op:flip1,pos:62,+cov b/src/exchange/afl-tests/id:000071,src:000000,op:flip1,pos:62,+cov similarity index 100% rename from src/mint/afl-tests/id:000071,src:000000,op:flip1,pos:62,+cov rename to src/exchange/afl-tests/id:000071,src:000000,op:flip1,pos:62,+cov diff --git a/src/mint/afl-tests/id:000071,src:000000,op:flip1,pos:74,+cov b/src/exchange/afl-tests/id:000071,src:000000,op:flip1,pos:74,+cov similarity index 100% rename from src/mint/afl-tests/id:000071,src:000000,op:flip1,pos:74,+cov rename to src/exchange/afl-tests/id:000071,src:000000,op:flip1,pos:74,+cov diff --git a/src/mint/afl-tests/id:000072,src:000000,op:flip1,pos:63,+cov b/src/exchange/afl-tests/id:000072,src:000000,op:flip1,pos:63,+cov similarity index 100% rename from src/mint/afl-tests/id:000072,src:000000,op:flip1,pos:63,+cov rename to src/exchange/afl-tests/id:000072,src:000000,op:flip1,pos:63,+cov diff --git a/src/mint/afl-tests/id:000072,src:000000,op:flip1,pos:76,+cov b/src/exchange/afl-tests/id:000072,src:000000,op:flip1,pos:76,+cov similarity index 100% rename from src/mint/afl-tests/id:000072,src:000000,op:flip1,pos:76,+cov rename to src/exchange/afl-tests/id:000072,src:000000,op:flip1,pos:76,+cov diff --git a/src/mint/afl-tests/id:000073,src:000000,op:flip1,pos:64,+cov b/src/exchange/afl-tests/id:000073,src:000000,op:flip1,pos:64,+cov similarity index 100% rename from src/mint/afl-tests/id:000073,src:000000,op:flip1,pos:64,+cov rename to src/exchange/afl-tests/id:000073,src:000000,op:flip1,pos:64,+cov diff --git a/src/mint/afl-tests/id:000073,src:000000,op:flip1,pos:81,+cov b/src/exchange/afl-tests/id:000073,src:000000,op:flip1,pos:81,+cov similarity index 100% rename from src/mint/afl-tests/id:000073,src:000000,op:flip1,pos:81,+cov rename to src/exchange/afl-tests/id:000073,src:000000,op:flip1,pos:81,+cov diff --git a/src/mint/afl-tests/id:000074,src:000000,op:flip1,pos:65,+cov b/src/exchange/afl-tests/id:000074,src:000000,op:flip1,pos:65,+cov similarity index 100% rename from src/mint/afl-tests/id:000074,src:000000,op:flip1,pos:65,+cov rename to src/exchange/afl-tests/id:000074,src:000000,op:flip1,pos:65,+cov diff --git a/src/mint/afl-tests/id:000074,src:000000,op:flip1,pos:82,+cov b/src/exchange/afl-tests/id:000074,src:000000,op:flip1,pos:82,+cov similarity index 100% rename from src/mint/afl-tests/id:000074,src:000000,op:flip1,pos:82,+cov rename to src/exchange/afl-tests/id:000074,src:000000,op:flip1,pos:82,+cov diff --git a/src/mint/afl-tests/id:000075,src:000000,op:flip1,pos:71,+cov b/src/exchange/afl-tests/id:000075,src:000000,op:flip1,pos:71,+cov similarity index 100% rename from src/mint/afl-tests/id:000075,src:000000,op:flip1,pos:71,+cov rename to src/exchange/afl-tests/id:000075,src:000000,op:flip1,pos:71,+cov diff --git a/src/mint/afl-tests/id:000075,src:000000,op:flip1,pos:82,+cov b/src/exchange/afl-tests/id:000075,src:000000,op:flip1,pos:82,+cov similarity index 100% rename from src/mint/afl-tests/id:000075,src:000000,op:flip1,pos:82,+cov rename to src/exchange/afl-tests/id:000075,src:000000,op:flip1,pos:82,+cov diff --git a/src/mint/afl-tests/id:000076,src:000000,op:flip1,pos:71 b/src/exchange/afl-tests/id:000076,src:000000,op:flip1,pos:71 similarity index 100% rename from src/mint/afl-tests/id:000076,src:000000,op:flip1,pos:71 rename to src/exchange/afl-tests/id:000076,src:000000,op:flip1,pos:71 diff --git a/src/mint/afl-tests/id:000076,src:000000,op:flip1,pos:83,+cov b/src/exchange/afl-tests/id:000076,src:000000,op:flip1,pos:83,+cov similarity index 100% rename from src/mint/afl-tests/id:000076,src:000000,op:flip1,pos:83,+cov rename to src/exchange/afl-tests/id:000076,src:000000,op:flip1,pos:83,+cov diff --git a/src/mint/afl-tests/id:000077,src:000000,op:flip1,pos:72,+cov b/src/exchange/afl-tests/id:000077,src:000000,op:flip1,pos:72,+cov similarity index 100% rename from src/mint/afl-tests/id:000077,src:000000,op:flip1,pos:72,+cov rename to src/exchange/afl-tests/id:000077,src:000000,op:flip1,pos:72,+cov diff --git a/src/mint/afl-tests/id:000077,src:000000,op:flip1,pos:85,+cov b/src/exchange/afl-tests/id:000077,src:000000,op:flip1,pos:85,+cov similarity index 100% rename from src/mint/afl-tests/id:000077,src:000000,op:flip1,pos:85,+cov rename to src/exchange/afl-tests/id:000077,src:000000,op:flip1,pos:85,+cov diff --git a/src/mint/afl-tests/id:000078,src:000000,op:flip1,pos:73,+cov b/src/exchange/afl-tests/id:000078,src:000000,op:flip1,pos:73,+cov similarity index 100% rename from src/mint/afl-tests/id:000078,src:000000,op:flip1,pos:73,+cov rename to src/exchange/afl-tests/id:000078,src:000000,op:flip1,pos:73,+cov diff --git a/src/mint/afl-tests/id:000078,src:000000,op:flip1,pos:87,+cov b/src/exchange/afl-tests/id:000078,src:000000,op:flip1,pos:87,+cov similarity index 100% rename from src/mint/afl-tests/id:000078,src:000000,op:flip1,pos:87,+cov rename to src/exchange/afl-tests/id:000078,src:000000,op:flip1,pos:87,+cov diff --git a/src/mint/afl-tests/id:000079,src:000000,op:flip1,pos:74,+cov b/src/exchange/afl-tests/id:000079,src:000000,op:flip1,pos:74,+cov similarity index 100% rename from src/mint/afl-tests/id:000079,src:000000,op:flip1,pos:74,+cov rename to src/exchange/afl-tests/id:000079,src:000000,op:flip1,pos:74,+cov diff --git a/src/mint/afl-tests/id:000079,src:000000,op:flip1,pos:87,+cov b/src/exchange/afl-tests/id:000079,src:000000,op:flip1,pos:87,+cov similarity index 100% rename from src/mint/afl-tests/id:000079,src:000000,op:flip1,pos:87,+cov rename to src/exchange/afl-tests/id:000079,src:000000,op:flip1,pos:87,+cov diff --git a/src/mint/afl-tests/id:000080,src:000000,op:flip1,pos:75,+cov b/src/exchange/afl-tests/id:000080,src:000000,op:flip1,pos:75,+cov similarity index 100% rename from src/mint/afl-tests/id:000080,src:000000,op:flip1,pos:75,+cov rename to src/exchange/afl-tests/id:000080,src:000000,op:flip1,pos:75,+cov diff --git a/src/mint/afl-tests/id:000080,src:000000,op:flip1,pos:87,+cov b/src/exchange/afl-tests/id:000080,src:000000,op:flip1,pos:87,+cov similarity index 100% rename from src/mint/afl-tests/id:000080,src:000000,op:flip1,pos:87,+cov rename to src/exchange/afl-tests/id:000080,src:000000,op:flip1,pos:87,+cov diff --git a/src/mint/afl-tests/id:000081,src:000000,op:flip1,pos:75,+cov b/src/exchange/afl-tests/id:000081,src:000000,op:flip1,pos:75,+cov similarity index 100% rename from src/mint/afl-tests/id:000081,src:000000,op:flip1,pos:75,+cov rename to src/exchange/afl-tests/id:000081,src:000000,op:flip1,pos:75,+cov diff --git a/src/mint/afl-tests/id:000081,src:000000,op:flip1,pos:90,+cov b/src/exchange/afl-tests/id:000081,src:000000,op:flip1,pos:90,+cov similarity index 100% rename from src/mint/afl-tests/id:000081,src:000000,op:flip1,pos:90,+cov rename to src/exchange/afl-tests/id:000081,src:000000,op:flip1,pos:90,+cov diff --git a/src/mint/afl-tests/id:000082,src:000000,op:flip1,pos:76,+cov b/src/exchange/afl-tests/id:000082,src:000000,op:flip1,pos:76,+cov similarity index 100% rename from src/mint/afl-tests/id:000082,src:000000,op:flip1,pos:76,+cov rename to src/exchange/afl-tests/id:000082,src:000000,op:flip1,pos:76,+cov diff --git a/src/mint/afl-tests/id:000082,src:000000,op:flip1,pos:92,+cov b/src/exchange/afl-tests/id:000082,src:000000,op:flip1,pos:92,+cov similarity index 100% rename from src/mint/afl-tests/id:000082,src:000000,op:flip1,pos:92,+cov rename to src/exchange/afl-tests/id:000082,src:000000,op:flip1,pos:92,+cov diff --git a/src/mint/afl-tests/id:000083,src:000000,op:flip1,pos:78,+cov b/src/exchange/afl-tests/id:000083,src:000000,op:flip1,pos:78,+cov similarity index 100% rename from src/mint/afl-tests/id:000083,src:000000,op:flip1,pos:78,+cov rename to src/exchange/afl-tests/id:000083,src:000000,op:flip1,pos:78,+cov diff --git a/src/mint/afl-tests/id:000083,src:000000,op:flip1,pos:93,+cov b/src/exchange/afl-tests/id:000083,src:000000,op:flip1,pos:93,+cov similarity index 100% rename from src/mint/afl-tests/id:000083,src:000000,op:flip1,pos:93,+cov rename to src/exchange/afl-tests/id:000083,src:000000,op:flip1,pos:93,+cov diff --git a/src/mint/afl-tests/id:000084,src:000000,op:flip1,pos:80,+cov b/src/exchange/afl-tests/id:000084,src:000000,op:flip1,pos:80,+cov similarity index 100% rename from src/mint/afl-tests/id:000084,src:000000,op:flip1,pos:80,+cov rename to src/exchange/afl-tests/id:000084,src:000000,op:flip1,pos:80,+cov diff --git a/src/mint/afl-tests/id:000084,src:000000,op:flip1,pos:95,+cov b/src/exchange/afl-tests/id:000084,src:000000,op:flip1,pos:95,+cov similarity index 100% rename from src/mint/afl-tests/id:000084,src:000000,op:flip1,pos:95,+cov rename to src/exchange/afl-tests/id:000084,src:000000,op:flip1,pos:95,+cov diff --git a/src/mint/afl-tests/id:000085,src:000000,op:flip1,pos:80,+cov b/src/exchange/afl-tests/id:000085,src:000000,op:flip1,pos:80,+cov similarity index 100% rename from src/mint/afl-tests/id:000085,src:000000,op:flip1,pos:80,+cov rename to src/exchange/afl-tests/id:000085,src:000000,op:flip1,pos:80,+cov diff --git a/src/mint/afl-tests/id:000085,src:000000,op:flip1,pos:95,+cov b/src/exchange/afl-tests/id:000085,src:000000,op:flip1,pos:95,+cov similarity index 100% rename from src/mint/afl-tests/id:000085,src:000000,op:flip1,pos:95,+cov rename to src/exchange/afl-tests/id:000085,src:000000,op:flip1,pos:95,+cov diff --git a/src/mint/afl-tests/id:000086,src:000000,op:flip1,pos:81,+cov b/src/exchange/afl-tests/id:000086,src:000000,op:flip1,pos:81,+cov similarity index 100% rename from src/mint/afl-tests/id:000086,src:000000,op:flip1,pos:81,+cov rename to src/exchange/afl-tests/id:000086,src:000000,op:flip1,pos:81,+cov diff --git a/src/mint/afl-tests/id:000086,src:000000,op:flip1,pos:96,+cov b/src/exchange/afl-tests/id:000086,src:000000,op:flip1,pos:96,+cov similarity index 100% rename from src/mint/afl-tests/id:000086,src:000000,op:flip1,pos:96,+cov rename to src/exchange/afl-tests/id:000086,src:000000,op:flip1,pos:96,+cov diff --git a/src/mint/afl-tests/id:000087,src:000000,op:flip1,pos:82,+cov b/src/exchange/afl-tests/id:000087,src:000000,op:flip1,pos:82,+cov similarity index 100% rename from src/mint/afl-tests/id:000087,src:000000,op:flip1,pos:82,+cov rename to src/exchange/afl-tests/id:000087,src:000000,op:flip1,pos:82,+cov diff --git a/src/mint/afl-tests/id:000087,src:000000,op:flip1,pos:96,+cov b/src/exchange/afl-tests/id:000087,src:000000,op:flip1,pos:96,+cov similarity index 100% rename from src/mint/afl-tests/id:000087,src:000000,op:flip1,pos:96,+cov rename to src/exchange/afl-tests/id:000087,src:000000,op:flip1,pos:96,+cov diff --git a/src/mint/afl-tests/id:000088,src:000000,op:flip1,pos:100,+cov b/src/exchange/afl-tests/id:000088,src:000000,op:flip1,pos:100,+cov similarity index 100% rename from src/mint/afl-tests/id:000088,src:000000,op:flip1,pos:100,+cov rename to src/exchange/afl-tests/id:000088,src:000000,op:flip1,pos:100,+cov diff --git a/src/mint/afl-tests/id:000088,src:000000,op:flip1,pos:82,+cov b/src/exchange/afl-tests/id:000088,src:000000,op:flip1,pos:82,+cov similarity index 100% rename from src/mint/afl-tests/id:000088,src:000000,op:flip1,pos:82,+cov rename to src/exchange/afl-tests/id:000088,src:000000,op:flip1,pos:82,+cov diff --git a/src/mint/afl-tests/id:000089,src:000000,op:flip1,pos:105 b/src/exchange/afl-tests/id:000089,src:000000,op:flip1,pos:105 similarity index 100% rename from src/mint/afl-tests/id:000089,src:000000,op:flip1,pos:105 rename to src/exchange/afl-tests/id:000089,src:000000,op:flip1,pos:105 diff --git a/src/mint/afl-tests/id:000089,src:000000,op:flip1,pos:84,+cov b/src/exchange/afl-tests/id:000089,src:000000,op:flip1,pos:84,+cov similarity index 100% rename from src/mint/afl-tests/id:000089,src:000000,op:flip1,pos:84,+cov rename to src/exchange/afl-tests/id:000089,src:000000,op:flip1,pos:84,+cov diff --git a/src/mint/afl-tests/id:000090,src:000000,op:flip1,pos:113,+cov b/src/exchange/afl-tests/id:000090,src:000000,op:flip1,pos:113,+cov similarity index 100% rename from src/mint/afl-tests/id:000090,src:000000,op:flip1,pos:113,+cov rename to src/exchange/afl-tests/id:000090,src:000000,op:flip1,pos:113,+cov diff --git a/src/mint/afl-tests/id:000090,src:000000,op:flip1,pos:84,+cov b/src/exchange/afl-tests/id:000090,src:000000,op:flip1,pos:84,+cov similarity index 100% rename from src/mint/afl-tests/id:000090,src:000000,op:flip1,pos:84,+cov rename to src/exchange/afl-tests/id:000090,src:000000,op:flip1,pos:84,+cov diff --git a/src/mint/afl-tests/id:000091,src:000000,op:flip1,pos:114,+cov b/src/exchange/afl-tests/id:000091,src:000000,op:flip1,pos:114,+cov similarity index 100% rename from src/mint/afl-tests/id:000091,src:000000,op:flip1,pos:114,+cov rename to src/exchange/afl-tests/id:000091,src:000000,op:flip1,pos:114,+cov diff --git a/src/mint/afl-tests/id:000091,src:000000,op:flip1,pos:91,+cov b/src/exchange/afl-tests/id:000091,src:000000,op:flip1,pos:91,+cov similarity index 100% rename from src/mint/afl-tests/id:000091,src:000000,op:flip1,pos:91,+cov rename to src/exchange/afl-tests/id:000091,src:000000,op:flip1,pos:91,+cov diff --git a/src/mint/afl-tests/id:000092,src:000000,op:flip1,pos:121,+cov b/src/exchange/afl-tests/id:000092,src:000000,op:flip1,pos:121,+cov similarity index 100% rename from src/mint/afl-tests/id:000092,src:000000,op:flip1,pos:121,+cov rename to src/exchange/afl-tests/id:000092,src:000000,op:flip1,pos:121,+cov diff --git a/src/mint/afl-tests/id:000092,src:000000,op:flip1,pos:92,+cov b/src/exchange/afl-tests/id:000092,src:000000,op:flip1,pos:92,+cov similarity index 100% rename from src/mint/afl-tests/id:000092,src:000000,op:flip1,pos:92,+cov rename to src/exchange/afl-tests/id:000092,src:000000,op:flip1,pos:92,+cov diff --git a/src/mint/afl-tests/id:000093,src:000000,op:flip1,pos:123,+cov b/src/exchange/afl-tests/id:000093,src:000000,op:flip1,pos:123,+cov similarity index 100% rename from src/mint/afl-tests/id:000093,src:000000,op:flip1,pos:123,+cov rename to src/exchange/afl-tests/id:000093,src:000000,op:flip1,pos:123,+cov diff --git a/src/mint/afl-tests/id:000093,src:000000,op:flip1,pos:93,+cov b/src/exchange/afl-tests/id:000093,src:000000,op:flip1,pos:93,+cov similarity index 100% rename from src/mint/afl-tests/id:000093,src:000000,op:flip1,pos:93,+cov rename to src/exchange/afl-tests/id:000093,src:000000,op:flip1,pos:93,+cov diff --git a/src/mint/afl-tests/id:000094,src:000000,op:flip1,pos:126,+cov b/src/exchange/afl-tests/id:000094,src:000000,op:flip1,pos:126,+cov similarity index 100% rename from src/mint/afl-tests/id:000094,src:000000,op:flip1,pos:126,+cov rename to src/exchange/afl-tests/id:000094,src:000000,op:flip1,pos:126,+cov diff --git a/src/mint/afl-tests/id:000094,src:000000,op:flip1,pos:95,+cov b/src/exchange/afl-tests/id:000094,src:000000,op:flip1,pos:95,+cov similarity index 100% rename from src/mint/afl-tests/id:000094,src:000000,op:flip1,pos:95,+cov rename to src/exchange/afl-tests/id:000094,src:000000,op:flip1,pos:95,+cov diff --git a/src/mint/afl-tests/id:000095,src:000000,op:flip1,pos:135,+cov b/src/exchange/afl-tests/id:000095,src:000000,op:flip1,pos:135,+cov similarity index 100% rename from src/mint/afl-tests/id:000095,src:000000,op:flip1,pos:135,+cov rename to src/exchange/afl-tests/id:000095,src:000000,op:flip1,pos:135,+cov diff --git a/src/mint/afl-tests/id:000095,src:000000,op:flip1,pos:96,+cov b/src/exchange/afl-tests/id:000095,src:000000,op:flip1,pos:96,+cov similarity index 100% rename from src/mint/afl-tests/id:000095,src:000000,op:flip1,pos:96,+cov rename to src/exchange/afl-tests/id:000095,src:000000,op:flip1,pos:96,+cov diff --git a/src/mint/afl-tests/id:000096,src:000000,op:flip1,pos:135,+cov b/src/exchange/afl-tests/id:000096,src:000000,op:flip1,pos:135,+cov similarity index 100% rename from src/mint/afl-tests/id:000096,src:000000,op:flip1,pos:135,+cov rename to src/exchange/afl-tests/id:000096,src:000000,op:flip1,pos:135,+cov diff --git a/src/mint/afl-tests/id:000096,src:000000,op:flip1,pos:96,+cov b/src/exchange/afl-tests/id:000096,src:000000,op:flip1,pos:96,+cov similarity index 100% rename from src/mint/afl-tests/id:000096,src:000000,op:flip1,pos:96,+cov rename to src/exchange/afl-tests/id:000096,src:000000,op:flip1,pos:96,+cov diff --git a/src/mint/afl-tests/id:000097,src:000000,op:flip1,pos:135,+cov b/src/exchange/afl-tests/id:000097,src:000000,op:flip1,pos:135,+cov similarity index 100% rename from src/mint/afl-tests/id:000097,src:000000,op:flip1,pos:135,+cov rename to src/exchange/afl-tests/id:000097,src:000000,op:flip1,pos:135,+cov diff --git a/src/mint/afl-tests/id:000097,src:000000,op:flip1,pos:97,+cov b/src/exchange/afl-tests/id:000097,src:000000,op:flip1,pos:97,+cov similarity index 100% rename from src/mint/afl-tests/id:000097,src:000000,op:flip1,pos:97,+cov rename to src/exchange/afl-tests/id:000097,src:000000,op:flip1,pos:97,+cov diff --git a/src/mint/afl-tests/id:000098,src:000000,op:flip1,pos:105 b/src/exchange/afl-tests/id:000098,src:000000,op:flip1,pos:105 similarity index 100% rename from src/mint/afl-tests/id:000098,src:000000,op:flip1,pos:105 rename to src/exchange/afl-tests/id:000098,src:000000,op:flip1,pos:105 diff --git a/src/mint/afl-tests/id:000098,src:000000,op:flip1,pos:136,+cov b/src/exchange/afl-tests/id:000098,src:000000,op:flip1,pos:136,+cov similarity index 100% rename from src/mint/afl-tests/id:000098,src:000000,op:flip1,pos:136,+cov rename to src/exchange/afl-tests/id:000098,src:000000,op:flip1,pos:136,+cov diff --git a/src/mint/afl-tests/id:000099,src:000000,op:flip1,pos:106 b/src/exchange/afl-tests/id:000099,src:000000,op:flip1,pos:106 similarity index 100% rename from src/mint/afl-tests/id:000099,src:000000,op:flip1,pos:106 rename to src/exchange/afl-tests/id:000099,src:000000,op:flip1,pos:106 diff --git a/src/mint/afl-tests/id:000099,src:000000,op:flip1,pos:136,+cov b/src/exchange/afl-tests/id:000099,src:000000,op:flip1,pos:136,+cov similarity index 100% rename from src/mint/afl-tests/id:000099,src:000000,op:flip1,pos:136,+cov rename to src/exchange/afl-tests/id:000099,src:000000,op:flip1,pos:136,+cov diff --git a/src/mint/afl-tests/id:000100,src:000000,op:flip1,pos:113,+cov b/src/exchange/afl-tests/id:000100,src:000000,op:flip1,pos:113,+cov similarity index 100% rename from src/mint/afl-tests/id:000100,src:000000,op:flip1,pos:113,+cov rename to src/exchange/afl-tests/id:000100,src:000000,op:flip1,pos:113,+cov diff --git a/src/mint/afl-tests/id:000100,src:000000,op:flip1,pos:136,+cov b/src/exchange/afl-tests/id:000100,src:000000,op:flip1,pos:136,+cov similarity index 100% rename from src/mint/afl-tests/id:000100,src:000000,op:flip1,pos:136,+cov rename to src/exchange/afl-tests/id:000100,src:000000,op:flip1,pos:136,+cov diff --git a/src/mint/afl-tests/id:000101,src:000000,op:flip1,pos:114,+cov b/src/exchange/afl-tests/id:000101,src:000000,op:flip1,pos:114,+cov similarity index 100% rename from src/mint/afl-tests/id:000101,src:000000,op:flip1,pos:114,+cov rename to src/exchange/afl-tests/id:000101,src:000000,op:flip1,pos:114,+cov diff --git a/src/mint/afl-tests/id:000101,src:000000,op:flip1,pos:136,+cov b/src/exchange/afl-tests/id:000101,src:000000,op:flip1,pos:136,+cov similarity index 100% rename from src/mint/afl-tests/id:000101,src:000000,op:flip1,pos:136,+cov rename to src/exchange/afl-tests/id:000101,src:000000,op:flip1,pos:136,+cov diff --git a/src/mint/afl-tests/id:000102,src:000000,op:flip1,pos:121,+cov b/src/exchange/afl-tests/id:000102,src:000000,op:flip1,pos:121,+cov similarity index 100% rename from src/mint/afl-tests/id:000102,src:000000,op:flip1,pos:121,+cov rename to src/exchange/afl-tests/id:000102,src:000000,op:flip1,pos:121,+cov diff --git a/src/mint/afl-tests/id:000102,src:000000,op:flip1,pos:137,+cov b/src/exchange/afl-tests/id:000102,src:000000,op:flip1,pos:137,+cov similarity index 100% rename from src/mint/afl-tests/id:000102,src:000000,op:flip1,pos:137,+cov rename to src/exchange/afl-tests/id:000102,src:000000,op:flip1,pos:137,+cov diff --git a/src/mint/afl-tests/id:000103,src:000000,op:flip1,pos:130,+cov b/src/exchange/afl-tests/id:000103,src:000000,op:flip1,pos:130,+cov similarity index 100% rename from src/mint/afl-tests/id:000103,src:000000,op:flip1,pos:130,+cov rename to src/exchange/afl-tests/id:000103,src:000000,op:flip1,pos:130,+cov diff --git a/src/mint/afl-tests/id:000103,src:000000,op:flip1,pos:138,+cov b/src/exchange/afl-tests/id:000103,src:000000,op:flip1,pos:138,+cov similarity index 100% rename from src/mint/afl-tests/id:000103,src:000000,op:flip1,pos:138,+cov rename to src/exchange/afl-tests/id:000103,src:000000,op:flip1,pos:138,+cov diff --git a/src/mint/afl-tests/id:000104,src:000000,op:flip1,pos:136,+cov b/src/exchange/afl-tests/id:000104,src:000000,op:flip1,pos:136,+cov similarity index 100% rename from src/mint/afl-tests/id:000104,src:000000,op:flip1,pos:136,+cov rename to src/exchange/afl-tests/id:000104,src:000000,op:flip1,pos:136,+cov diff --git a/src/mint/afl-tests/id:000104,src:000000,op:flip1,pos:138,+cov b/src/exchange/afl-tests/id:000104,src:000000,op:flip1,pos:138,+cov similarity index 100% rename from src/mint/afl-tests/id:000104,src:000000,op:flip1,pos:138,+cov rename to src/exchange/afl-tests/id:000104,src:000000,op:flip1,pos:138,+cov diff --git a/src/mint/afl-tests/id:000105,src:000000,op:flip1,pos:137,+cov b/src/exchange/afl-tests/id:000105,src:000000,op:flip1,pos:137,+cov similarity index 100% rename from src/mint/afl-tests/id:000105,src:000000,op:flip1,pos:137,+cov rename to src/exchange/afl-tests/id:000105,src:000000,op:flip1,pos:137,+cov diff --git a/src/mint/afl-tests/id:000105,src:000000,op:flip1,pos:139,+cov b/src/exchange/afl-tests/id:000105,src:000000,op:flip1,pos:139,+cov similarity index 100% rename from src/mint/afl-tests/id:000105,src:000000,op:flip1,pos:139,+cov rename to src/exchange/afl-tests/id:000105,src:000000,op:flip1,pos:139,+cov diff --git a/src/mint/afl-tests/id:000106,src:000000,op:flip1,pos:137,+cov b/src/exchange/afl-tests/id:000106,src:000000,op:flip1,pos:137,+cov similarity index 100% rename from src/mint/afl-tests/id:000106,src:000000,op:flip1,pos:137,+cov rename to src/exchange/afl-tests/id:000106,src:000000,op:flip1,pos:137,+cov diff --git a/src/mint/afl-tests/id:000106,src:000000,op:flip1,pos:139,+cov b/src/exchange/afl-tests/id:000106,src:000000,op:flip1,pos:139,+cov similarity index 100% rename from src/mint/afl-tests/id:000106,src:000000,op:flip1,pos:139,+cov rename to src/exchange/afl-tests/id:000106,src:000000,op:flip1,pos:139,+cov diff --git a/src/mint/afl-tests/id:000107,src:000000,op:flip1,pos:139,+cov b/src/exchange/afl-tests/id:000107,src:000000,op:flip1,pos:139,+cov similarity index 100% rename from src/mint/afl-tests/id:000107,src:000000,op:flip1,pos:139,+cov rename to src/exchange/afl-tests/id:000107,src:000000,op:flip1,pos:139,+cov diff --git a/src/mint/afl-tests/id:000107,src:000000,op:flip1,pos:140,+cov b/src/exchange/afl-tests/id:000107,src:000000,op:flip1,pos:140,+cov similarity index 100% rename from src/mint/afl-tests/id:000107,src:000000,op:flip1,pos:140,+cov rename to src/exchange/afl-tests/id:000107,src:000000,op:flip1,pos:140,+cov diff --git a/src/mint/afl-tests/id:000108,src:000000,op:flip1,pos:140,+cov b/src/exchange/afl-tests/id:000108,src:000000,op:flip1,pos:140,+cov similarity index 100% rename from src/mint/afl-tests/id:000108,src:000000,op:flip1,pos:140,+cov rename to src/exchange/afl-tests/id:000108,src:000000,op:flip1,pos:140,+cov diff --git a/src/mint/afl-tests/id:000108,src:000000,op:flip1,pos:141,+cov b/src/exchange/afl-tests/id:000108,src:000000,op:flip1,pos:141,+cov similarity index 100% rename from src/mint/afl-tests/id:000108,src:000000,op:flip1,pos:141,+cov rename to src/exchange/afl-tests/id:000108,src:000000,op:flip1,pos:141,+cov diff --git a/src/mint/afl-tests/id:000109,src:000000,op:flip1,pos:140,+cov b/src/exchange/afl-tests/id:000109,src:000000,op:flip1,pos:140,+cov similarity index 100% rename from src/mint/afl-tests/id:000109,src:000000,op:flip1,pos:140,+cov rename to src/exchange/afl-tests/id:000109,src:000000,op:flip1,pos:140,+cov diff --git a/src/mint/afl-tests/id:000109,src:000000,op:flip1,pos:141,+cov b/src/exchange/afl-tests/id:000109,src:000000,op:flip1,pos:141,+cov similarity index 100% rename from src/mint/afl-tests/id:000109,src:000000,op:flip1,pos:141,+cov rename to src/exchange/afl-tests/id:000109,src:000000,op:flip1,pos:141,+cov diff --git a/src/mint/afl-tests/id:000110,src:000000,op:flip1,pos:141,+cov b/src/exchange/afl-tests/id:000110,src:000000,op:flip1,pos:141,+cov similarity index 100% rename from src/mint/afl-tests/id:000110,src:000000,op:flip1,pos:141,+cov rename to src/exchange/afl-tests/id:000110,src:000000,op:flip1,pos:141,+cov diff --git a/src/mint/afl-tests/id:000110,src:000000,op:flip1,pos:143,+cov b/src/exchange/afl-tests/id:000110,src:000000,op:flip1,pos:143,+cov similarity index 100% rename from src/mint/afl-tests/id:000110,src:000000,op:flip1,pos:143,+cov rename to src/exchange/afl-tests/id:000110,src:000000,op:flip1,pos:143,+cov diff --git a/src/mint/afl-tests/id:000111,src:000000,op:flip1,pos:141,+cov b/src/exchange/afl-tests/id:000111,src:000000,op:flip1,pos:141,+cov similarity index 100% rename from src/mint/afl-tests/id:000111,src:000000,op:flip1,pos:141,+cov rename to src/exchange/afl-tests/id:000111,src:000000,op:flip1,pos:141,+cov diff --git a/src/mint/afl-tests/id:000111,src:000000,op:flip1,pos:145,+cov b/src/exchange/afl-tests/id:000111,src:000000,op:flip1,pos:145,+cov similarity index 100% rename from src/mint/afl-tests/id:000111,src:000000,op:flip1,pos:145,+cov rename to src/exchange/afl-tests/id:000111,src:000000,op:flip1,pos:145,+cov diff --git a/src/mint/afl-tests/id:000112,src:000000,op:flip1,pos:142,+cov b/src/exchange/afl-tests/id:000112,src:000000,op:flip1,pos:142,+cov similarity index 100% rename from src/mint/afl-tests/id:000112,src:000000,op:flip1,pos:142,+cov rename to src/exchange/afl-tests/id:000112,src:000000,op:flip1,pos:142,+cov diff --git a/src/mint/afl-tests/id:000112,src:000000,op:flip1,pos:147,+cov b/src/exchange/afl-tests/id:000112,src:000000,op:flip1,pos:147,+cov similarity index 100% rename from src/mint/afl-tests/id:000112,src:000000,op:flip1,pos:147,+cov rename to src/exchange/afl-tests/id:000112,src:000000,op:flip1,pos:147,+cov diff --git a/src/mint/afl-tests/id:000113,src:000000,op:flip1,pos:143,+cov b/src/exchange/afl-tests/id:000113,src:000000,op:flip1,pos:143,+cov similarity index 100% rename from src/mint/afl-tests/id:000113,src:000000,op:flip1,pos:143,+cov rename to src/exchange/afl-tests/id:000113,src:000000,op:flip1,pos:143,+cov diff --git a/src/mint/afl-tests/id:000113,src:000000,op:flip1,pos:147,+cov b/src/exchange/afl-tests/id:000113,src:000000,op:flip1,pos:147,+cov similarity index 100% rename from src/mint/afl-tests/id:000113,src:000000,op:flip1,pos:147,+cov rename to src/exchange/afl-tests/id:000113,src:000000,op:flip1,pos:147,+cov diff --git a/src/mint/afl-tests/id:000114,src:000000,op:flip1,pos:144,+cov b/src/exchange/afl-tests/id:000114,src:000000,op:flip1,pos:144,+cov similarity index 100% rename from src/mint/afl-tests/id:000114,src:000000,op:flip1,pos:144,+cov rename to src/exchange/afl-tests/id:000114,src:000000,op:flip1,pos:144,+cov diff --git a/src/mint/afl-tests/id:000114,src:000000,op:flip1,pos:150,+cov b/src/exchange/afl-tests/id:000114,src:000000,op:flip1,pos:150,+cov similarity index 100% rename from src/mint/afl-tests/id:000114,src:000000,op:flip1,pos:150,+cov rename to src/exchange/afl-tests/id:000114,src:000000,op:flip1,pos:150,+cov diff --git a/src/mint/afl-tests/id:000115,src:000000,op:flip1,pos:147,+cov b/src/exchange/afl-tests/id:000115,src:000000,op:flip1,pos:147,+cov similarity index 100% rename from src/mint/afl-tests/id:000115,src:000000,op:flip1,pos:147,+cov rename to src/exchange/afl-tests/id:000115,src:000000,op:flip1,pos:147,+cov diff --git a/src/mint/afl-tests/id:000115,src:000000,op:flip1,pos:153,+cov b/src/exchange/afl-tests/id:000115,src:000000,op:flip1,pos:153,+cov similarity index 100% rename from src/mint/afl-tests/id:000115,src:000000,op:flip1,pos:153,+cov rename to src/exchange/afl-tests/id:000115,src:000000,op:flip1,pos:153,+cov diff --git a/src/mint/afl-tests/id:000116,src:000000,op:flip1,pos:150,+cov b/src/exchange/afl-tests/id:000116,src:000000,op:flip1,pos:150,+cov similarity index 100% rename from src/mint/afl-tests/id:000116,src:000000,op:flip1,pos:150,+cov rename to src/exchange/afl-tests/id:000116,src:000000,op:flip1,pos:150,+cov diff --git a/src/mint/afl-tests/id:000116,src:000000,op:flip1,pos:154,+cov b/src/exchange/afl-tests/id:000116,src:000000,op:flip1,pos:154,+cov similarity index 100% rename from src/mint/afl-tests/id:000116,src:000000,op:flip1,pos:154,+cov rename to src/exchange/afl-tests/id:000116,src:000000,op:flip1,pos:154,+cov diff --git a/src/mint/afl-tests/id:000117,src:000000,op:flip1,pos:151,+cov b/src/exchange/afl-tests/id:000117,src:000000,op:flip1,pos:151,+cov similarity index 100% rename from src/mint/afl-tests/id:000117,src:000000,op:flip1,pos:151,+cov rename to src/exchange/afl-tests/id:000117,src:000000,op:flip1,pos:151,+cov diff --git a/src/mint/afl-tests/id:000117,src:000000,op:flip1,pos:155,+cov b/src/exchange/afl-tests/id:000117,src:000000,op:flip1,pos:155,+cov similarity index 100% rename from src/mint/afl-tests/id:000117,src:000000,op:flip1,pos:155,+cov rename to src/exchange/afl-tests/id:000117,src:000000,op:flip1,pos:155,+cov diff --git a/src/mint/afl-tests/id:000118,src:000000,op:flip1,pos:151,+cov b/src/exchange/afl-tests/id:000118,src:000000,op:flip1,pos:151,+cov similarity index 100% rename from src/mint/afl-tests/id:000118,src:000000,op:flip1,pos:151,+cov rename to src/exchange/afl-tests/id:000118,src:000000,op:flip1,pos:151,+cov diff --git a/src/mint/afl-tests/id:000118,src:000000,op:flip1,pos:157,+cov b/src/exchange/afl-tests/id:000118,src:000000,op:flip1,pos:157,+cov similarity index 100% rename from src/mint/afl-tests/id:000118,src:000000,op:flip1,pos:157,+cov rename to src/exchange/afl-tests/id:000118,src:000000,op:flip1,pos:157,+cov diff --git a/src/mint/afl-tests/id:000119,src:000000,op:flip1,pos:154,+cov b/src/exchange/afl-tests/id:000119,src:000000,op:flip1,pos:154,+cov similarity index 100% rename from src/mint/afl-tests/id:000119,src:000000,op:flip1,pos:154,+cov rename to src/exchange/afl-tests/id:000119,src:000000,op:flip1,pos:154,+cov diff --git a/src/mint/afl-tests/id:000119,src:000000,op:flip1,pos:158,+cov b/src/exchange/afl-tests/id:000119,src:000000,op:flip1,pos:158,+cov similarity index 100% rename from src/mint/afl-tests/id:000119,src:000000,op:flip1,pos:158,+cov rename to src/exchange/afl-tests/id:000119,src:000000,op:flip1,pos:158,+cov diff --git a/src/mint/afl-tests/id:000120,src:000000,op:flip1,pos:155,+cov b/src/exchange/afl-tests/id:000120,src:000000,op:flip1,pos:155,+cov similarity index 100% rename from src/mint/afl-tests/id:000120,src:000000,op:flip1,pos:155,+cov rename to src/exchange/afl-tests/id:000120,src:000000,op:flip1,pos:155,+cov diff --git a/src/mint/afl-tests/id:000120,src:000000,op:flip1,pos:158,+cov b/src/exchange/afl-tests/id:000120,src:000000,op:flip1,pos:158,+cov similarity index 100% rename from src/mint/afl-tests/id:000120,src:000000,op:flip1,pos:158,+cov rename to src/exchange/afl-tests/id:000120,src:000000,op:flip1,pos:158,+cov diff --git a/src/mint/afl-tests/id:000121,src:000000,op:flip1,pos:156,+cov b/src/exchange/afl-tests/id:000121,src:000000,op:flip1,pos:156,+cov similarity index 100% rename from src/mint/afl-tests/id:000121,src:000000,op:flip1,pos:156,+cov rename to src/exchange/afl-tests/id:000121,src:000000,op:flip1,pos:156,+cov diff --git a/src/mint/afl-tests/id:000121,src:000000,op:flip1,pos:159,+cov b/src/exchange/afl-tests/id:000121,src:000000,op:flip1,pos:159,+cov similarity index 100% rename from src/mint/afl-tests/id:000121,src:000000,op:flip1,pos:159,+cov rename to src/exchange/afl-tests/id:000121,src:000000,op:flip1,pos:159,+cov diff --git a/src/mint/afl-tests/id:000122,src:000000,op:flip1,pos:157,+cov b/src/exchange/afl-tests/id:000122,src:000000,op:flip1,pos:157,+cov similarity index 100% rename from src/mint/afl-tests/id:000122,src:000000,op:flip1,pos:157,+cov rename to src/exchange/afl-tests/id:000122,src:000000,op:flip1,pos:157,+cov diff --git a/src/mint/afl-tests/id:000122,src:000000,op:flip1,pos:159,+cov b/src/exchange/afl-tests/id:000122,src:000000,op:flip1,pos:159,+cov similarity index 100% rename from src/mint/afl-tests/id:000122,src:000000,op:flip1,pos:159,+cov rename to src/exchange/afl-tests/id:000122,src:000000,op:flip1,pos:159,+cov diff --git a/src/mint/afl-tests/id:000123,src:000000,op:flip1,pos:160,+cov b/src/exchange/afl-tests/id:000123,src:000000,op:flip1,pos:160,+cov similarity index 100% rename from src/mint/afl-tests/id:000123,src:000000,op:flip1,pos:160,+cov rename to src/exchange/afl-tests/id:000123,src:000000,op:flip1,pos:160,+cov diff --git a/src/mint/afl-tests/id:000123,src:000000,op:flip1,pos:161,+cov b/src/exchange/afl-tests/id:000123,src:000000,op:flip1,pos:161,+cov similarity index 100% rename from src/mint/afl-tests/id:000123,src:000000,op:flip1,pos:161,+cov rename to src/exchange/afl-tests/id:000123,src:000000,op:flip1,pos:161,+cov diff --git a/src/mint/afl-tests/id:000124,src:000000,op:flip1,pos:161,+cov b/src/exchange/afl-tests/id:000124,src:000000,op:flip1,pos:161,+cov similarity index 100% rename from src/mint/afl-tests/id:000124,src:000000,op:flip1,pos:161,+cov rename to src/exchange/afl-tests/id:000124,src:000000,op:flip1,pos:161,+cov diff --git a/src/mint/afl-tests/id:000124,src:000000,op:flip1,pos:164,+cov b/src/exchange/afl-tests/id:000124,src:000000,op:flip1,pos:164,+cov similarity index 100% rename from src/mint/afl-tests/id:000124,src:000000,op:flip1,pos:164,+cov rename to src/exchange/afl-tests/id:000124,src:000000,op:flip1,pos:164,+cov diff --git a/src/mint/afl-tests/id:000125,src:000000,op:flip1,pos:161,+cov b/src/exchange/afl-tests/id:000125,src:000000,op:flip1,pos:161,+cov similarity index 100% rename from src/mint/afl-tests/id:000125,src:000000,op:flip1,pos:161,+cov rename to src/exchange/afl-tests/id:000125,src:000000,op:flip1,pos:161,+cov diff --git a/src/mint/afl-tests/id:000125,src:000000,op:flip1,pos:166,+cov b/src/exchange/afl-tests/id:000125,src:000000,op:flip1,pos:166,+cov similarity index 100% rename from src/mint/afl-tests/id:000125,src:000000,op:flip1,pos:166,+cov rename to src/exchange/afl-tests/id:000125,src:000000,op:flip1,pos:166,+cov diff --git a/src/mint/afl-tests/id:000126,src:000000,op:flip1,pos:163 b/src/exchange/afl-tests/id:000126,src:000000,op:flip1,pos:163 similarity index 100% rename from src/mint/afl-tests/id:000126,src:000000,op:flip1,pos:163 rename to src/exchange/afl-tests/id:000126,src:000000,op:flip1,pos:163 diff --git a/src/mint/afl-tests/id:000126,src:000000,op:flip1,pos:166,+cov b/src/exchange/afl-tests/id:000126,src:000000,op:flip1,pos:166,+cov similarity index 100% rename from src/mint/afl-tests/id:000126,src:000000,op:flip1,pos:166,+cov rename to src/exchange/afl-tests/id:000126,src:000000,op:flip1,pos:166,+cov diff --git a/src/mint/afl-tests/id:000127,src:000000,op:flip1,pos:166,+cov b/src/exchange/afl-tests/id:000127,src:000000,op:flip1,pos:166,+cov similarity index 100% rename from src/mint/afl-tests/id:000127,src:000000,op:flip1,pos:166,+cov rename to src/exchange/afl-tests/id:000127,src:000000,op:flip1,pos:166,+cov diff --git a/src/mint/afl-tests/id:000127,src:000000,op:flip1,pos:167,+cov b/src/exchange/afl-tests/id:000127,src:000000,op:flip1,pos:167,+cov similarity index 100% rename from src/mint/afl-tests/id:000127,src:000000,op:flip1,pos:167,+cov rename to src/exchange/afl-tests/id:000127,src:000000,op:flip1,pos:167,+cov diff --git a/src/mint/afl-tests/id:000128,src:000000,op:flip1,pos:167,+cov b/src/exchange/afl-tests/id:000128,src:000000,op:flip1,pos:167,+cov similarity index 100% rename from src/mint/afl-tests/id:000128,src:000000,op:flip1,pos:167,+cov rename to src/exchange/afl-tests/id:000128,src:000000,op:flip1,pos:167,+cov diff --git a/src/mint/afl-tests/id:000128,src:000000,op:flip1,pos:170,+cov b/src/exchange/afl-tests/id:000128,src:000000,op:flip1,pos:170,+cov similarity index 100% rename from src/mint/afl-tests/id:000128,src:000000,op:flip1,pos:170,+cov rename to src/exchange/afl-tests/id:000128,src:000000,op:flip1,pos:170,+cov diff --git a/src/mint/afl-tests/id:000129,src:000000,op:flip1,pos:168,+cov b/src/exchange/afl-tests/id:000129,src:000000,op:flip1,pos:168,+cov similarity index 100% rename from src/mint/afl-tests/id:000129,src:000000,op:flip1,pos:168,+cov rename to src/exchange/afl-tests/id:000129,src:000000,op:flip1,pos:168,+cov diff --git a/src/mint/afl-tests/id:000129,src:000000,op:flip1,pos:173,+cov b/src/exchange/afl-tests/id:000129,src:000000,op:flip1,pos:173,+cov similarity index 100% rename from src/mint/afl-tests/id:000129,src:000000,op:flip1,pos:173,+cov rename to src/exchange/afl-tests/id:000129,src:000000,op:flip1,pos:173,+cov diff --git a/src/mint/afl-tests/id:000130,src:000000,op:flip1,pos:171,+cov b/src/exchange/afl-tests/id:000130,src:000000,op:flip1,pos:171,+cov similarity index 100% rename from src/mint/afl-tests/id:000130,src:000000,op:flip1,pos:171,+cov rename to src/exchange/afl-tests/id:000130,src:000000,op:flip1,pos:171,+cov diff --git a/src/mint/afl-tests/id:000130,src:000000,op:flip1,pos:173,+cov b/src/exchange/afl-tests/id:000130,src:000000,op:flip1,pos:173,+cov similarity index 100% rename from src/mint/afl-tests/id:000130,src:000000,op:flip1,pos:173,+cov rename to src/exchange/afl-tests/id:000130,src:000000,op:flip1,pos:173,+cov diff --git a/src/mint/afl-tests/id:000131,src:000000,op:flip1,pos:172,+cov b/src/exchange/afl-tests/id:000131,src:000000,op:flip1,pos:172,+cov similarity index 100% rename from src/mint/afl-tests/id:000131,src:000000,op:flip1,pos:172,+cov rename to src/exchange/afl-tests/id:000131,src:000000,op:flip1,pos:172,+cov diff --git a/src/mint/afl-tests/id:000131,src:000000,op:flip1,pos:174,+cov b/src/exchange/afl-tests/id:000131,src:000000,op:flip1,pos:174,+cov similarity index 100% rename from src/mint/afl-tests/id:000131,src:000000,op:flip1,pos:174,+cov rename to src/exchange/afl-tests/id:000131,src:000000,op:flip1,pos:174,+cov diff --git a/src/mint/afl-tests/id:000132,src:000000,op:flip1,pos:173,+cov b/src/exchange/afl-tests/id:000132,src:000000,op:flip1,pos:173,+cov similarity index 100% rename from src/mint/afl-tests/id:000132,src:000000,op:flip1,pos:173,+cov rename to src/exchange/afl-tests/id:000132,src:000000,op:flip1,pos:173,+cov diff --git a/src/mint/afl-tests/id:000132,src:000000,op:flip1,pos:176,+cov b/src/exchange/afl-tests/id:000132,src:000000,op:flip1,pos:176,+cov similarity index 100% rename from src/mint/afl-tests/id:000132,src:000000,op:flip1,pos:176,+cov rename to src/exchange/afl-tests/id:000132,src:000000,op:flip1,pos:176,+cov diff --git a/src/mint/afl-tests/id:000133,src:000000,op:flip1,pos:173,+cov b/src/exchange/afl-tests/id:000133,src:000000,op:flip1,pos:173,+cov similarity index 100% rename from src/mint/afl-tests/id:000133,src:000000,op:flip1,pos:173,+cov rename to src/exchange/afl-tests/id:000133,src:000000,op:flip1,pos:173,+cov diff --git a/src/mint/afl-tests/id:000133,src:000000,op:flip1,pos:178,+cov b/src/exchange/afl-tests/id:000133,src:000000,op:flip1,pos:178,+cov similarity index 100% rename from src/mint/afl-tests/id:000133,src:000000,op:flip1,pos:178,+cov rename to src/exchange/afl-tests/id:000133,src:000000,op:flip1,pos:178,+cov diff --git a/src/mint/afl-tests/id:000134,src:000000,op:flip1,pos:174,+cov b/src/exchange/afl-tests/id:000134,src:000000,op:flip1,pos:174,+cov similarity index 100% rename from src/mint/afl-tests/id:000134,src:000000,op:flip1,pos:174,+cov rename to src/exchange/afl-tests/id:000134,src:000000,op:flip1,pos:174,+cov diff --git a/src/mint/afl-tests/id:000134,src:000000,op:flip1,pos:178,+cov b/src/exchange/afl-tests/id:000134,src:000000,op:flip1,pos:178,+cov similarity index 100% rename from src/mint/afl-tests/id:000134,src:000000,op:flip1,pos:178,+cov rename to src/exchange/afl-tests/id:000134,src:000000,op:flip1,pos:178,+cov diff --git a/src/mint/afl-tests/id:000135,src:000000,op:flip1,pos:179,+cov b/src/exchange/afl-tests/id:000135,src:000000,op:flip1,pos:179,+cov similarity index 100% rename from src/mint/afl-tests/id:000135,src:000000,op:flip1,pos:179,+cov rename to src/exchange/afl-tests/id:000135,src:000000,op:flip1,pos:179,+cov diff --git a/src/mint/afl-tests/id:000135,src:000000,op:flip1,pos:180 b/src/exchange/afl-tests/id:000135,src:000000,op:flip1,pos:180 similarity index 100% rename from src/mint/afl-tests/id:000135,src:000000,op:flip1,pos:180 rename to src/exchange/afl-tests/id:000135,src:000000,op:flip1,pos:180 diff --git a/src/mint/afl-tests/id:000136,src:000000,op:flip1,pos:182,+cov b/src/exchange/afl-tests/id:000136,src:000000,op:flip1,pos:182,+cov similarity index 100% rename from src/mint/afl-tests/id:000136,src:000000,op:flip1,pos:182,+cov rename to src/exchange/afl-tests/id:000136,src:000000,op:flip1,pos:182,+cov diff --git a/src/mint/afl-tests/id:000136,src:000000,op:flip1,pos:183,+cov b/src/exchange/afl-tests/id:000136,src:000000,op:flip1,pos:183,+cov similarity index 100% rename from src/mint/afl-tests/id:000136,src:000000,op:flip1,pos:183,+cov rename to src/exchange/afl-tests/id:000136,src:000000,op:flip1,pos:183,+cov diff --git a/src/mint/afl-tests/id:000137,src:000000,op:flip1,pos:182,+cov b/src/exchange/afl-tests/id:000137,src:000000,op:flip1,pos:182,+cov similarity index 100% rename from src/mint/afl-tests/id:000137,src:000000,op:flip1,pos:182,+cov rename to src/exchange/afl-tests/id:000137,src:000000,op:flip1,pos:182,+cov diff --git a/src/mint/afl-tests/id:000137,src:000000,op:flip1,pos:184,+cov b/src/exchange/afl-tests/id:000137,src:000000,op:flip1,pos:184,+cov similarity index 100% rename from src/mint/afl-tests/id:000137,src:000000,op:flip1,pos:184,+cov rename to src/exchange/afl-tests/id:000137,src:000000,op:flip1,pos:184,+cov diff --git a/src/mint/afl-tests/id:000138,src:000000,op:flip1,pos:183 b/src/exchange/afl-tests/id:000138,src:000000,op:flip1,pos:183 similarity index 100% rename from src/mint/afl-tests/id:000138,src:000000,op:flip1,pos:183 rename to src/exchange/afl-tests/id:000138,src:000000,op:flip1,pos:183 diff --git a/src/mint/afl-tests/id:000138,src:000000,op:flip1,pos:185,+cov b/src/exchange/afl-tests/id:000138,src:000000,op:flip1,pos:185,+cov similarity index 100% rename from src/mint/afl-tests/id:000138,src:000000,op:flip1,pos:185,+cov rename to src/exchange/afl-tests/id:000138,src:000000,op:flip1,pos:185,+cov diff --git a/src/mint/afl-tests/id:000139,src:000000,op:flip1,pos:183,+cov b/src/exchange/afl-tests/id:000139,src:000000,op:flip1,pos:183,+cov similarity index 100% rename from src/mint/afl-tests/id:000139,src:000000,op:flip1,pos:183,+cov rename to src/exchange/afl-tests/id:000139,src:000000,op:flip1,pos:183,+cov diff --git a/src/mint/afl-tests/id:000139,src:000000,op:flip1,pos:190 b/src/exchange/afl-tests/id:000139,src:000000,op:flip1,pos:190 similarity index 100% rename from src/mint/afl-tests/id:000139,src:000000,op:flip1,pos:190 rename to src/exchange/afl-tests/id:000139,src:000000,op:flip1,pos:190 diff --git a/src/mint/afl-tests/id:000140,src:000000,op:flip1,pos:185,+cov b/src/exchange/afl-tests/id:000140,src:000000,op:flip1,pos:185,+cov similarity index 100% rename from src/mint/afl-tests/id:000140,src:000000,op:flip1,pos:185,+cov rename to src/exchange/afl-tests/id:000140,src:000000,op:flip1,pos:185,+cov diff --git a/src/mint/afl-tests/id:000140,src:000000,op:flip1,pos:200,+cov b/src/exchange/afl-tests/id:000140,src:000000,op:flip1,pos:200,+cov similarity index 100% rename from src/mint/afl-tests/id:000140,src:000000,op:flip1,pos:200,+cov rename to src/exchange/afl-tests/id:000140,src:000000,op:flip1,pos:200,+cov diff --git a/src/mint/afl-tests/id:000141,src:000000,op:flip1,pos:185,+cov b/src/exchange/afl-tests/id:000141,src:000000,op:flip1,pos:185,+cov similarity index 100% rename from src/mint/afl-tests/id:000141,src:000000,op:flip1,pos:185,+cov rename to src/exchange/afl-tests/id:000141,src:000000,op:flip1,pos:185,+cov diff --git a/src/mint/afl-tests/id:000141,src:000000,op:flip1,pos:205,+cov b/src/exchange/afl-tests/id:000141,src:000000,op:flip1,pos:205,+cov similarity index 100% rename from src/mint/afl-tests/id:000141,src:000000,op:flip1,pos:205,+cov rename to src/exchange/afl-tests/id:000141,src:000000,op:flip1,pos:205,+cov diff --git a/src/mint/afl-tests/id:000142,src:000000,op:flip1,pos:190 b/src/exchange/afl-tests/id:000142,src:000000,op:flip1,pos:190 similarity index 100% rename from src/mint/afl-tests/id:000142,src:000000,op:flip1,pos:190 rename to src/exchange/afl-tests/id:000142,src:000000,op:flip1,pos:190 diff --git a/src/mint/afl-tests/id:000142,src:000000,op:flip1,pos:211,+cov b/src/exchange/afl-tests/id:000142,src:000000,op:flip1,pos:211,+cov similarity index 100% rename from src/mint/afl-tests/id:000142,src:000000,op:flip1,pos:211,+cov rename to src/exchange/afl-tests/id:000142,src:000000,op:flip1,pos:211,+cov diff --git a/src/mint/afl-tests/id:000143,src:000000,op:flip1,pos:193,+cov b/src/exchange/afl-tests/id:000143,src:000000,op:flip1,pos:193,+cov similarity index 100% rename from src/mint/afl-tests/id:000143,src:000000,op:flip1,pos:193,+cov rename to src/exchange/afl-tests/id:000143,src:000000,op:flip1,pos:193,+cov diff --git a/src/mint/afl-tests/id:000143,src:000000,op:flip1,pos:238,+cov b/src/exchange/afl-tests/id:000143,src:000000,op:flip1,pos:238,+cov similarity index 100% rename from src/mint/afl-tests/id:000143,src:000000,op:flip1,pos:238,+cov rename to src/exchange/afl-tests/id:000143,src:000000,op:flip1,pos:238,+cov diff --git a/src/mint/afl-tests/id:000144,src:000000,op:flip1,pos:200,+cov b/src/exchange/afl-tests/id:000144,src:000000,op:flip1,pos:200,+cov similarity index 100% rename from src/mint/afl-tests/id:000144,src:000000,op:flip1,pos:200,+cov rename to src/exchange/afl-tests/id:000144,src:000000,op:flip1,pos:200,+cov diff --git a/src/mint/afl-tests/id:000144,src:000000,op:flip1,pos:238,+cov b/src/exchange/afl-tests/id:000144,src:000000,op:flip1,pos:238,+cov similarity index 100% rename from src/mint/afl-tests/id:000144,src:000000,op:flip1,pos:238,+cov rename to src/exchange/afl-tests/id:000144,src:000000,op:flip1,pos:238,+cov diff --git a/src/mint/afl-tests/id:000145,src:000000,op:flip1,pos:211,+cov b/src/exchange/afl-tests/id:000145,src:000000,op:flip1,pos:211,+cov similarity index 100% rename from src/mint/afl-tests/id:000145,src:000000,op:flip1,pos:211,+cov rename to src/exchange/afl-tests/id:000145,src:000000,op:flip1,pos:211,+cov diff --git a/src/mint/afl-tests/id:000145,src:000000,op:flip1,pos:241,+cov b/src/exchange/afl-tests/id:000145,src:000000,op:flip1,pos:241,+cov similarity index 100% rename from src/mint/afl-tests/id:000145,src:000000,op:flip1,pos:241,+cov rename to src/exchange/afl-tests/id:000145,src:000000,op:flip1,pos:241,+cov diff --git a/src/mint/afl-tests/id:000146,src:000000,op:flip1,pos:223,+cov b/src/exchange/afl-tests/id:000146,src:000000,op:flip1,pos:223,+cov similarity index 100% rename from src/mint/afl-tests/id:000146,src:000000,op:flip1,pos:223,+cov rename to src/exchange/afl-tests/id:000146,src:000000,op:flip1,pos:223,+cov diff --git a/src/mint/afl-tests/id:000146,src:000000,op:flip1,pos:245 b/src/exchange/afl-tests/id:000146,src:000000,op:flip1,pos:245 similarity index 100% rename from src/mint/afl-tests/id:000146,src:000000,op:flip1,pos:245 rename to src/exchange/afl-tests/id:000146,src:000000,op:flip1,pos:245 diff --git a/src/mint/afl-tests/id:000147,src:000000,op:flip1,pos:245 b/src/exchange/afl-tests/id:000147,src:000000,op:flip1,pos:245 similarity index 100% rename from src/mint/afl-tests/id:000147,src:000000,op:flip1,pos:245 rename to src/exchange/afl-tests/id:000147,src:000000,op:flip1,pos:245 diff --git a/src/mint/afl-tests/id:000147,src:000000,op:flip1,pos:255,+cov b/src/exchange/afl-tests/id:000147,src:000000,op:flip1,pos:255,+cov similarity index 100% rename from src/mint/afl-tests/id:000147,src:000000,op:flip1,pos:255,+cov rename to src/exchange/afl-tests/id:000147,src:000000,op:flip1,pos:255,+cov diff --git a/src/mint/afl-tests/id:000148,src:000000,op:flip1,pos:262,+cov b/src/exchange/afl-tests/id:000148,src:000000,op:flip1,pos:262,+cov similarity index 100% rename from src/mint/afl-tests/id:000148,src:000000,op:flip1,pos:262,+cov rename to src/exchange/afl-tests/id:000148,src:000000,op:flip1,pos:262,+cov diff --git a/src/mint/afl-tests/id:000149,src:000000,op:flip1,pos:268,+cov b/src/exchange/afl-tests/id:000149,src:000000,op:flip1,pos:268,+cov similarity index 100% rename from src/mint/afl-tests/id:000149,src:000000,op:flip1,pos:268,+cov rename to src/exchange/afl-tests/id:000149,src:000000,op:flip1,pos:268,+cov diff --git a/src/mint/afl-tests/id:000149,src:000000,op:flip1,pos:270,+cov b/src/exchange/afl-tests/id:000149,src:000000,op:flip1,pos:270,+cov similarity index 100% rename from src/mint/afl-tests/id:000149,src:000000,op:flip1,pos:270,+cov rename to src/exchange/afl-tests/id:000149,src:000000,op:flip1,pos:270,+cov diff --git a/src/mint/afl-tests/id:000150,src:000000,op:flip1,pos:269,+cov b/src/exchange/afl-tests/id:000150,src:000000,op:flip1,pos:269,+cov similarity index 100% rename from src/mint/afl-tests/id:000150,src:000000,op:flip1,pos:269,+cov rename to src/exchange/afl-tests/id:000150,src:000000,op:flip1,pos:269,+cov diff --git a/src/mint/afl-tests/id:000150,src:000000,op:flip1,pos:279,+cov b/src/exchange/afl-tests/id:000150,src:000000,op:flip1,pos:279,+cov similarity index 100% rename from src/mint/afl-tests/id:000150,src:000000,op:flip1,pos:279,+cov rename to src/exchange/afl-tests/id:000150,src:000000,op:flip1,pos:279,+cov diff --git a/src/mint/afl-tests/id:000151,src:000000,op:flip1,pos:270,+cov b/src/exchange/afl-tests/id:000151,src:000000,op:flip1,pos:270,+cov similarity index 100% rename from src/mint/afl-tests/id:000151,src:000000,op:flip1,pos:270,+cov rename to src/exchange/afl-tests/id:000151,src:000000,op:flip1,pos:270,+cov diff --git a/src/mint/afl-tests/id:000151,src:000000,op:flip1,pos:279,+cov b/src/exchange/afl-tests/id:000151,src:000000,op:flip1,pos:279,+cov similarity index 100% rename from src/mint/afl-tests/id:000151,src:000000,op:flip1,pos:279,+cov rename to src/exchange/afl-tests/id:000151,src:000000,op:flip1,pos:279,+cov diff --git a/src/mint/afl-tests/id:000152,src:000000,op:flip1,pos:271,+cov b/src/exchange/afl-tests/id:000152,src:000000,op:flip1,pos:271,+cov similarity index 100% rename from src/mint/afl-tests/id:000152,src:000000,op:flip1,pos:271,+cov rename to src/exchange/afl-tests/id:000152,src:000000,op:flip1,pos:271,+cov diff --git a/src/mint/afl-tests/id:000152,src:000000,op:flip1,pos:283,+cov b/src/exchange/afl-tests/id:000152,src:000000,op:flip1,pos:283,+cov similarity index 100% rename from src/mint/afl-tests/id:000152,src:000000,op:flip1,pos:283,+cov rename to src/exchange/afl-tests/id:000152,src:000000,op:flip1,pos:283,+cov diff --git a/src/mint/afl-tests/id:000153,src:000000,op:flip1,pos:271,+cov b/src/exchange/afl-tests/id:000153,src:000000,op:flip1,pos:271,+cov similarity index 100% rename from src/mint/afl-tests/id:000153,src:000000,op:flip1,pos:271,+cov rename to src/exchange/afl-tests/id:000153,src:000000,op:flip1,pos:271,+cov diff --git a/src/mint/afl-tests/id:000153,src:000000,op:flip1,pos:291,+cov b/src/exchange/afl-tests/id:000153,src:000000,op:flip1,pos:291,+cov similarity index 100% rename from src/mint/afl-tests/id:000153,src:000000,op:flip1,pos:291,+cov rename to src/exchange/afl-tests/id:000153,src:000000,op:flip1,pos:291,+cov diff --git a/src/mint/afl-tests/id:000154,src:000000,op:flip1,pos:274,+cov b/src/exchange/afl-tests/id:000154,src:000000,op:flip1,pos:274,+cov similarity index 100% rename from src/mint/afl-tests/id:000154,src:000000,op:flip1,pos:274,+cov rename to src/exchange/afl-tests/id:000154,src:000000,op:flip1,pos:274,+cov diff --git a/src/mint/afl-tests/id:000154,src:000000,op:flip1,pos:298,+cov b/src/exchange/afl-tests/id:000154,src:000000,op:flip1,pos:298,+cov similarity index 100% rename from src/mint/afl-tests/id:000154,src:000000,op:flip1,pos:298,+cov rename to src/exchange/afl-tests/id:000154,src:000000,op:flip1,pos:298,+cov diff --git a/src/mint/afl-tests/id:000155,src:000000,op:flip1,pos:279,+cov b/src/exchange/afl-tests/id:000155,src:000000,op:flip1,pos:279,+cov similarity index 100% rename from src/mint/afl-tests/id:000155,src:000000,op:flip1,pos:279,+cov rename to src/exchange/afl-tests/id:000155,src:000000,op:flip1,pos:279,+cov diff --git a/src/mint/afl-tests/id:000155,src:000000,op:flip1,pos:302,+cov b/src/exchange/afl-tests/id:000155,src:000000,op:flip1,pos:302,+cov similarity index 100% rename from src/mint/afl-tests/id:000155,src:000000,op:flip1,pos:302,+cov rename to src/exchange/afl-tests/id:000155,src:000000,op:flip1,pos:302,+cov diff --git a/src/mint/afl-tests/id:000156,src:000000,op:flip1,pos:281,+cov b/src/exchange/afl-tests/id:000156,src:000000,op:flip1,pos:281,+cov similarity index 100% rename from src/mint/afl-tests/id:000156,src:000000,op:flip1,pos:281,+cov rename to src/exchange/afl-tests/id:000156,src:000000,op:flip1,pos:281,+cov diff --git a/src/mint/afl-tests/id:000156,src:000000,op:flip1,pos:305,+cov b/src/exchange/afl-tests/id:000156,src:000000,op:flip1,pos:305,+cov similarity index 100% rename from src/mint/afl-tests/id:000156,src:000000,op:flip1,pos:305,+cov rename to src/exchange/afl-tests/id:000156,src:000000,op:flip1,pos:305,+cov diff --git a/src/mint/afl-tests/id:000157,src:000000,op:flip1,pos:283,+cov b/src/exchange/afl-tests/id:000157,src:000000,op:flip1,pos:283,+cov similarity index 100% rename from src/mint/afl-tests/id:000157,src:000000,op:flip1,pos:283,+cov rename to src/exchange/afl-tests/id:000157,src:000000,op:flip1,pos:283,+cov diff --git a/src/mint/afl-tests/id:000157,src:000000,op:flip1,pos:307,+cov b/src/exchange/afl-tests/id:000157,src:000000,op:flip1,pos:307,+cov similarity index 100% rename from src/mint/afl-tests/id:000157,src:000000,op:flip1,pos:307,+cov rename to src/exchange/afl-tests/id:000157,src:000000,op:flip1,pos:307,+cov diff --git a/src/mint/afl-tests/id:000158,src:000000,op:flip1,pos:291,+cov b/src/exchange/afl-tests/id:000158,src:000000,op:flip1,pos:291,+cov similarity index 100% rename from src/mint/afl-tests/id:000158,src:000000,op:flip1,pos:291,+cov rename to src/exchange/afl-tests/id:000158,src:000000,op:flip1,pos:291,+cov diff --git a/src/mint/afl-tests/id:000158,src:000000,op:flip1,pos:313,+cov b/src/exchange/afl-tests/id:000158,src:000000,op:flip1,pos:313,+cov similarity index 100% rename from src/mint/afl-tests/id:000158,src:000000,op:flip1,pos:313,+cov rename to src/exchange/afl-tests/id:000158,src:000000,op:flip1,pos:313,+cov diff --git a/src/mint/afl-tests/id:000159,src:000000,op:flip1,pos:298,+cov b/src/exchange/afl-tests/id:000159,src:000000,op:flip1,pos:298,+cov similarity index 100% rename from src/mint/afl-tests/id:000159,src:000000,op:flip1,pos:298,+cov rename to src/exchange/afl-tests/id:000159,src:000000,op:flip1,pos:298,+cov diff --git a/src/mint/afl-tests/id:000159,src:000000,op:flip1,pos:313,+cov b/src/exchange/afl-tests/id:000159,src:000000,op:flip1,pos:313,+cov similarity index 100% rename from src/mint/afl-tests/id:000159,src:000000,op:flip1,pos:313,+cov rename to src/exchange/afl-tests/id:000159,src:000000,op:flip1,pos:313,+cov diff --git a/src/mint/afl-tests/id:000160,src:000000,op:flip1,pos:299,+cov b/src/exchange/afl-tests/id:000160,src:000000,op:flip1,pos:299,+cov similarity index 100% rename from src/mint/afl-tests/id:000160,src:000000,op:flip1,pos:299,+cov rename to src/exchange/afl-tests/id:000160,src:000000,op:flip1,pos:299,+cov diff --git a/src/mint/afl-tests/id:000160,src:000000,op:flip1,pos:314,+cov b/src/exchange/afl-tests/id:000160,src:000000,op:flip1,pos:314,+cov similarity index 100% rename from src/mint/afl-tests/id:000160,src:000000,op:flip1,pos:314,+cov rename to src/exchange/afl-tests/id:000160,src:000000,op:flip1,pos:314,+cov diff --git a/src/mint/afl-tests/id:000161,src:000000,op:flip1,pos:306,+cov b/src/exchange/afl-tests/id:000161,src:000000,op:flip1,pos:306,+cov similarity index 100% rename from src/mint/afl-tests/id:000161,src:000000,op:flip1,pos:306,+cov rename to src/exchange/afl-tests/id:000161,src:000000,op:flip1,pos:306,+cov diff --git a/src/mint/afl-tests/id:000161,src:000000,op:flip1,pos:314,+cov b/src/exchange/afl-tests/id:000161,src:000000,op:flip1,pos:314,+cov similarity index 100% rename from src/mint/afl-tests/id:000161,src:000000,op:flip1,pos:314,+cov rename to src/exchange/afl-tests/id:000161,src:000000,op:flip1,pos:314,+cov diff --git a/src/mint/afl-tests/id:000162,src:000000,op:flip1,pos:308,+cov b/src/exchange/afl-tests/id:000162,src:000000,op:flip1,pos:308,+cov similarity index 100% rename from src/mint/afl-tests/id:000162,src:000000,op:flip1,pos:308,+cov rename to src/exchange/afl-tests/id:000162,src:000000,op:flip1,pos:308,+cov diff --git a/src/mint/afl-tests/id:000162,src:000000,op:flip1,pos:315,+cov b/src/exchange/afl-tests/id:000162,src:000000,op:flip1,pos:315,+cov similarity index 100% rename from src/mint/afl-tests/id:000162,src:000000,op:flip1,pos:315,+cov rename to src/exchange/afl-tests/id:000162,src:000000,op:flip1,pos:315,+cov diff --git a/src/mint/afl-tests/id:000163,src:000000,op:flip1,pos:312,+cov b/src/exchange/afl-tests/id:000163,src:000000,op:flip1,pos:312,+cov similarity index 100% rename from src/mint/afl-tests/id:000163,src:000000,op:flip1,pos:312,+cov rename to src/exchange/afl-tests/id:000163,src:000000,op:flip1,pos:312,+cov diff --git a/src/mint/afl-tests/id:000163,src:000000,op:flip1,pos:316,+cov b/src/exchange/afl-tests/id:000163,src:000000,op:flip1,pos:316,+cov similarity index 100% rename from src/mint/afl-tests/id:000163,src:000000,op:flip1,pos:316,+cov rename to src/exchange/afl-tests/id:000163,src:000000,op:flip1,pos:316,+cov diff --git a/src/mint/afl-tests/id:000164,src:000000,op:flip1,pos:315,+cov b/src/exchange/afl-tests/id:000164,src:000000,op:flip1,pos:315,+cov similarity index 100% rename from src/mint/afl-tests/id:000164,src:000000,op:flip1,pos:315,+cov rename to src/exchange/afl-tests/id:000164,src:000000,op:flip1,pos:315,+cov diff --git a/src/mint/afl-tests/id:000164,src:000000,op:flip1,pos:317 b/src/exchange/afl-tests/id:000164,src:000000,op:flip1,pos:317 similarity index 100% rename from src/mint/afl-tests/id:000164,src:000000,op:flip1,pos:317 rename to src/exchange/afl-tests/id:000164,src:000000,op:flip1,pos:317 diff --git a/src/mint/afl-tests/id:000165,src:000000,op:flip1,pos:316,+cov b/src/exchange/afl-tests/id:000165,src:000000,op:flip1,pos:316,+cov similarity index 100% rename from src/mint/afl-tests/id:000165,src:000000,op:flip1,pos:316,+cov rename to src/exchange/afl-tests/id:000165,src:000000,op:flip1,pos:316,+cov diff --git a/src/mint/afl-tests/id:000165,src:000000,op:flip1,pos:317,+cov b/src/exchange/afl-tests/id:000165,src:000000,op:flip1,pos:317,+cov similarity index 100% rename from src/mint/afl-tests/id:000165,src:000000,op:flip1,pos:317,+cov rename to src/exchange/afl-tests/id:000165,src:000000,op:flip1,pos:317,+cov diff --git a/src/mint/afl-tests/id:000166,src:000000,op:flip1,pos:316,+cov b/src/exchange/afl-tests/id:000166,src:000000,op:flip1,pos:316,+cov similarity index 100% rename from src/mint/afl-tests/id:000166,src:000000,op:flip1,pos:316,+cov rename to src/exchange/afl-tests/id:000166,src:000000,op:flip1,pos:316,+cov diff --git a/src/mint/afl-tests/id:000166,src:000000,op:flip1,pos:319,+cov b/src/exchange/afl-tests/id:000166,src:000000,op:flip1,pos:319,+cov similarity index 100% rename from src/mint/afl-tests/id:000166,src:000000,op:flip1,pos:319,+cov rename to src/exchange/afl-tests/id:000166,src:000000,op:flip1,pos:319,+cov diff --git a/src/mint/afl-tests/id:000167,src:000000,op:flip1,pos:317,+cov b/src/exchange/afl-tests/id:000167,src:000000,op:flip1,pos:317,+cov similarity index 100% rename from src/mint/afl-tests/id:000167,src:000000,op:flip1,pos:317,+cov rename to src/exchange/afl-tests/id:000167,src:000000,op:flip1,pos:317,+cov diff --git a/src/mint/afl-tests/id:000167,src:000000,op:flip1,pos:320,+cov b/src/exchange/afl-tests/id:000167,src:000000,op:flip1,pos:320,+cov similarity index 100% rename from src/mint/afl-tests/id:000167,src:000000,op:flip1,pos:320,+cov rename to src/exchange/afl-tests/id:000167,src:000000,op:flip1,pos:320,+cov diff --git a/src/mint/afl-tests/id:000168,src:000000,op:flip1,pos:317,+cov b/src/exchange/afl-tests/id:000168,src:000000,op:flip1,pos:317,+cov similarity index 100% rename from src/mint/afl-tests/id:000168,src:000000,op:flip1,pos:317,+cov rename to src/exchange/afl-tests/id:000168,src:000000,op:flip1,pos:317,+cov diff --git a/src/mint/afl-tests/id:000168,src:000000,op:flip1,pos:322,+cov b/src/exchange/afl-tests/id:000168,src:000000,op:flip1,pos:322,+cov similarity index 100% rename from src/mint/afl-tests/id:000168,src:000000,op:flip1,pos:322,+cov rename to src/exchange/afl-tests/id:000168,src:000000,op:flip1,pos:322,+cov diff --git a/src/mint/afl-tests/id:000169,src:000000,op:flip1,pos:318,+cov b/src/exchange/afl-tests/id:000169,src:000000,op:flip1,pos:318,+cov similarity index 100% rename from src/mint/afl-tests/id:000169,src:000000,op:flip1,pos:318,+cov rename to src/exchange/afl-tests/id:000169,src:000000,op:flip1,pos:318,+cov diff --git a/src/mint/afl-tests/id:000169,src:000000,op:flip1,pos:326,+cov b/src/exchange/afl-tests/id:000169,src:000000,op:flip1,pos:326,+cov similarity index 100% rename from src/mint/afl-tests/id:000169,src:000000,op:flip1,pos:326,+cov rename to src/exchange/afl-tests/id:000169,src:000000,op:flip1,pos:326,+cov diff --git a/src/mint/afl-tests/id:000170,src:000000,op:flip1,pos:319,+cov b/src/exchange/afl-tests/id:000170,src:000000,op:flip1,pos:319,+cov similarity index 100% rename from src/mint/afl-tests/id:000170,src:000000,op:flip1,pos:319,+cov rename to src/exchange/afl-tests/id:000170,src:000000,op:flip1,pos:319,+cov diff --git a/src/mint/afl-tests/id:000170,src:000000,op:flip1,pos:328,+cov b/src/exchange/afl-tests/id:000170,src:000000,op:flip1,pos:328,+cov similarity index 100% rename from src/mint/afl-tests/id:000170,src:000000,op:flip1,pos:328,+cov rename to src/exchange/afl-tests/id:000170,src:000000,op:flip1,pos:328,+cov diff --git a/src/mint/afl-tests/id:000171,src:000000,op:flip1,pos:326,+cov b/src/exchange/afl-tests/id:000171,src:000000,op:flip1,pos:326,+cov similarity index 100% rename from src/mint/afl-tests/id:000171,src:000000,op:flip1,pos:326,+cov rename to src/exchange/afl-tests/id:000171,src:000000,op:flip1,pos:326,+cov diff --git a/src/mint/afl-tests/id:000171,src:000000,op:flip1,pos:329 b/src/exchange/afl-tests/id:000171,src:000000,op:flip1,pos:329 similarity index 100% rename from src/mint/afl-tests/id:000171,src:000000,op:flip1,pos:329 rename to src/exchange/afl-tests/id:000171,src:000000,op:flip1,pos:329 diff --git a/src/mint/afl-tests/id:000172,src:000000,op:flip1,pos:327 b/src/exchange/afl-tests/id:000172,src:000000,op:flip1,pos:327 similarity index 100% rename from src/mint/afl-tests/id:000172,src:000000,op:flip1,pos:327 rename to src/exchange/afl-tests/id:000172,src:000000,op:flip1,pos:327 diff --git a/src/mint/afl-tests/id:000172,src:000000,op:flip1,pos:332,+cov b/src/exchange/afl-tests/id:000172,src:000000,op:flip1,pos:332,+cov similarity index 100% rename from src/mint/afl-tests/id:000172,src:000000,op:flip1,pos:332,+cov rename to src/exchange/afl-tests/id:000172,src:000000,op:flip1,pos:332,+cov diff --git a/src/mint/afl-tests/id:000173,src:000000,op:flip1,pos:330,+cov b/src/exchange/afl-tests/id:000173,src:000000,op:flip1,pos:330,+cov similarity index 100% rename from src/mint/afl-tests/id:000173,src:000000,op:flip1,pos:330,+cov rename to src/exchange/afl-tests/id:000173,src:000000,op:flip1,pos:330,+cov diff --git a/src/mint/afl-tests/id:000173,src:000000,op:flip2,pos:8,+cov b/src/exchange/afl-tests/id:000173,src:000000,op:flip2,pos:8,+cov similarity index 100% rename from src/mint/afl-tests/id:000173,src:000000,op:flip2,pos:8,+cov rename to src/exchange/afl-tests/id:000173,src:000000,op:flip2,pos:8,+cov diff --git a/src/mint/afl-tests/id:000174,src:000000,op:flip1,pos:331,+cov b/src/exchange/afl-tests/id:000174,src:000000,op:flip1,pos:331,+cov similarity index 100% rename from src/mint/afl-tests/id:000174,src:000000,op:flip1,pos:331,+cov rename to src/exchange/afl-tests/id:000174,src:000000,op:flip1,pos:331,+cov diff --git a/src/mint/afl-tests/id:000174,src:000000,op:flip2,pos:8,+cov b/src/exchange/afl-tests/id:000174,src:000000,op:flip2,pos:8,+cov similarity index 100% rename from src/mint/afl-tests/id:000174,src:000000,op:flip2,pos:8,+cov rename to src/exchange/afl-tests/id:000174,src:000000,op:flip2,pos:8,+cov diff --git a/src/mint/afl-tests/id:000175,src:000000,op:flip1,pos:338,+cov b/src/exchange/afl-tests/id:000175,src:000000,op:flip1,pos:338,+cov similarity index 100% rename from src/mint/afl-tests/id:000175,src:000000,op:flip1,pos:338,+cov rename to src/exchange/afl-tests/id:000175,src:000000,op:flip1,pos:338,+cov diff --git a/src/mint/afl-tests/id:000175,src:000000,op:flip2,pos:28,+cov b/src/exchange/afl-tests/id:000175,src:000000,op:flip2,pos:28,+cov similarity index 100% rename from src/mint/afl-tests/id:000175,src:000000,op:flip2,pos:28,+cov rename to src/exchange/afl-tests/id:000175,src:000000,op:flip2,pos:28,+cov diff --git a/src/mint/afl-tests/id:000176,src:000000,op:flip2,pos:30,+cov b/src/exchange/afl-tests/id:000176,src:000000,op:flip2,pos:30,+cov similarity index 100% rename from src/mint/afl-tests/id:000176,src:000000,op:flip2,pos:30,+cov rename to src/exchange/afl-tests/id:000176,src:000000,op:flip2,pos:30,+cov diff --git a/src/mint/afl-tests/id:000176,src:000000,op:flip2,pos:8,+cov b/src/exchange/afl-tests/id:000176,src:000000,op:flip2,pos:8,+cov similarity index 100% rename from src/mint/afl-tests/id:000176,src:000000,op:flip2,pos:8,+cov rename to src/exchange/afl-tests/id:000176,src:000000,op:flip2,pos:8,+cov diff --git a/src/mint/afl-tests/id:000177,src:000000,op:flip2,pos:25,+cov b/src/exchange/afl-tests/id:000177,src:000000,op:flip2,pos:25,+cov similarity index 100% rename from src/mint/afl-tests/id:000177,src:000000,op:flip2,pos:25,+cov rename to src/exchange/afl-tests/id:000177,src:000000,op:flip2,pos:25,+cov diff --git a/src/mint/afl-tests/id:000177,src:000000,op:flip2,pos:30,+cov b/src/exchange/afl-tests/id:000177,src:000000,op:flip2,pos:30,+cov similarity index 100% rename from src/mint/afl-tests/id:000177,src:000000,op:flip2,pos:30,+cov rename to src/exchange/afl-tests/id:000177,src:000000,op:flip2,pos:30,+cov diff --git a/src/mint/afl-tests/id:000178,src:000000,op:flip2,pos:26,+cov b/src/exchange/afl-tests/id:000178,src:000000,op:flip2,pos:26,+cov similarity index 100% rename from src/mint/afl-tests/id:000178,src:000000,op:flip2,pos:26,+cov rename to src/exchange/afl-tests/id:000178,src:000000,op:flip2,pos:26,+cov diff --git a/src/mint/afl-tests/id:000178,src:000000,op:flip2,pos:31,+cov b/src/exchange/afl-tests/id:000178,src:000000,op:flip2,pos:31,+cov similarity index 100% rename from src/mint/afl-tests/id:000178,src:000000,op:flip2,pos:31,+cov rename to src/exchange/afl-tests/id:000178,src:000000,op:flip2,pos:31,+cov diff --git a/src/mint/afl-tests/id:000179,src:000000,op:flip2,pos:29,+cov b/src/exchange/afl-tests/id:000179,src:000000,op:flip2,pos:29,+cov similarity index 100% rename from src/mint/afl-tests/id:000179,src:000000,op:flip2,pos:29,+cov rename to src/exchange/afl-tests/id:000179,src:000000,op:flip2,pos:29,+cov diff --git a/src/mint/afl-tests/id:000179,src:000000,op:flip2,pos:31,+cov b/src/exchange/afl-tests/id:000179,src:000000,op:flip2,pos:31,+cov similarity index 100% rename from src/mint/afl-tests/id:000179,src:000000,op:flip2,pos:31,+cov rename to src/exchange/afl-tests/id:000179,src:000000,op:flip2,pos:31,+cov diff --git a/src/mint/afl-tests/id:000180,src:000000,op:flip2,pos:30,+cov b/src/exchange/afl-tests/id:000180,src:000000,op:flip2,pos:30,+cov similarity index 100% rename from src/mint/afl-tests/id:000180,src:000000,op:flip2,pos:30,+cov rename to src/exchange/afl-tests/id:000180,src:000000,op:flip2,pos:30,+cov diff --git a/src/mint/afl-tests/id:000180,src:000000,op:flip2,pos:32,+cov b/src/exchange/afl-tests/id:000180,src:000000,op:flip2,pos:32,+cov similarity index 100% rename from src/mint/afl-tests/id:000180,src:000000,op:flip2,pos:32,+cov rename to src/exchange/afl-tests/id:000180,src:000000,op:flip2,pos:32,+cov diff --git a/src/mint/afl-tests/id:000181,src:000000,op:flip2,pos:33,+cov b/src/exchange/afl-tests/id:000181,src:000000,op:flip2,pos:33,+cov similarity index 100% rename from src/mint/afl-tests/id:000181,src:000000,op:flip2,pos:33,+cov rename to src/exchange/afl-tests/id:000181,src:000000,op:flip2,pos:33,+cov diff --git a/src/mint/afl-tests/id:000181,src:000000,op:flip2,pos:36,+cov b/src/exchange/afl-tests/id:000181,src:000000,op:flip2,pos:36,+cov similarity index 100% rename from src/mint/afl-tests/id:000181,src:000000,op:flip2,pos:36,+cov rename to src/exchange/afl-tests/id:000181,src:000000,op:flip2,pos:36,+cov diff --git a/src/mint/afl-tests/id:000182,src:000000,op:flip2,pos:38 b/src/exchange/afl-tests/id:000182,src:000000,op:flip2,pos:38 similarity index 100% rename from src/mint/afl-tests/id:000182,src:000000,op:flip2,pos:38 rename to src/exchange/afl-tests/id:000182,src:000000,op:flip2,pos:38 diff --git a/src/mint/afl-tests/id:000183,src:000000,op:flip2,pos:39,+cov b/src/exchange/afl-tests/id:000183,src:000000,op:flip2,pos:39,+cov similarity index 100% rename from src/mint/afl-tests/id:000183,src:000000,op:flip2,pos:39,+cov rename to src/exchange/afl-tests/id:000183,src:000000,op:flip2,pos:39,+cov diff --git a/src/mint/afl-tests/id:000184,src:000000,op:flip2,pos:40,+cov b/src/exchange/afl-tests/id:000184,src:000000,op:flip2,pos:40,+cov similarity index 100% rename from src/mint/afl-tests/id:000184,src:000000,op:flip2,pos:40,+cov rename to src/exchange/afl-tests/id:000184,src:000000,op:flip2,pos:40,+cov diff --git a/src/mint/afl-tests/id:000184,src:000000,op:flip2,pos:43,+cov b/src/exchange/afl-tests/id:000184,src:000000,op:flip2,pos:43,+cov similarity index 100% rename from src/mint/afl-tests/id:000184,src:000000,op:flip2,pos:43,+cov rename to src/exchange/afl-tests/id:000184,src:000000,op:flip2,pos:43,+cov diff --git a/src/mint/afl-tests/id:000185,src:000000,op:flip2,pos:40,+cov b/src/exchange/afl-tests/id:000185,src:000000,op:flip2,pos:40,+cov similarity index 100% rename from src/mint/afl-tests/id:000185,src:000000,op:flip2,pos:40,+cov rename to src/exchange/afl-tests/id:000185,src:000000,op:flip2,pos:40,+cov diff --git a/src/mint/afl-tests/id:000185,src:000000,op:flip2,pos:49,+cov b/src/exchange/afl-tests/id:000185,src:000000,op:flip2,pos:49,+cov similarity index 100% rename from src/mint/afl-tests/id:000185,src:000000,op:flip2,pos:49,+cov rename to src/exchange/afl-tests/id:000185,src:000000,op:flip2,pos:49,+cov diff --git a/src/mint/afl-tests/id:000186,src:000000,op:flip2,pos:40,+cov b/src/exchange/afl-tests/id:000186,src:000000,op:flip2,pos:40,+cov similarity index 100% rename from src/mint/afl-tests/id:000186,src:000000,op:flip2,pos:40,+cov rename to src/exchange/afl-tests/id:000186,src:000000,op:flip2,pos:40,+cov diff --git a/src/mint/afl-tests/id:000186,src:000000,op:flip2,pos:54,+cov b/src/exchange/afl-tests/id:000186,src:000000,op:flip2,pos:54,+cov similarity index 100% rename from src/mint/afl-tests/id:000186,src:000000,op:flip2,pos:54,+cov rename to src/exchange/afl-tests/id:000186,src:000000,op:flip2,pos:54,+cov diff --git a/src/mint/afl-tests/id:000187,src:000000,op:flip2,pos:46,+cov b/src/exchange/afl-tests/id:000187,src:000000,op:flip2,pos:46,+cov similarity index 100% rename from src/mint/afl-tests/id:000187,src:000000,op:flip2,pos:46,+cov rename to src/exchange/afl-tests/id:000187,src:000000,op:flip2,pos:46,+cov diff --git a/src/mint/afl-tests/id:000187,src:000000,op:flip2,pos:60,+cov b/src/exchange/afl-tests/id:000187,src:000000,op:flip2,pos:60,+cov similarity index 100% rename from src/mint/afl-tests/id:000187,src:000000,op:flip2,pos:60,+cov rename to src/exchange/afl-tests/id:000187,src:000000,op:flip2,pos:60,+cov diff --git a/src/mint/afl-tests/id:000188,src:000000,op:flip2,pos:47,+cov b/src/exchange/afl-tests/id:000188,src:000000,op:flip2,pos:47,+cov similarity index 100% rename from src/mint/afl-tests/id:000188,src:000000,op:flip2,pos:47,+cov rename to src/exchange/afl-tests/id:000188,src:000000,op:flip2,pos:47,+cov diff --git a/src/mint/afl-tests/id:000188,src:000000,op:flip2,pos:64,+cov b/src/exchange/afl-tests/id:000188,src:000000,op:flip2,pos:64,+cov similarity index 100% rename from src/mint/afl-tests/id:000188,src:000000,op:flip2,pos:64,+cov rename to src/exchange/afl-tests/id:000188,src:000000,op:flip2,pos:64,+cov diff --git a/src/mint/afl-tests/id:000189,src:000000,op:flip2,pos:48,+cov b/src/exchange/afl-tests/id:000189,src:000000,op:flip2,pos:48,+cov similarity index 100% rename from src/mint/afl-tests/id:000189,src:000000,op:flip2,pos:48,+cov rename to src/exchange/afl-tests/id:000189,src:000000,op:flip2,pos:48,+cov diff --git a/src/mint/afl-tests/id:000189,src:000000,op:flip2,pos:69,+cov b/src/exchange/afl-tests/id:000189,src:000000,op:flip2,pos:69,+cov similarity index 100% rename from src/mint/afl-tests/id:000189,src:000000,op:flip2,pos:69,+cov rename to src/exchange/afl-tests/id:000189,src:000000,op:flip2,pos:69,+cov diff --git a/src/mint/afl-tests/id:000190,src:000000,op:flip2,pos:49,+cov b/src/exchange/afl-tests/id:000190,src:000000,op:flip2,pos:49,+cov similarity index 100% rename from src/mint/afl-tests/id:000190,src:000000,op:flip2,pos:49,+cov rename to src/exchange/afl-tests/id:000190,src:000000,op:flip2,pos:49,+cov diff --git a/src/mint/afl-tests/id:000190,src:000000,op:flip2,pos:71,+cov b/src/exchange/afl-tests/id:000190,src:000000,op:flip2,pos:71,+cov similarity index 100% rename from src/mint/afl-tests/id:000190,src:000000,op:flip2,pos:71,+cov rename to src/exchange/afl-tests/id:000190,src:000000,op:flip2,pos:71,+cov diff --git a/src/mint/afl-tests/id:000191,src:000000,op:flip2,pos:53,+cov b/src/exchange/afl-tests/id:000191,src:000000,op:flip2,pos:53,+cov similarity index 100% rename from src/mint/afl-tests/id:000191,src:000000,op:flip2,pos:53,+cov rename to src/exchange/afl-tests/id:000191,src:000000,op:flip2,pos:53,+cov diff --git a/src/mint/afl-tests/id:000191,src:000000,op:flip2,pos:73,+cov b/src/exchange/afl-tests/id:000191,src:000000,op:flip2,pos:73,+cov similarity index 100% rename from src/mint/afl-tests/id:000191,src:000000,op:flip2,pos:73,+cov rename to src/exchange/afl-tests/id:000191,src:000000,op:flip2,pos:73,+cov diff --git a/src/mint/afl-tests/id:000192,src:000000,op:flip2,pos:53,+cov b/src/exchange/afl-tests/id:000192,src:000000,op:flip2,pos:53,+cov similarity index 100% rename from src/mint/afl-tests/id:000192,src:000000,op:flip2,pos:53,+cov rename to src/exchange/afl-tests/id:000192,src:000000,op:flip2,pos:53,+cov diff --git a/src/mint/afl-tests/id:000192,src:000000,op:flip2,pos:73,+cov b/src/exchange/afl-tests/id:000192,src:000000,op:flip2,pos:73,+cov similarity index 100% rename from src/mint/afl-tests/id:000192,src:000000,op:flip2,pos:73,+cov rename to src/exchange/afl-tests/id:000192,src:000000,op:flip2,pos:73,+cov diff --git a/src/mint/afl-tests/id:000193,src:000000,op:flip2,pos:62,+cov b/src/exchange/afl-tests/id:000193,src:000000,op:flip2,pos:62,+cov similarity index 100% rename from src/mint/afl-tests/id:000193,src:000000,op:flip2,pos:62,+cov rename to src/exchange/afl-tests/id:000193,src:000000,op:flip2,pos:62,+cov diff --git a/src/mint/afl-tests/id:000193,src:000000,op:flip2,pos:75 b/src/exchange/afl-tests/id:000193,src:000000,op:flip2,pos:75 similarity index 100% rename from src/mint/afl-tests/id:000193,src:000000,op:flip2,pos:75 rename to src/exchange/afl-tests/id:000193,src:000000,op:flip2,pos:75 diff --git a/src/mint/afl-tests/id:000194,src:000000,op:flip2,pos:68,+cov b/src/exchange/afl-tests/id:000194,src:000000,op:flip2,pos:68,+cov similarity index 100% rename from src/mint/afl-tests/id:000194,src:000000,op:flip2,pos:68,+cov rename to src/exchange/afl-tests/id:000194,src:000000,op:flip2,pos:68,+cov diff --git a/src/mint/afl-tests/id:000194,src:000000,op:flip2,pos:77,+cov b/src/exchange/afl-tests/id:000194,src:000000,op:flip2,pos:77,+cov similarity index 100% rename from src/mint/afl-tests/id:000194,src:000000,op:flip2,pos:77,+cov rename to src/exchange/afl-tests/id:000194,src:000000,op:flip2,pos:77,+cov diff --git a/src/mint/afl-tests/id:000195,src:000000,op:flip2,pos:70,+cov b/src/exchange/afl-tests/id:000195,src:000000,op:flip2,pos:70,+cov similarity index 100% rename from src/mint/afl-tests/id:000195,src:000000,op:flip2,pos:70,+cov rename to src/exchange/afl-tests/id:000195,src:000000,op:flip2,pos:70,+cov diff --git a/src/mint/afl-tests/id:000195,src:000000,op:flip2,pos:81,+cov b/src/exchange/afl-tests/id:000195,src:000000,op:flip2,pos:81,+cov similarity index 100% rename from src/mint/afl-tests/id:000195,src:000000,op:flip2,pos:81,+cov rename to src/exchange/afl-tests/id:000195,src:000000,op:flip2,pos:81,+cov diff --git a/src/mint/afl-tests/id:000196,src:000000,op:flip2,pos:73,+cov b/src/exchange/afl-tests/id:000196,src:000000,op:flip2,pos:73,+cov similarity index 100% rename from src/mint/afl-tests/id:000196,src:000000,op:flip2,pos:73,+cov rename to src/exchange/afl-tests/id:000196,src:000000,op:flip2,pos:73,+cov diff --git a/src/mint/afl-tests/id:000196,src:000000,op:flip2,pos:81,+cov b/src/exchange/afl-tests/id:000196,src:000000,op:flip2,pos:81,+cov similarity index 100% rename from src/mint/afl-tests/id:000196,src:000000,op:flip2,pos:81,+cov rename to src/exchange/afl-tests/id:000196,src:000000,op:flip2,pos:81,+cov diff --git a/src/mint/afl-tests/id:000197,src:000000,op:flip2,pos:73,+cov b/src/exchange/afl-tests/id:000197,src:000000,op:flip2,pos:73,+cov similarity index 100% rename from src/mint/afl-tests/id:000197,src:000000,op:flip2,pos:73,+cov rename to src/exchange/afl-tests/id:000197,src:000000,op:flip2,pos:73,+cov diff --git a/src/mint/afl-tests/id:000197,src:000000,op:flip2,pos:83,+cov b/src/exchange/afl-tests/id:000197,src:000000,op:flip2,pos:83,+cov similarity index 100% rename from src/mint/afl-tests/id:000197,src:000000,op:flip2,pos:83,+cov rename to src/exchange/afl-tests/id:000197,src:000000,op:flip2,pos:83,+cov diff --git a/src/mint/afl-tests/id:000198,src:000000,op:flip2,pos:76,+cov b/src/exchange/afl-tests/id:000198,src:000000,op:flip2,pos:76,+cov similarity index 100% rename from src/mint/afl-tests/id:000198,src:000000,op:flip2,pos:76,+cov rename to src/exchange/afl-tests/id:000198,src:000000,op:flip2,pos:76,+cov diff --git a/src/mint/afl-tests/id:000198,src:000000,op:flip2,pos:84,+cov b/src/exchange/afl-tests/id:000198,src:000000,op:flip2,pos:84,+cov similarity index 100% rename from src/mint/afl-tests/id:000198,src:000000,op:flip2,pos:84,+cov rename to src/exchange/afl-tests/id:000198,src:000000,op:flip2,pos:84,+cov diff --git a/src/mint/afl-tests/id:000199,src:000000,op:flip2,pos:76,+cov b/src/exchange/afl-tests/id:000199,src:000000,op:flip2,pos:76,+cov similarity index 100% rename from src/mint/afl-tests/id:000199,src:000000,op:flip2,pos:76,+cov rename to src/exchange/afl-tests/id:000199,src:000000,op:flip2,pos:76,+cov diff --git a/src/mint/afl-tests/id:000199,src:000000,op:flip2,pos:85,+cov b/src/exchange/afl-tests/id:000199,src:000000,op:flip2,pos:85,+cov similarity index 100% rename from src/mint/afl-tests/id:000199,src:000000,op:flip2,pos:85,+cov rename to src/exchange/afl-tests/id:000199,src:000000,op:flip2,pos:85,+cov diff --git a/src/mint/afl-tests/id:000200,src:000000,op:flip2,pos:80,+cov b/src/exchange/afl-tests/id:000200,src:000000,op:flip2,pos:80,+cov similarity index 100% rename from src/mint/afl-tests/id:000200,src:000000,op:flip2,pos:80,+cov rename to src/exchange/afl-tests/id:000200,src:000000,op:flip2,pos:80,+cov diff --git a/src/mint/afl-tests/id:000200,src:000000,op:flip2,pos:86,+cov b/src/exchange/afl-tests/id:000200,src:000000,op:flip2,pos:86,+cov similarity index 100% rename from src/mint/afl-tests/id:000200,src:000000,op:flip2,pos:86,+cov rename to src/exchange/afl-tests/id:000200,src:000000,op:flip2,pos:86,+cov diff --git a/src/mint/afl-tests/id:000201,src:000000,op:flip2,pos:86,+cov b/src/exchange/afl-tests/id:000201,src:000000,op:flip2,pos:86,+cov similarity index 100% rename from src/mint/afl-tests/id:000201,src:000000,op:flip2,pos:86,+cov rename to src/exchange/afl-tests/id:000201,src:000000,op:flip2,pos:86,+cov diff --git a/src/mint/afl-tests/id:000201,src:000000,op:flip2,pos:89,+cov b/src/exchange/afl-tests/id:000201,src:000000,op:flip2,pos:89,+cov similarity index 100% rename from src/mint/afl-tests/id:000201,src:000000,op:flip2,pos:89,+cov rename to src/exchange/afl-tests/id:000201,src:000000,op:flip2,pos:89,+cov diff --git a/src/mint/afl-tests/id:000202,src:000000,op:flip2,pos:101,+cov b/src/exchange/afl-tests/id:000202,src:000000,op:flip2,pos:101,+cov similarity index 100% rename from src/mint/afl-tests/id:000202,src:000000,op:flip2,pos:101,+cov rename to src/exchange/afl-tests/id:000202,src:000000,op:flip2,pos:101,+cov diff --git a/src/mint/afl-tests/id:000202,src:000000,op:flip2,pos:90,+cov b/src/exchange/afl-tests/id:000202,src:000000,op:flip2,pos:90,+cov similarity index 100% rename from src/mint/afl-tests/id:000202,src:000000,op:flip2,pos:90,+cov rename to src/exchange/afl-tests/id:000202,src:000000,op:flip2,pos:90,+cov diff --git a/src/mint/afl-tests/id:000203,src:000000,op:flip2,pos:114 b/src/exchange/afl-tests/id:000203,src:000000,op:flip2,pos:114 similarity index 100% rename from src/mint/afl-tests/id:000203,src:000000,op:flip2,pos:114 rename to src/exchange/afl-tests/id:000203,src:000000,op:flip2,pos:114 diff --git a/src/mint/afl-tests/id:000203,src:000000,op:flip2,pos:93,+cov b/src/exchange/afl-tests/id:000203,src:000000,op:flip2,pos:93,+cov similarity index 100% rename from src/mint/afl-tests/id:000203,src:000000,op:flip2,pos:93,+cov rename to src/exchange/afl-tests/id:000203,src:000000,op:flip2,pos:93,+cov diff --git a/src/mint/afl-tests/id:000204,src:000000,op:flip2,pos:100,+cov b/src/exchange/afl-tests/id:000204,src:000000,op:flip2,pos:100,+cov similarity index 100% rename from src/mint/afl-tests/id:000204,src:000000,op:flip2,pos:100,+cov rename to src/exchange/afl-tests/id:000204,src:000000,op:flip2,pos:100,+cov diff --git a/src/mint/afl-tests/id:000204,src:000000,op:flip2,pos:115,+cov b/src/exchange/afl-tests/id:000204,src:000000,op:flip2,pos:115,+cov similarity index 100% rename from src/mint/afl-tests/id:000204,src:000000,op:flip2,pos:115,+cov rename to src/exchange/afl-tests/id:000204,src:000000,op:flip2,pos:115,+cov diff --git a/src/mint/afl-tests/id:000205,src:000000,op:flip2,pos:114 b/src/exchange/afl-tests/id:000205,src:000000,op:flip2,pos:114 similarity index 100% rename from src/mint/afl-tests/id:000205,src:000000,op:flip2,pos:114 rename to src/exchange/afl-tests/id:000205,src:000000,op:flip2,pos:114 diff --git a/src/mint/afl-tests/id:000205,src:000000,op:flip2,pos:116,+cov b/src/exchange/afl-tests/id:000205,src:000000,op:flip2,pos:116,+cov similarity index 100% rename from src/mint/afl-tests/id:000205,src:000000,op:flip2,pos:116,+cov rename to src/exchange/afl-tests/id:000205,src:000000,op:flip2,pos:116,+cov diff --git a/src/mint/afl-tests/id:000206,src:000000,op:flip2,pos:115,+cov b/src/exchange/afl-tests/id:000206,src:000000,op:flip2,pos:115,+cov similarity index 100% rename from src/mint/afl-tests/id:000206,src:000000,op:flip2,pos:115,+cov rename to src/exchange/afl-tests/id:000206,src:000000,op:flip2,pos:115,+cov diff --git a/src/mint/afl-tests/id:000206,src:000000,op:flip2,pos:140,+cov b/src/exchange/afl-tests/id:000206,src:000000,op:flip2,pos:140,+cov similarity index 100% rename from src/mint/afl-tests/id:000206,src:000000,op:flip2,pos:140,+cov rename to src/exchange/afl-tests/id:000206,src:000000,op:flip2,pos:140,+cov diff --git a/src/mint/afl-tests/id:000207,src:000000,op:flip2,pos:116,+cov b/src/exchange/afl-tests/id:000207,src:000000,op:flip2,pos:116,+cov similarity index 100% rename from src/mint/afl-tests/id:000207,src:000000,op:flip2,pos:116,+cov rename to src/exchange/afl-tests/id:000207,src:000000,op:flip2,pos:116,+cov diff --git a/src/mint/afl-tests/id:000207,src:000000,op:flip2,pos:140,+cov b/src/exchange/afl-tests/id:000207,src:000000,op:flip2,pos:140,+cov similarity index 100% rename from src/mint/afl-tests/id:000207,src:000000,op:flip2,pos:140,+cov rename to src/exchange/afl-tests/id:000207,src:000000,op:flip2,pos:140,+cov diff --git a/src/mint/afl-tests/id:000208,src:000000,op:flip2,pos:124,+cov b/src/exchange/afl-tests/id:000208,src:000000,op:flip2,pos:124,+cov similarity index 100% rename from src/mint/afl-tests/id:000208,src:000000,op:flip2,pos:124,+cov rename to src/exchange/afl-tests/id:000208,src:000000,op:flip2,pos:124,+cov diff --git a/src/mint/afl-tests/id:000208,src:000000,op:flip2,pos:146,+cov b/src/exchange/afl-tests/id:000208,src:000000,op:flip2,pos:146,+cov similarity index 100% rename from src/mint/afl-tests/id:000208,src:000000,op:flip2,pos:146,+cov rename to src/exchange/afl-tests/id:000208,src:000000,op:flip2,pos:146,+cov diff --git a/src/mint/afl-tests/id:000209,src:000000,op:flip2,pos:135,+cov b/src/exchange/afl-tests/id:000209,src:000000,op:flip2,pos:135,+cov similarity index 100% rename from src/mint/afl-tests/id:000209,src:000000,op:flip2,pos:135,+cov rename to src/exchange/afl-tests/id:000209,src:000000,op:flip2,pos:135,+cov diff --git a/src/mint/afl-tests/id:000209,src:000000,op:flip2,pos:147,+cov b/src/exchange/afl-tests/id:000209,src:000000,op:flip2,pos:147,+cov similarity index 100% rename from src/mint/afl-tests/id:000209,src:000000,op:flip2,pos:147,+cov rename to src/exchange/afl-tests/id:000209,src:000000,op:flip2,pos:147,+cov diff --git a/src/mint/afl-tests/id:000210,src:000000,op:flip2,pos:137,+cov b/src/exchange/afl-tests/id:000210,src:000000,op:flip2,pos:137,+cov similarity index 100% rename from src/mint/afl-tests/id:000210,src:000000,op:flip2,pos:137,+cov rename to src/exchange/afl-tests/id:000210,src:000000,op:flip2,pos:137,+cov diff --git a/src/mint/afl-tests/id:000210,src:000000,op:flip2,pos:148,+cov b/src/exchange/afl-tests/id:000210,src:000000,op:flip2,pos:148,+cov similarity index 100% rename from src/mint/afl-tests/id:000210,src:000000,op:flip2,pos:148,+cov rename to src/exchange/afl-tests/id:000210,src:000000,op:flip2,pos:148,+cov diff --git a/src/mint/afl-tests/id:000211,src:000000,op:flip2,pos:138,+cov b/src/exchange/afl-tests/id:000211,src:000000,op:flip2,pos:138,+cov similarity index 100% rename from src/mint/afl-tests/id:000211,src:000000,op:flip2,pos:138,+cov rename to src/exchange/afl-tests/id:000211,src:000000,op:flip2,pos:138,+cov diff --git a/src/mint/afl-tests/id:000211,src:000000,op:flip2,pos:148,+cov b/src/exchange/afl-tests/id:000211,src:000000,op:flip2,pos:148,+cov similarity index 100% rename from src/mint/afl-tests/id:000211,src:000000,op:flip2,pos:148,+cov rename to src/exchange/afl-tests/id:000211,src:000000,op:flip2,pos:148,+cov diff --git a/src/mint/afl-tests/id:000212,src:000000,op:flip2,pos:138,+cov b/src/exchange/afl-tests/id:000212,src:000000,op:flip2,pos:138,+cov similarity index 100% rename from src/mint/afl-tests/id:000212,src:000000,op:flip2,pos:138,+cov rename to src/exchange/afl-tests/id:000212,src:000000,op:flip2,pos:138,+cov diff --git a/src/mint/afl-tests/id:000212,src:000000,op:flip2,pos:159,+cov b/src/exchange/afl-tests/id:000212,src:000000,op:flip2,pos:159,+cov similarity index 100% rename from src/mint/afl-tests/id:000212,src:000000,op:flip2,pos:159,+cov rename to src/exchange/afl-tests/id:000212,src:000000,op:flip2,pos:159,+cov diff --git a/src/mint/afl-tests/id:000213,src:000000,op:flip2,pos:139,+cov b/src/exchange/afl-tests/id:000213,src:000000,op:flip2,pos:139,+cov similarity index 100% rename from src/mint/afl-tests/id:000213,src:000000,op:flip2,pos:139,+cov rename to src/exchange/afl-tests/id:000213,src:000000,op:flip2,pos:139,+cov diff --git a/src/mint/afl-tests/id:000213,src:000000,op:flip2,pos:161,+cov b/src/exchange/afl-tests/id:000213,src:000000,op:flip2,pos:161,+cov similarity index 100% rename from src/mint/afl-tests/id:000213,src:000000,op:flip2,pos:161,+cov rename to src/exchange/afl-tests/id:000213,src:000000,op:flip2,pos:161,+cov diff --git a/src/mint/afl-tests/id:000214,src:000000,op:flip2,pos:143,+cov b/src/exchange/afl-tests/id:000214,src:000000,op:flip2,pos:143,+cov similarity index 100% rename from src/mint/afl-tests/id:000214,src:000000,op:flip2,pos:143,+cov rename to src/exchange/afl-tests/id:000214,src:000000,op:flip2,pos:143,+cov diff --git a/src/mint/afl-tests/id:000214,src:000000,op:flip2,pos:164,+cov b/src/exchange/afl-tests/id:000214,src:000000,op:flip2,pos:164,+cov similarity index 100% rename from src/mint/afl-tests/id:000214,src:000000,op:flip2,pos:164,+cov rename to src/exchange/afl-tests/id:000214,src:000000,op:flip2,pos:164,+cov diff --git a/src/mint/afl-tests/id:000215,src:000000,op:flip2,pos:146,+cov b/src/exchange/afl-tests/id:000215,src:000000,op:flip2,pos:146,+cov similarity index 100% rename from src/mint/afl-tests/id:000215,src:000000,op:flip2,pos:146,+cov rename to src/exchange/afl-tests/id:000215,src:000000,op:flip2,pos:146,+cov diff --git a/src/mint/afl-tests/id:000215,src:000000,op:flip2,pos:164,+cov b/src/exchange/afl-tests/id:000215,src:000000,op:flip2,pos:164,+cov similarity index 100% rename from src/mint/afl-tests/id:000215,src:000000,op:flip2,pos:164,+cov rename to src/exchange/afl-tests/id:000215,src:000000,op:flip2,pos:164,+cov diff --git a/src/mint/afl-tests/id:000216,src:000000,op:flip2,pos:156,+cov b/src/exchange/afl-tests/id:000216,src:000000,op:flip2,pos:156,+cov similarity index 100% rename from src/mint/afl-tests/id:000216,src:000000,op:flip2,pos:156,+cov rename to src/exchange/afl-tests/id:000216,src:000000,op:flip2,pos:156,+cov diff --git a/src/mint/afl-tests/id:000216,src:000000,op:flip2,pos:166,+cov b/src/exchange/afl-tests/id:000216,src:000000,op:flip2,pos:166,+cov similarity index 100% rename from src/mint/afl-tests/id:000216,src:000000,op:flip2,pos:166,+cov rename to src/exchange/afl-tests/id:000216,src:000000,op:flip2,pos:166,+cov diff --git a/src/mint/afl-tests/id:000217,src:000000,op:flip2,pos:161,+cov b/src/exchange/afl-tests/id:000217,src:000000,op:flip2,pos:161,+cov similarity index 100% rename from src/mint/afl-tests/id:000217,src:000000,op:flip2,pos:161,+cov rename to src/exchange/afl-tests/id:000217,src:000000,op:flip2,pos:161,+cov diff --git a/src/mint/afl-tests/id:000217,src:000000,op:flip2,pos:170,+cov b/src/exchange/afl-tests/id:000217,src:000000,op:flip2,pos:170,+cov similarity index 100% rename from src/mint/afl-tests/id:000217,src:000000,op:flip2,pos:170,+cov rename to src/exchange/afl-tests/id:000217,src:000000,op:flip2,pos:170,+cov diff --git a/src/mint/afl-tests/id:000218,src:000000,op:flip2,pos:171,+cov b/src/exchange/afl-tests/id:000218,src:000000,op:flip2,pos:171,+cov similarity index 100% rename from src/mint/afl-tests/id:000218,src:000000,op:flip2,pos:171,+cov rename to src/exchange/afl-tests/id:000218,src:000000,op:flip2,pos:171,+cov diff --git a/src/mint/afl-tests/id:000218,src:000000,op:flip2,pos:176,+cov b/src/exchange/afl-tests/id:000218,src:000000,op:flip2,pos:176,+cov similarity index 100% rename from src/mint/afl-tests/id:000218,src:000000,op:flip2,pos:176,+cov rename to src/exchange/afl-tests/id:000218,src:000000,op:flip2,pos:176,+cov diff --git a/src/mint/afl-tests/id:000219,src:000000,op:flip2,pos:180 b/src/exchange/afl-tests/id:000219,src:000000,op:flip2,pos:180 similarity index 100% rename from src/mint/afl-tests/id:000219,src:000000,op:flip2,pos:180 rename to src/exchange/afl-tests/id:000219,src:000000,op:flip2,pos:180 diff --git a/src/mint/afl-tests/id:000219,src:000000,op:flip2,pos:185,+cov b/src/exchange/afl-tests/id:000219,src:000000,op:flip2,pos:185,+cov similarity index 100% rename from src/mint/afl-tests/id:000219,src:000000,op:flip2,pos:185,+cov rename to src/exchange/afl-tests/id:000219,src:000000,op:flip2,pos:185,+cov diff --git a/src/mint/afl-tests/id:000220,src:000000,op:flip2,pos:184,+cov b/src/exchange/afl-tests/id:000220,src:000000,op:flip2,pos:184,+cov similarity index 100% rename from src/mint/afl-tests/id:000220,src:000000,op:flip2,pos:184,+cov rename to src/exchange/afl-tests/id:000220,src:000000,op:flip2,pos:184,+cov diff --git a/src/mint/afl-tests/id:000220,src:000000,op:flip2,pos:193,+cov b/src/exchange/afl-tests/id:000220,src:000000,op:flip2,pos:193,+cov similarity index 100% rename from src/mint/afl-tests/id:000220,src:000000,op:flip2,pos:193,+cov rename to src/exchange/afl-tests/id:000220,src:000000,op:flip2,pos:193,+cov diff --git a/src/mint/afl-tests/id:000221,src:000000,op:flip2,pos:211,+cov b/src/exchange/afl-tests/id:000221,src:000000,op:flip2,pos:211,+cov similarity index 100% rename from src/mint/afl-tests/id:000221,src:000000,op:flip2,pos:211,+cov rename to src/exchange/afl-tests/id:000221,src:000000,op:flip2,pos:211,+cov diff --git a/src/mint/afl-tests/id:000221,src:000000,op:flip2,pos:226,+cov b/src/exchange/afl-tests/id:000221,src:000000,op:flip2,pos:226,+cov similarity index 100% rename from src/mint/afl-tests/id:000221,src:000000,op:flip2,pos:226,+cov rename to src/exchange/afl-tests/id:000221,src:000000,op:flip2,pos:226,+cov diff --git a/src/mint/afl-tests/id:000222,src:000000,op:flip2,pos:218,+cov b/src/exchange/afl-tests/id:000222,src:000000,op:flip2,pos:218,+cov similarity index 100% rename from src/mint/afl-tests/id:000222,src:000000,op:flip2,pos:218,+cov rename to src/exchange/afl-tests/id:000222,src:000000,op:flip2,pos:218,+cov diff --git a/src/mint/afl-tests/id:000222,src:000000,op:flip2,pos:232,+cov b/src/exchange/afl-tests/id:000222,src:000000,op:flip2,pos:232,+cov similarity index 100% rename from src/mint/afl-tests/id:000222,src:000000,op:flip2,pos:232,+cov rename to src/exchange/afl-tests/id:000222,src:000000,op:flip2,pos:232,+cov diff --git a/src/mint/afl-tests/id:000223,src:000000,op:flip2,pos:239,+cov b/src/exchange/afl-tests/id:000223,src:000000,op:flip2,pos:239,+cov similarity index 100% rename from src/mint/afl-tests/id:000223,src:000000,op:flip2,pos:239,+cov rename to src/exchange/afl-tests/id:000223,src:000000,op:flip2,pos:239,+cov diff --git a/src/mint/afl-tests/id:000223,src:000000,op:flip2,pos:271,+cov b/src/exchange/afl-tests/id:000223,src:000000,op:flip2,pos:271,+cov similarity index 100% rename from src/mint/afl-tests/id:000223,src:000000,op:flip2,pos:271,+cov rename to src/exchange/afl-tests/id:000223,src:000000,op:flip2,pos:271,+cov diff --git a/src/mint/afl-tests/id:000224,src:000000,op:flip2,pos:241,+cov b/src/exchange/afl-tests/id:000224,src:000000,op:flip2,pos:241,+cov similarity index 100% rename from src/mint/afl-tests/id:000224,src:000000,op:flip2,pos:241,+cov rename to src/exchange/afl-tests/id:000224,src:000000,op:flip2,pos:241,+cov diff --git a/src/mint/afl-tests/id:000224,src:000000,op:flip2,pos:279,+cov b/src/exchange/afl-tests/id:000224,src:000000,op:flip2,pos:279,+cov similarity index 100% rename from src/mint/afl-tests/id:000224,src:000000,op:flip2,pos:279,+cov rename to src/exchange/afl-tests/id:000224,src:000000,op:flip2,pos:279,+cov diff --git a/src/mint/afl-tests/id:000225,src:000000,op:flip2,pos:250,+cov b/src/exchange/afl-tests/id:000225,src:000000,op:flip2,pos:250,+cov similarity index 100% rename from src/mint/afl-tests/id:000225,src:000000,op:flip2,pos:250,+cov rename to src/exchange/afl-tests/id:000225,src:000000,op:flip2,pos:250,+cov diff --git a/src/mint/afl-tests/id:000225,src:000000,op:flip2,pos:308,+cov b/src/exchange/afl-tests/id:000225,src:000000,op:flip2,pos:308,+cov similarity index 100% rename from src/mint/afl-tests/id:000225,src:000000,op:flip2,pos:308,+cov rename to src/exchange/afl-tests/id:000225,src:000000,op:flip2,pos:308,+cov diff --git a/src/mint/afl-tests/id:000226,src:000000,op:flip2,pos:272,+cov b/src/exchange/afl-tests/id:000226,src:000000,op:flip2,pos:272,+cov similarity index 100% rename from src/mint/afl-tests/id:000226,src:000000,op:flip2,pos:272,+cov rename to src/exchange/afl-tests/id:000226,src:000000,op:flip2,pos:272,+cov diff --git a/src/mint/afl-tests/id:000226,src:000000,op:flip2,pos:315,+cov b/src/exchange/afl-tests/id:000226,src:000000,op:flip2,pos:315,+cov similarity index 100% rename from src/mint/afl-tests/id:000226,src:000000,op:flip2,pos:315,+cov rename to src/exchange/afl-tests/id:000226,src:000000,op:flip2,pos:315,+cov diff --git a/src/mint/afl-tests/id:000227,src:000000,op:flip2,pos:277,+cov b/src/exchange/afl-tests/id:000227,src:000000,op:flip2,pos:277,+cov similarity index 100% rename from src/mint/afl-tests/id:000227,src:000000,op:flip2,pos:277,+cov rename to src/exchange/afl-tests/id:000227,src:000000,op:flip2,pos:277,+cov diff --git a/src/mint/afl-tests/id:000227,src:000000,op:flip2,pos:316,+cov b/src/exchange/afl-tests/id:000227,src:000000,op:flip2,pos:316,+cov similarity index 100% rename from src/mint/afl-tests/id:000227,src:000000,op:flip2,pos:316,+cov rename to src/exchange/afl-tests/id:000227,src:000000,op:flip2,pos:316,+cov diff --git a/src/mint/afl-tests/id:000228,src:000000,op:flip2,pos:316,+cov b/src/exchange/afl-tests/id:000228,src:000000,op:flip2,pos:316,+cov similarity index 100% rename from src/mint/afl-tests/id:000228,src:000000,op:flip2,pos:316,+cov rename to src/exchange/afl-tests/id:000228,src:000000,op:flip2,pos:316,+cov diff --git a/src/mint/afl-tests/id:000228,src:000000,op:flip2,pos:317,+cov b/src/exchange/afl-tests/id:000228,src:000000,op:flip2,pos:317,+cov similarity index 100% rename from src/mint/afl-tests/id:000228,src:000000,op:flip2,pos:317,+cov rename to src/exchange/afl-tests/id:000228,src:000000,op:flip2,pos:317,+cov diff --git a/src/mint/afl-tests/id:000229,src:000000,op:flip2,pos:316,+cov b/src/exchange/afl-tests/id:000229,src:000000,op:flip2,pos:316,+cov similarity index 100% rename from src/mint/afl-tests/id:000229,src:000000,op:flip2,pos:316,+cov rename to src/exchange/afl-tests/id:000229,src:000000,op:flip2,pos:316,+cov diff --git a/src/mint/afl-tests/id:000229,src:000000,op:flip2,pos:319,+cov b/src/exchange/afl-tests/id:000229,src:000000,op:flip2,pos:319,+cov similarity index 100% rename from src/mint/afl-tests/id:000229,src:000000,op:flip2,pos:319,+cov rename to src/exchange/afl-tests/id:000229,src:000000,op:flip2,pos:319,+cov diff --git a/src/mint/afl-tests/id:000230,src:000000,op:flip2,pos:316,+cov b/src/exchange/afl-tests/id:000230,src:000000,op:flip2,pos:316,+cov similarity index 100% rename from src/mint/afl-tests/id:000230,src:000000,op:flip2,pos:316,+cov rename to src/exchange/afl-tests/id:000230,src:000000,op:flip2,pos:316,+cov diff --git a/src/mint/afl-tests/id:000230,src:000000,op:flip2,pos:320,+cov b/src/exchange/afl-tests/id:000230,src:000000,op:flip2,pos:320,+cov similarity index 100% rename from src/mint/afl-tests/id:000230,src:000000,op:flip2,pos:320,+cov rename to src/exchange/afl-tests/id:000230,src:000000,op:flip2,pos:320,+cov diff --git a/src/mint/afl-tests/id:000231,src:000000,op:flip2,pos:317,+cov b/src/exchange/afl-tests/id:000231,src:000000,op:flip2,pos:317,+cov similarity index 100% rename from src/mint/afl-tests/id:000231,src:000000,op:flip2,pos:317,+cov rename to src/exchange/afl-tests/id:000231,src:000000,op:flip2,pos:317,+cov diff --git a/src/mint/afl-tests/id:000231,src:000000,op:flip2,pos:326,+cov b/src/exchange/afl-tests/id:000231,src:000000,op:flip2,pos:326,+cov similarity index 100% rename from src/mint/afl-tests/id:000231,src:000000,op:flip2,pos:326,+cov rename to src/exchange/afl-tests/id:000231,src:000000,op:flip2,pos:326,+cov diff --git a/src/mint/afl-tests/id:000232,src:000000,op:flip2,pos:320,+cov b/src/exchange/afl-tests/id:000232,src:000000,op:flip2,pos:320,+cov similarity index 100% rename from src/mint/afl-tests/id:000232,src:000000,op:flip2,pos:320,+cov rename to src/exchange/afl-tests/id:000232,src:000000,op:flip2,pos:320,+cov diff --git a/src/mint/afl-tests/id:000232,src:000000,op:flip2,pos:327,+cov b/src/exchange/afl-tests/id:000232,src:000000,op:flip2,pos:327,+cov similarity index 100% rename from src/mint/afl-tests/id:000232,src:000000,op:flip2,pos:327,+cov rename to src/exchange/afl-tests/id:000232,src:000000,op:flip2,pos:327,+cov diff --git a/src/mint/afl-tests/id:000233,src:000000,op:flip2,pos:321,+cov b/src/exchange/afl-tests/id:000233,src:000000,op:flip2,pos:321,+cov similarity index 100% rename from src/mint/afl-tests/id:000233,src:000000,op:flip2,pos:321,+cov rename to src/exchange/afl-tests/id:000233,src:000000,op:flip2,pos:321,+cov diff --git a/src/mint/afl-tests/id:000233,src:000000,op:flip2,pos:331,+cov b/src/exchange/afl-tests/id:000233,src:000000,op:flip2,pos:331,+cov similarity index 100% rename from src/mint/afl-tests/id:000233,src:000000,op:flip2,pos:331,+cov rename to src/exchange/afl-tests/id:000233,src:000000,op:flip2,pos:331,+cov diff --git a/src/mint/afl-tests/id:000234,src:000000,op:flip2,pos:327,+cov b/src/exchange/afl-tests/id:000234,src:000000,op:flip2,pos:327,+cov similarity index 100% rename from src/mint/afl-tests/id:000234,src:000000,op:flip2,pos:327,+cov rename to src/exchange/afl-tests/id:000234,src:000000,op:flip2,pos:327,+cov diff --git a/src/mint/afl-tests/id:000234,src:000000,op:flip4,pos:5,+cov b/src/exchange/afl-tests/id:000234,src:000000,op:flip4,pos:5,+cov similarity index 100% rename from src/mint/afl-tests/id:000234,src:000000,op:flip4,pos:5,+cov rename to src/exchange/afl-tests/id:000234,src:000000,op:flip4,pos:5,+cov diff --git a/src/mint/afl-tests/id:000235,src:000000,op:flip2,pos:328,+cov b/src/exchange/afl-tests/id:000235,src:000000,op:flip2,pos:328,+cov similarity index 100% rename from src/mint/afl-tests/id:000235,src:000000,op:flip2,pos:328,+cov rename to src/exchange/afl-tests/id:000235,src:000000,op:flip2,pos:328,+cov diff --git a/src/mint/afl-tests/id:000235,src:000000,op:flip4,pos:20,+cov b/src/exchange/afl-tests/id:000235,src:000000,op:flip4,pos:20,+cov similarity index 100% rename from src/mint/afl-tests/id:000235,src:000000,op:flip4,pos:20,+cov rename to src/exchange/afl-tests/id:000235,src:000000,op:flip4,pos:20,+cov diff --git a/src/mint/afl-tests/id:000236,src:000000,op:flip2,pos:330,+cov b/src/exchange/afl-tests/id:000236,src:000000,op:flip2,pos:330,+cov similarity index 100% rename from src/mint/afl-tests/id:000236,src:000000,op:flip2,pos:330,+cov rename to src/exchange/afl-tests/id:000236,src:000000,op:flip2,pos:330,+cov diff --git a/src/mint/afl-tests/id:000236,src:000000,op:flip4,pos:27,+cov b/src/exchange/afl-tests/id:000236,src:000000,op:flip4,pos:27,+cov similarity index 100% rename from src/mint/afl-tests/id:000236,src:000000,op:flip4,pos:27,+cov rename to src/exchange/afl-tests/id:000236,src:000000,op:flip4,pos:27,+cov diff --git a/src/mint/afl-tests/id:000237,src:000000,op:flip2,pos:331,+cov b/src/exchange/afl-tests/id:000237,src:000000,op:flip2,pos:331,+cov similarity index 100% rename from src/mint/afl-tests/id:000237,src:000000,op:flip2,pos:331,+cov rename to src/exchange/afl-tests/id:000237,src:000000,op:flip2,pos:331,+cov diff --git a/src/mint/afl-tests/id:000237,src:000000,op:flip4,pos:30 b/src/exchange/afl-tests/id:000237,src:000000,op:flip4,pos:30 similarity index 100% rename from src/mint/afl-tests/id:000237,src:000000,op:flip4,pos:30 rename to src/exchange/afl-tests/id:000237,src:000000,op:flip4,pos:30 diff --git a/src/mint/afl-tests/id:000238,src:000000,op:flip4,pos:32 b/src/exchange/afl-tests/id:000238,src:000000,op:flip4,pos:32 similarity index 100% rename from src/mint/afl-tests/id:000238,src:000000,op:flip4,pos:32 rename to src/exchange/afl-tests/id:000238,src:000000,op:flip4,pos:32 diff --git a/src/mint/afl-tests/id:000238,src:000000,op:flip4,pos:5,+cov b/src/exchange/afl-tests/id:000238,src:000000,op:flip4,pos:5,+cov similarity index 100% rename from src/mint/afl-tests/id:000238,src:000000,op:flip4,pos:5,+cov rename to src/exchange/afl-tests/id:000238,src:000000,op:flip4,pos:5,+cov diff --git a/src/mint/afl-tests/id:000239,src:000000,op:flip4,pos:25,+cov b/src/exchange/afl-tests/id:000239,src:000000,op:flip4,pos:25,+cov similarity index 100% rename from src/mint/afl-tests/id:000239,src:000000,op:flip4,pos:25,+cov rename to src/exchange/afl-tests/id:000239,src:000000,op:flip4,pos:25,+cov diff --git a/src/mint/afl-tests/id:000239,src:000000,op:flip4,pos:34,+cov b/src/exchange/afl-tests/id:000239,src:000000,op:flip4,pos:34,+cov similarity index 100% rename from src/mint/afl-tests/id:000239,src:000000,op:flip4,pos:34,+cov rename to src/exchange/afl-tests/id:000239,src:000000,op:flip4,pos:34,+cov diff --git a/src/mint/afl-tests/id:000240,src:000000,op:flip4,pos:29,+cov b/src/exchange/afl-tests/id:000240,src:000000,op:flip4,pos:29,+cov similarity index 100% rename from src/mint/afl-tests/id:000240,src:000000,op:flip4,pos:29,+cov rename to src/exchange/afl-tests/id:000240,src:000000,op:flip4,pos:29,+cov diff --git a/src/mint/afl-tests/id:000240,src:000000,op:flip4,pos:35 b/src/exchange/afl-tests/id:000240,src:000000,op:flip4,pos:35 similarity index 100% rename from src/mint/afl-tests/id:000240,src:000000,op:flip4,pos:35 rename to src/exchange/afl-tests/id:000240,src:000000,op:flip4,pos:35 diff --git a/src/mint/afl-tests/id:000241,src:000000,op:flip4,pos:30 b/src/exchange/afl-tests/id:000241,src:000000,op:flip4,pos:30 similarity index 100% rename from src/mint/afl-tests/id:000241,src:000000,op:flip4,pos:30 rename to src/exchange/afl-tests/id:000241,src:000000,op:flip4,pos:30 diff --git a/src/mint/afl-tests/id:000241,src:000000,op:flip4,pos:36 b/src/exchange/afl-tests/id:000241,src:000000,op:flip4,pos:36 similarity index 100% rename from src/mint/afl-tests/id:000241,src:000000,op:flip4,pos:36 rename to src/exchange/afl-tests/id:000241,src:000000,op:flip4,pos:36 diff --git a/src/mint/afl-tests/id:000242,src:000000,op:flip4,pos:32 b/src/exchange/afl-tests/id:000242,src:000000,op:flip4,pos:32 similarity index 100% rename from src/mint/afl-tests/id:000242,src:000000,op:flip4,pos:32 rename to src/exchange/afl-tests/id:000242,src:000000,op:flip4,pos:32 diff --git a/src/mint/afl-tests/id:000242,src:000000,op:flip4,pos:39,+cov b/src/exchange/afl-tests/id:000242,src:000000,op:flip4,pos:39,+cov similarity index 100% rename from src/mint/afl-tests/id:000242,src:000000,op:flip4,pos:39,+cov rename to src/exchange/afl-tests/id:000242,src:000000,op:flip4,pos:39,+cov diff --git a/src/mint/afl-tests/id:000243,src:000000,op:flip4,pos:37,+cov b/src/exchange/afl-tests/id:000243,src:000000,op:flip4,pos:37,+cov similarity index 100% rename from src/mint/afl-tests/id:000243,src:000000,op:flip4,pos:37,+cov rename to src/exchange/afl-tests/id:000243,src:000000,op:flip4,pos:37,+cov diff --git a/src/mint/afl-tests/id:000243,src:000000,op:flip4,pos:44,+cov b/src/exchange/afl-tests/id:000243,src:000000,op:flip4,pos:44,+cov similarity index 100% rename from src/mint/afl-tests/id:000243,src:000000,op:flip4,pos:44,+cov rename to src/exchange/afl-tests/id:000243,src:000000,op:flip4,pos:44,+cov diff --git a/src/mint/afl-tests/id:000244,src:000000,op:flip4,pos:39,+cov b/src/exchange/afl-tests/id:000244,src:000000,op:flip4,pos:39,+cov similarity index 100% rename from src/mint/afl-tests/id:000244,src:000000,op:flip4,pos:39,+cov rename to src/exchange/afl-tests/id:000244,src:000000,op:flip4,pos:39,+cov diff --git a/src/mint/afl-tests/id:000244,src:000000,op:flip4,pos:48,+cov b/src/exchange/afl-tests/id:000244,src:000000,op:flip4,pos:48,+cov similarity index 100% rename from src/mint/afl-tests/id:000244,src:000000,op:flip4,pos:48,+cov rename to src/exchange/afl-tests/id:000244,src:000000,op:flip4,pos:48,+cov diff --git a/src/mint/afl-tests/id:000245,src:000000,op:flip4,pos:45,+cov b/src/exchange/afl-tests/id:000245,src:000000,op:flip4,pos:45,+cov similarity index 100% rename from src/mint/afl-tests/id:000245,src:000000,op:flip4,pos:45,+cov rename to src/exchange/afl-tests/id:000245,src:000000,op:flip4,pos:45,+cov diff --git a/src/mint/afl-tests/id:000245,src:000000,op:flip4,pos:56,+cov b/src/exchange/afl-tests/id:000245,src:000000,op:flip4,pos:56,+cov similarity index 100% rename from src/mint/afl-tests/id:000245,src:000000,op:flip4,pos:56,+cov rename to src/exchange/afl-tests/id:000245,src:000000,op:flip4,pos:56,+cov diff --git a/src/mint/afl-tests/id:000246,src:000000,op:flip4,pos:47,+cov b/src/exchange/afl-tests/id:000246,src:000000,op:flip4,pos:47,+cov similarity index 100% rename from src/mint/afl-tests/id:000246,src:000000,op:flip4,pos:47,+cov rename to src/exchange/afl-tests/id:000246,src:000000,op:flip4,pos:47,+cov diff --git a/src/mint/afl-tests/id:000246,src:000000,op:flip4,pos:59,+cov b/src/exchange/afl-tests/id:000246,src:000000,op:flip4,pos:59,+cov similarity index 100% rename from src/mint/afl-tests/id:000246,src:000000,op:flip4,pos:59,+cov rename to src/exchange/afl-tests/id:000246,src:000000,op:flip4,pos:59,+cov diff --git a/src/mint/afl-tests/id:000247,src:000000,op:flip4,pos:50,+cov b/src/exchange/afl-tests/id:000247,src:000000,op:flip4,pos:50,+cov similarity index 100% rename from src/mint/afl-tests/id:000247,src:000000,op:flip4,pos:50,+cov rename to src/exchange/afl-tests/id:000247,src:000000,op:flip4,pos:50,+cov diff --git a/src/mint/afl-tests/id:000247,src:000000,op:flip4,pos:65,+cov b/src/exchange/afl-tests/id:000247,src:000000,op:flip4,pos:65,+cov similarity index 100% rename from src/mint/afl-tests/id:000247,src:000000,op:flip4,pos:65,+cov rename to src/exchange/afl-tests/id:000247,src:000000,op:flip4,pos:65,+cov diff --git a/src/mint/afl-tests/id:000248,src:000000,op:flip4,pos:60,+cov b/src/exchange/afl-tests/id:000248,src:000000,op:flip4,pos:60,+cov similarity index 100% rename from src/mint/afl-tests/id:000248,src:000000,op:flip4,pos:60,+cov rename to src/exchange/afl-tests/id:000248,src:000000,op:flip4,pos:60,+cov diff --git a/src/mint/afl-tests/id:000248,src:000000,op:flip4,pos:68,+cov b/src/exchange/afl-tests/id:000248,src:000000,op:flip4,pos:68,+cov similarity index 100% rename from src/mint/afl-tests/id:000248,src:000000,op:flip4,pos:68,+cov rename to src/exchange/afl-tests/id:000248,src:000000,op:flip4,pos:68,+cov diff --git a/src/mint/afl-tests/id:000249,src:000000,op:flip4,pos:68,+cov b/src/exchange/afl-tests/id:000249,src:000000,op:flip4,pos:68,+cov similarity index 100% rename from src/mint/afl-tests/id:000249,src:000000,op:flip4,pos:68,+cov rename to src/exchange/afl-tests/id:000249,src:000000,op:flip4,pos:68,+cov diff --git a/src/mint/afl-tests/id:000250,src:000000,op:flip4,pos:68,+cov b/src/exchange/afl-tests/id:000250,src:000000,op:flip4,pos:68,+cov similarity index 100% rename from src/mint/afl-tests/id:000250,src:000000,op:flip4,pos:68,+cov rename to src/exchange/afl-tests/id:000250,src:000000,op:flip4,pos:68,+cov diff --git a/src/mint/afl-tests/id:000250,src:000000,op:flip4,pos:73,+cov b/src/exchange/afl-tests/id:000250,src:000000,op:flip4,pos:73,+cov similarity index 100% rename from src/mint/afl-tests/id:000250,src:000000,op:flip4,pos:73,+cov rename to src/exchange/afl-tests/id:000250,src:000000,op:flip4,pos:73,+cov diff --git a/src/mint/afl-tests/id:000251,src:000000,op:flip4,pos:74,+cov b/src/exchange/afl-tests/id:000251,src:000000,op:flip4,pos:74,+cov similarity index 100% rename from src/mint/afl-tests/id:000251,src:000000,op:flip4,pos:74,+cov rename to src/exchange/afl-tests/id:000251,src:000000,op:flip4,pos:74,+cov diff --git a/src/mint/afl-tests/id:000251,src:000000,op:flip4,pos:81,+cov b/src/exchange/afl-tests/id:000251,src:000000,op:flip4,pos:81,+cov similarity index 100% rename from src/mint/afl-tests/id:000251,src:000000,op:flip4,pos:81,+cov rename to src/exchange/afl-tests/id:000251,src:000000,op:flip4,pos:81,+cov diff --git a/src/mint/afl-tests/id:000252,src:000000,op:flip4,pos:75,+cov b/src/exchange/afl-tests/id:000252,src:000000,op:flip4,pos:75,+cov similarity index 100% rename from src/mint/afl-tests/id:000252,src:000000,op:flip4,pos:75,+cov rename to src/exchange/afl-tests/id:000252,src:000000,op:flip4,pos:75,+cov diff --git a/src/mint/afl-tests/id:000252,src:000000,op:flip4,pos:82,+cov b/src/exchange/afl-tests/id:000252,src:000000,op:flip4,pos:82,+cov similarity index 100% rename from src/mint/afl-tests/id:000252,src:000000,op:flip4,pos:82,+cov rename to src/exchange/afl-tests/id:000252,src:000000,op:flip4,pos:82,+cov diff --git a/src/mint/afl-tests/id:000253,src:000000,op:flip4,pos:75,+cov b/src/exchange/afl-tests/id:000253,src:000000,op:flip4,pos:75,+cov similarity index 100% rename from src/mint/afl-tests/id:000253,src:000000,op:flip4,pos:75,+cov rename to src/exchange/afl-tests/id:000253,src:000000,op:flip4,pos:75,+cov diff --git a/src/mint/afl-tests/id:000253,src:000000,op:flip4,pos:85,+cov b/src/exchange/afl-tests/id:000253,src:000000,op:flip4,pos:85,+cov similarity index 100% rename from src/mint/afl-tests/id:000253,src:000000,op:flip4,pos:85,+cov rename to src/exchange/afl-tests/id:000253,src:000000,op:flip4,pos:85,+cov diff --git a/src/mint/afl-tests/id:000254,src:000000,op:flip4,pos:76,+cov b/src/exchange/afl-tests/id:000254,src:000000,op:flip4,pos:76,+cov similarity index 100% rename from src/mint/afl-tests/id:000254,src:000000,op:flip4,pos:76,+cov rename to src/exchange/afl-tests/id:000254,src:000000,op:flip4,pos:76,+cov diff --git a/src/mint/afl-tests/id:000254,src:000000,op:flip4,pos:88,+cov b/src/exchange/afl-tests/id:000254,src:000000,op:flip4,pos:88,+cov similarity index 100% rename from src/mint/afl-tests/id:000254,src:000000,op:flip4,pos:88,+cov rename to src/exchange/afl-tests/id:000254,src:000000,op:flip4,pos:88,+cov diff --git a/src/mint/afl-tests/id:000255,src:000000,op:flip4,pos:81,+cov b/src/exchange/afl-tests/id:000255,src:000000,op:flip4,pos:81,+cov similarity index 100% rename from src/mint/afl-tests/id:000255,src:000000,op:flip4,pos:81,+cov rename to src/exchange/afl-tests/id:000255,src:000000,op:flip4,pos:81,+cov diff --git a/src/mint/afl-tests/id:000255,src:000000,op:flip4,pos:91,+cov b/src/exchange/afl-tests/id:000255,src:000000,op:flip4,pos:91,+cov similarity index 100% rename from src/mint/afl-tests/id:000255,src:000000,op:flip4,pos:91,+cov rename to src/exchange/afl-tests/id:000255,src:000000,op:flip4,pos:91,+cov diff --git a/src/mint/afl-tests/id:000256,src:000000,op:flip4,pos:83,+cov b/src/exchange/afl-tests/id:000256,src:000000,op:flip4,pos:83,+cov similarity index 100% rename from src/mint/afl-tests/id:000256,src:000000,op:flip4,pos:83,+cov rename to src/exchange/afl-tests/id:000256,src:000000,op:flip4,pos:83,+cov diff --git a/src/mint/afl-tests/id:000256,src:000000,op:flip4,pos:94,+cov b/src/exchange/afl-tests/id:000256,src:000000,op:flip4,pos:94,+cov similarity index 100% rename from src/mint/afl-tests/id:000256,src:000000,op:flip4,pos:94,+cov rename to src/exchange/afl-tests/id:000256,src:000000,op:flip4,pos:94,+cov diff --git a/src/mint/afl-tests/id:000257,src:000000,op:flip4,pos:86,+cov b/src/exchange/afl-tests/id:000257,src:000000,op:flip4,pos:86,+cov similarity index 100% rename from src/mint/afl-tests/id:000257,src:000000,op:flip4,pos:86,+cov rename to src/exchange/afl-tests/id:000257,src:000000,op:flip4,pos:86,+cov diff --git a/src/mint/afl-tests/id:000257,src:000000,op:flip4,pos:95,+cov b/src/exchange/afl-tests/id:000257,src:000000,op:flip4,pos:95,+cov similarity index 100% rename from src/mint/afl-tests/id:000257,src:000000,op:flip4,pos:95,+cov rename to src/exchange/afl-tests/id:000257,src:000000,op:flip4,pos:95,+cov diff --git a/src/mint/afl-tests/id:000258,src:000000,op:flip4,pos:88,+cov b/src/exchange/afl-tests/id:000258,src:000000,op:flip4,pos:88,+cov similarity index 100% rename from src/mint/afl-tests/id:000258,src:000000,op:flip4,pos:88,+cov rename to src/exchange/afl-tests/id:000258,src:000000,op:flip4,pos:88,+cov diff --git a/src/mint/afl-tests/id:000258,src:000000,op:flip4,pos:95,+cov b/src/exchange/afl-tests/id:000258,src:000000,op:flip4,pos:95,+cov similarity index 100% rename from src/mint/afl-tests/id:000258,src:000000,op:flip4,pos:95,+cov rename to src/exchange/afl-tests/id:000258,src:000000,op:flip4,pos:95,+cov diff --git a/src/mint/afl-tests/id:000259,src:000000,op:flip4,pos:114 b/src/exchange/afl-tests/id:000259,src:000000,op:flip4,pos:114 similarity index 100% rename from src/mint/afl-tests/id:000259,src:000000,op:flip4,pos:114 rename to src/exchange/afl-tests/id:000259,src:000000,op:flip4,pos:114 diff --git a/src/mint/afl-tests/id:000259,src:000000,op:flip4,pos:91,+cov b/src/exchange/afl-tests/id:000259,src:000000,op:flip4,pos:91,+cov similarity index 100% rename from src/mint/afl-tests/id:000259,src:000000,op:flip4,pos:91,+cov rename to src/exchange/afl-tests/id:000259,src:000000,op:flip4,pos:91,+cov diff --git a/src/mint/afl-tests/id:000260,src:000000,op:flip4,pos:112,+cov b/src/exchange/afl-tests/id:000260,src:000000,op:flip4,pos:112,+cov similarity index 100% rename from src/mint/afl-tests/id:000260,src:000000,op:flip4,pos:112,+cov rename to src/exchange/afl-tests/id:000260,src:000000,op:flip4,pos:112,+cov diff --git a/src/mint/afl-tests/id:000260,src:000000,op:flip4,pos:137,+cov b/src/exchange/afl-tests/id:000260,src:000000,op:flip4,pos:137,+cov similarity index 100% rename from src/mint/afl-tests/id:000260,src:000000,op:flip4,pos:137,+cov rename to src/exchange/afl-tests/id:000260,src:000000,op:flip4,pos:137,+cov diff --git a/src/mint/afl-tests/id:000261,src:000000,op:flip4,pos:139,+cov b/src/exchange/afl-tests/id:000261,src:000000,op:flip4,pos:139,+cov similarity index 100% rename from src/mint/afl-tests/id:000261,src:000000,op:flip4,pos:139,+cov rename to src/exchange/afl-tests/id:000261,src:000000,op:flip4,pos:139,+cov diff --git a/src/mint/afl-tests/id:000261,src:000000,op:flip4,pos:147,+cov b/src/exchange/afl-tests/id:000261,src:000000,op:flip4,pos:147,+cov similarity index 100% rename from src/mint/afl-tests/id:000261,src:000000,op:flip4,pos:147,+cov rename to src/exchange/afl-tests/id:000261,src:000000,op:flip4,pos:147,+cov diff --git a/src/mint/afl-tests/id:000262,src:000000,op:flip4,pos:142,+cov b/src/exchange/afl-tests/id:000262,src:000000,op:flip4,pos:142,+cov similarity index 100% rename from src/mint/afl-tests/id:000262,src:000000,op:flip4,pos:142,+cov rename to src/exchange/afl-tests/id:000262,src:000000,op:flip4,pos:142,+cov diff --git a/src/mint/afl-tests/id:000262,src:000000,op:flip4,pos:164,+cov b/src/exchange/afl-tests/id:000262,src:000000,op:flip4,pos:164,+cov similarity index 100% rename from src/mint/afl-tests/id:000262,src:000000,op:flip4,pos:164,+cov rename to src/exchange/afl-tests/id:000262,src:000000,op:flip4,pos:164,+cov diff --git a/src/mint/afl-tests/id:000263,src:000000,op:flip4,pos:147,+cov b/src/exchange/afl-tests/id:000263,src:000000,op:flip4,pos:147,+cov similarity index 100% rename from src/mint/afl-tests/id:000263,src:000000,op:flip4,pos:147,+cov rename to src/exchange/afl-tests/id:000263,src:000000,op:flip4,pos:147,+cov diff --git a/src/mint/afl-tests/id:000263,src:000000,op:flip4,pos:169,+cov b/src/exchange/afl-tests/id:000263,src:000000,op:flip4,pos:169,+cov similarity index 100% rename from src/mint/afl-tests/id:000263,src:000000,op:flip4,pos:169,+cov rename to src/exchange/afl-tests/id:000263,src:000000,op:flip4,pos:169,+cov diff --git a/src/mint/afl-tests/id:000264,src:000000,op:flip4,pos:157,+cov b/src/exchange/afl-tests/id:000264,src:000000,op:flip4,pos:157,+cov similarity index 100% rename from src/mint/afl-tests/id:000264,src:000000,op:flip4,pos:157,+cov rename to src/exchange/afl-tests/id:000264,src:000000,op:flip4,pos:157,+cov diff --git a/src/mint/afl-tests/id:000264,src:000000,op:flip4,pos:172,+cov b/src/exchange/afl-tests/id:000264,src:000000,op:flip4,pos:172,+cov similarity index 100% rename from src/mint/afl-tests/id:000264,src:000000,op:flip4,pos:172,+cov rename to src/exchange/afl-tests/id:000264,src:000000,op:flip4,pos:172,+cov diff --git a/src/mint/afl-tests/id:000265,src:000000,op:flip4,pos:157,+cov b/src/exchange/afl-tests/id:000265,src:000000,op:flip4,pos:157,+cov similarity index 100% rename from src/mint/afl-tests/id:000265,src:000000,op:flip4,pos:157,+cov rename to src/exchange/afl-tests/id:000265,src:000000,op:flip4,pos:157,+cov diff --git a/src/mint/afl-tests/id:000265,src:000000,op:flip4,pos:175,+cov b/src/exchange/afl-tests/id:000265,src:000000,op:flip4,pos:175,+cov similarity index 100% rename from src/mint/afl-tests/id:000265,src:000000,op:flip4,pos:175,+cov rename to src/exchange/afl-tests/id:000265,src:000000,op:flip4,pos:175,+cov diff --git a/src/mint/afl-tests/id:000266,src:000000,op:flip4,pos:176,+cov b/src/exchange/afl-tests/id:000266,src:000000,op:flip4,pos:176,+cov similarity index 100% rename from src/mint/afl-tests/id:000266,src:000000,op:flip4,pos:176,+cov rename to src/exchange/afl-tests/id:000266,src:000000,op:flip4,pos:176,+cov diff --git a/src/mint/afl-tests/id:000266,src:000000,op:flip4,pos:177,+cov b/src/exchange/afl-tests/id:000266,src:000000,op:flip4,pos:177,+cov similarity index 100% rename from src/mint/afl-tests/id:000266,src:000000,op:flip4,pos:177,+cov rename to src/exchange/afl-tests/id:000266,src:000000,op:flip4,pos:177,+cov diff --git a/src/mint/afl-tests/id:000267,src:000000,op:flip4,pos:179,+cov b/src/exchange/afl-tests/id:000267,src:000000,op:flip4,pos:179,+cov similarity index 100% rename from src/mint/afl-tests/id:000267,src:000000,op:flip4,pos:179,+cov rename to src/exchange/afl-tests/id:000267,src:000000,op:flip4,pos:179,+cov diff --git a/src/mint/afl-tests/id:000267,src:000000,op:flip4,pos:225,+cov b/src/exchange/afl-tests/id:000267,src:000000,op:flip4,pos:225,+cov similarity index 100% rename from src/mint/afl-tests/id:000267,src:000000,op:flip4,pos:225,+cov rename to src/exchange/afl-tests/id:000267,src:000000,op:flip4,pos:225,+cov diff --git a/src/mint/afl-tests/id:000268,src:000000,op:flip4,pos:183,+cov b/src/exchange/afl-tests/id:000268,src:000000,op:flip4,pos:183,+cov similarity index 100% rename from src/mint/afl-tests/id:000268,src:000000,op:flip4,pos:183,+cov rename to src/exchange/afl-tests/id:000268,src:000000,op:flip4,pos:183,+cov diff --git a/src/mint/afl-tests/id:000268,src:000000,op:flip4,pos:258,+cov b/src/exchange/afl-tests/id:000268,src:000000,op:flip4,pos:258,+cov similarity index 100% rename from src/mint/afl-tests/id:000268,src:000000,op:flip4,pos:258,+cov rename to src/exchange/afl-tests/id:000268,src:000000,op:flip4,pos:258,+cov diff --git a/src/mint/afl-tests/id:000269,src:000000,op:flip4,pos:262,+cov b/src/exchange/afl-tests/id:000269,src:000000,op:flip4,pos:262,+cov similarity index 100% rename from src/mint/afl-tests/id:000269,src:000000,op:flip4,pos:262,+cov rename to src/exchange/afl-tests/id:000269,src:000000,op:flip4,pos:262,+cov diff --git a/src/mint/afl-tests/id:000269,src:000000,op:flip4,pos:270,+cov b/src/exchange/afl-tests/id:000269,src:000000,op:flip4,pos:270,+cov similarity index 100% rename from src/mint/afl-tests/id:000269,src:000000,op:flip4,pos:270,+cov rename to src/exchange/afl-tests/id:000269,src:000000,op:flip4,pos:270,+cov diff --git a/src/mint/afl-tests/id:000270,src:000000,op:flip4,pos:276,+cov b/src/exchange/afl-tests/id:000270,src:000000,op:flip4,pos:276,+cov similarity index 100% rename from src/mint/afl-tests/id:000270,src:000000,op:flip4,pos:276,+cov rename to src/exchange/afl-tests/id:000270,src:000000,op:flip4,pos:276,+cov diff --git a/src/mint/afl-tests/id:000270,src:000000,op:flip4,pos:280,+cov b/src/exchange/afl-tests/id:000270,src:000000,op:flip4,pos:280,+cov similarity index 100% rename from src/mint/afl-tests/id:000270,src:000000,op:flip4,pos:280,+cov rename to src/exchange/afl-tests/id:000270,src:000000,op:flip4,pos:280,+cov diff --git a/src/mint/afl-tests/id:000271,src:000000,op:flip4,pos:284,+cov b/src/exchange/afl-tests/id:000271,src:000000,op:flip4,pos:284,+cov similarity index 100% rename from src/mint/afl-tests/id:000271,src:000000,op:flip4,pos:284,+cov rename to src/exchange/afl-tests/id:000271,src:000000,op:flip4,pos:284,+cov diff --git a/src/mint/afl-tests/id:000271,src:000000,op:flip4,pos:307,+cov b/src/exchange/afl-tests/id:000271,src:000000,op:flip4,pos:307,+cov similarity index 100% rename from src/mint/afl-tests/id:000271,src:000000,op:flip4,pos:307,+cov rename to src/exchange/afl-tests/id:000271,src:000000,op:flip4,pos:307,+cov diff --git a/src/mint/afl-tests/id:000272,src:000000,op:flip4,pos:314,+cov b/src/exchange/afl-tests/id:000272,src:000000,op:flip4,pos:314,+cov similarity index 100% rename from src/mint/afl-tests/id:000272,src:000000,op:flip4,pos:314,+cov rename to src/exchange/afl-tests/id:000272,src:000000,op:flip4,pos:314,+cov diff --git a/src/mint/afl-tests/id:000272,src:000000,op:flip4,pos:317,+cov b/src/exchange/afl-tests/id:000272,src:000000,op:flip4,pos:317,+cov similarity index 100% rename from src/mint/afl-tests/id:000272,src:000000,op:flip4,pos:317,+cov rename to src/exchange/afl-tests/id:000272,src:000000,op:flip4,pos:317,+cov diff --git a/src/mint/afl-tests/id:000273,src:000000,op:flip4,pos:318,+cov b/src/exchange/afl-tests/id:000273,src:000000,op:flip4,pos:318,+cov similarity index 100% rename from src/mint/afl-tests/id:000273,src:000000,op:flip4,pos:318,+cov rename to src/exchange/afl-tests/id:000273,src:000000,op:flip4,pos:318,+cov diff --git a/src/mint/afl-tests/id:000273,src:000000,op:flip4,pos:328,+cov b/src/exchange/afl-tests/id:000273,src:000000,op:flip4,pos:328,+cov similarity index 100% rename from src/mint/afl-tests/id:000273,src:000000,op:flip4,pos:328,+cov rename to src/exchange/afl-tests/id:000273,src:000000,op:flip4,pos:328,+cov diff --git a/src/mint/afl-tests/id:000274,src:000000,op:flip4,pos:330,+cov b/src/exchange/afl-tests/id:000274,src:000000,op:flip4,pos:330,+cov similarity index 100% rename from src/mint/afl-tests/id:000274,src:000000,op:flip4,pos:330,+cov rename to src/exchange/afl-tests/id:000274,src:000000,op:flip4,pos:330,+cov diff --git a/src/mint/afl-tests/id:000275,src:000000,op:flip4,pos:331,+cov b/src/exchange/afl-tests/id:000275,src:000000,op:flip4,pos:331,+cov similarity index 100% rename from src/mint/afl-tests/id:000275,src:000000,op:flip4,pos:331,+cov rename to src/exchange/afl-tests/id:000275,src:000000,op:flip4,pos:331,+cov diff --git a/src/mint/afl-tests/id:000275,src:000000,op:flip8,pos:32,+cov b/src/exchange/afl-tests/id:000275,src:000000,op:flip8,pos:32,+cov similarity index 100% rename from src/mint/afl-tests/id:000275,src:000000,op:flip8,pos:32,+cov rename to src/exchange/afl-tests/id:000275,src:000000,op:flip8,pos:32,+cov diff --git a/src/mint/afl-tests/id:000276,src:000000,op:flip8,pos:43,+cov b/src/exchange/afl-tests/id:000276,src:000000,op:flip8,pos:43,+cov similarity index 100% rename from src/mint/afl-tests/id:000276,src:000000,op:flip8,pos:43,+cov rename to src/exchange/afl-tests/id:000276,src:000000,op:flip8,pos:43,+cov diff --git a/src/mint/afl-tests/id:000276,src:000000,op:flip8,pos:47,+cov b/src/exchange/afl-tests/id:000276,src:000000,op:flip8,pos:47,+cov similarity index 100% rename from src/mint/afl-tests/id:000276,src:000000,op:flip8,pos:47,+cov rename to src/exchange/afl-tests/id:000276,src:000000,op:flip8,pos:47,+cov diff --git a/src/mint/afl-tests/id:000277,src:000000,op:flip8,pos:190,+cov b/src/exchange/afl-tests/id:000277,src:000000,op:flip8,pos:190,+cov similarity index 100% rename from src/mint/afl-tests/id:000277,src:000000,op:flip8,pos:190,+cov rename to src/exchange/afl-tests/id:000277,src:000000,op:flip8,pos:190,+cov diff --git a/src/mint/afl-tests/id:000277,src:000000,op:flip8,pos:52,+cov b/src/exchange/afl-tests/id:000277,src:000000,op:flip8,pos:52,+cov similarity index 100% rename from src/mint/afl-tests/id:000277,src:000000,op:flip8,pos:52,+cov rename to src/exchange/afl-tests/id:000277,src:000000,op:flip8,pos:52,+cov diff --git a/src/mint/afl-tests/id:000278,src:000000,op:flip16,pos:51,+cov b/src/exchange/afl-tests/id:000278,src:000000,op:flip16,pos:51,+cov similarity index 100% rename from src/mint/afl-tests/id:000278,src:000000,op:flip16,pos:51,+cov rename to src/exchange/afl-tests/id:000278,src:000000,op:flip16,pos:51,+cov diff --git a/src/mint/afl-tests/id:000278,src:000000,op:flip8,pos:62,+cov b/src/exchange/afl-tests/id:000278,src:000000,op:flip8,pos:62,+cov similarity index 100% rename from src/mint/afl-tests/id:000278,src:000000,op:flip8,pos:62,+cov rename to src/exchange/afl-tests/id:000278,src:000000,op:flip8,pos:62,+cov diff --git a/src/mint/afl-tests/id:000279,src:000000,op:flip16,pos:219,+cov b/src/exchange/afl-tests/id:000279,src:000000,op:flip16,pos:219,+cov similarity index 100% rename from src/mint/afl-tests/id:000279,src:000000,op:flip16,pos:219,+cov rename to src/exchange/afl-tests/id:000279,src:000000,op:flip16,pos:219,+cov diff --git a/src/mint/afl-tests/id:000279,src:000000,op:flip8,pos:87,+cov b/src/exchange/afl-tests/id:000279,src:000000,op:flip8,pos:87,+cov similarity index 100% rename from src/mint/afl-tests/id:000279,src:000000,op:flip8,pos:87,+cov rename to src/exchange/afl-tests/id:000279,src:000000,op:flip8,pos:87,+cov diff --git a/src/mint/afl-tests/id:000280,src:000000,op:flip32,pos:55,+cov b/src/exchange/afl-tests/id:000280,src:000000,op:flip32,pos:55,+cov similarity index 100% rename from src/mint/afl-tests/id:000280,src:000000,op:flip32,pos:55,+cov rename to src/exchange/afl-tests/id:000280,src:000000,op:flip32,pos:55,+cov diff --git a/src/mint/afl-tests/id:000280,src:000000,op:flip8,pos:88,+cov b/src/exchange/afl-tests/id:000280,src:000000,op:flip8,pos:88,+cov similarity index 100% rename from src/mint/afl-tests/id:000280,src:000000,op:flip8,pos:88,+cov rename to src/exchange/afl-tests/id:000280,src:000000,op:flip8,pos:88,+cov diff --git a/src/mint/afl-tests/id:000281,src:000000,op:flip32,pos:68,+cov b/src/exchange/afl-tests/id:000281,src:000000,op:flip32,pos:68,+cov similarity index 100% rename from src/mint/afl-tests/id:000281,src:000000,op:flip32,pos:68,+cov rename to src/exchange/afl-tests/id:000281,src:000000,op:flip32,pos:68,+cov diff --git a/src/mint/afl-tests/id:000281,src:000000,op:flip8,pos:331,+cov b/src/exchange/afl-tests/id:000281,src:000000,op:flip8,pos:331,+cov similarity index 100% rename from src/mint/afl-tests/id:000281,src:000000,op:flip8,pos:331,+cov rename to src/exchange/afl-tests/id:000281,src:000000,op:flip8,pos:331,+cov diff --git a/src/mint/afl-tests/id:000282,src:000000,op:arith8,pos:4,val:-19 b/src/exchange/afl-tests/id:000282,src:000000,op:arith8,pos:4,val:-19 similarity index 100% rename from src/mint/afl-tests/id:000282,src:000000,op:arith8,pos:4,val:-19 rename to src/exchange/afl-tests/id:000282,src:000000,op:arith8,pos:4,val:-19 diff --git a/src/mint/afl-tests/id:000282,src:000000,op:flip16,pos:39,+cov b/src/exchange/afl-tests/id:000282,src:000000,op:flip16,pos:39,+cov similarity index 100% rename from src/mint/afl-tests/id:000282,src:000000,op:flip16,pos:39,+cov rename to src/exchange/afl-tests/id:000282,src:000000,op:flip16,pos:39,+cov diff --git a/src/mint/afl-tests/id:000283,src:000000,op:arith8,pos:4,val:-22 b/src/exchange/afl-tests/id:000283,src:000000,op:arith8,pos:4,val:-22 similarity index 100% rename from src/mint/afl-tests/id:000283,src:000000,op:arith8,pos:4,val:-22 rename to src/exchange/afl-tests/id:000283,src:000000,op:arith8,pos:4,val:-22 diff --git a/src/mint/afl-tests/id:000283,src:000000,op:flip16,pos:85,+cov b/src/exchange/afl-tests/id:000283,src:000000,op:flip16,pos:85,+cov similarity index 100% rename from src/mint/afl-tests/id:000283,src:000000,op:flip16,pos:85,+cov rename to src/exchange/afl-tests/id:000283,src:000000,op:flip16,pos:85,+cov diff --git a/src/mint/afl-tests/id:000284,src:000000,op:arith8,pos:5,val:-10,+cov b/src/exchange/afl-tests/id:000284,src:000000,op:arith8,pos:5,val:-10,+cov similarity index 100% rename from src/mint/afl-tests/id:000284,src:000000,op:arith8,pos:5,val:-10,+cov rename to src/exchange/afl-tests/id:000284,src:000000,op:arith8,pos:5,val:-10,+cov diff --git a/src/mint/afl-tests/id:000284,src:000000,op:flip32,pos:49,+cov b/src/exchange/afl-tests/id:000284,src:000000,op:flip32,pos:49,+cov similarity index 100% rename from src/mint/afl-tests/id:000284,src:000000,op:flip32,pos:49,+cov rename to src/exchange/afl-tests/id:000284,src:000000,op:flip32,pos:49,+cov diff --git a/src/mint/afl-tests/id:000285,src:000000,op:arith8,pos:5,val:-34 b/src/exchange/afl-tests/id:000285,src:000000,op:arith8,pos:5,val:-34 similarity index 100% rename from src/mint/afl-tests/id:000285,src:000000,op:arith8,pos:5,val:-34 rename to src/exchange/afl-tests/id:000285,src:000000,op:arith8,pos:5,val:-34 diff --git a/src/mint/afl-tests/id:000285,src:000000,op:flip32,pos:62 b/src/exchange/afl-tests/id:000285,src:000000,op:flip32,pos:62 similarity index 100% rename from src/mint/afl-tests/id:000285,src:000000,op:flip32,pos:62 rename to src/exchange/afl-tests/id:000285,src:000000,op:flip32,pos:62 diff --git a/src/mint/afl-tests/id:000286,src:000000,op:arith8,pos:6,val:-34,+cov b/src/exchange/afl-tests/id:000286,src:000000,op:arith8,pos:6,val:-34,+cov similarity index 100% rename from src/mint/afl-tests/id:000286,src:000000,op:arith8,pos:6,val:-34,+cov rename to src/exchange/afl-tests/id:000286,src:000000,op:arith8,pos:6,val:-34,+cov diff --git a/src/mint/afl-tests/id:000286,src:000000,op:flip32,pos:86,+cov b/src/exchange/afl-tests/id:000286,src:000000,op:flip32,pos:86,+cov similarity index 100% rename from src/mint/afl-tests/id:000286,src:000000,op:flip32,pos:86,+cov rename to src/exchange/afl-tests/id:000286,src:000000,op:flip32,pos:86,+cov diff --git a/src/mint/afl-tests/id:000287,src:000000,op:arith8,pos:11,val:-34 b/src/exchange/afl-tests/id:000287,src:000000,op:arith8,pos:11,val:-34 similarity index 100% rename from src/mint/afl-tests/id:000287,src:000000,op:arith8,pos:11,val:-34 rename to src/exchange/afl-tests/id:000287,src:000000,op:arith8,pos:11,val:-34 diff --git a/src/mint/afl-tests/id:000287,src:000000,op:flip32,pos:92,+cov b/src/exchange/afl-tests/id:000287,src:000000,op:flip32,pos:92,+cov similarity index 100% rename from src/mint/afl-tests/id:000287,src:000000,op:flip32,pos:92,+cov rename to src/exchange/afl-tests/id:000287,src:000000,op:flip32,pos:92,+cov diff --git a/src/mint/afl-tests/id:000288,src:000000,op:arith8,pos:15,val:-10,+cov b/src/exchange/afl-tests/id:000288,src:000000,op:arith8,pos:15,val:-10,+cov similarity index 100% rename from src/mint/afl-tests/id:000288,src:000000,op:arith8,pos:15,val:-10,+cov rename to src/exchange/afl-tests/id:000288,src:000000,op:arith8,pos:15,val:-10,+cov diff --git a/src/mint/afl-tests/id:000288,src:000000,op:arith8,pos:4,val:-19 b/src/exchange/afl-tests/id:000288,src:000000,op:arith8,pos:4,val:-19 similarity index 100% rename from src/mint/afl-tests/id:000288,src:000000,op:arith8,pos:4,val:-19 rename to src/exchange/afl-tests/id:000288,src:000000,op:arith8,pos:4,val:-19 diff --git a/src/mint/afl-tests/id:000289,src:000000,op:arith8,pos:22,val:+5,+cov b/src/exchange/afl-tests/id:000289,src:000000,op:arith8,pos:22,val:+5,+cov similarity index 100% rename from src/mint/afl-tests/id:000289,src:000000,op:arith8,pos:22,val:+5,+cov rename to src/exchange/afl-tests/id:000289,src:000000,op:arith8,pos:22,val:+5,+cov diff --git a/src/mint/afl-tests/id:000289,src:000000,op:arith8,pos:4,val:-22 b/src/exchange/afl-tests/id:000289,src:000000,op:arith8,pos:4,val:-22 similarity index 100% rename from src/mint/afl-tests/id:000289,src:000000,op:arith8,pos:4,val:-22 rename to src/exchange/afl-tests/id:000289,src:000000,op:arith8,pos:4,val:-22 diff --git a/src/mint/afl-tests/id:000290,src:000000,op:arith8,pos:24,val:+10,+cov b/src/exchange/afl-tests/id:000290,src:000000,op:arith8,pos:24,val:+10,+cov similarity index 100% rename from src/mint/afl-tests/id:000290,src:000000,op:arith8,pos:24,val:+10,+cov rename to src/exchange/afl-tests/id:000290,src:000000,op:arith8,pos:24,val:+10,+cov diff --git a/src/mint/afl-tests/id:000290,src:000000,op:arith8,pos:5,val:-10,+cov b/src/exchange/afl-tests/id:000290,src:000000,op:arith8,pos:5,val:-10,+cov similarity index 100% rename from src/mint/afl-tests/id:000290,src:000000,op:arith8,pos:5,val:-10,+cov rename to src/exchange/afl-tests/id:000290,src:000000,op:arith8,pos:5,val:-10,+cov diff --git a/src/mint/afl-tests/id:000291,src:000000,op:arith8,pos:25,val:-6,+cov b/src/exchange/afl-tests/id:000291,src:000000,op:arith8,pos:25,val:-6,+cov similarity index 100% rename from src/mint/afl-tests/id:000291,src:000000,op:arith8,pos:25,val:-6,+cov rename to src/exchange/afl-tests/id:000291,src:000000,op:arith8,pos:25,val:-6,+cov diff --git a/src/mint/afl-tests/id:000291,src:000000,op:arith8,pos:5,val:-34 b/src/exchange/afl-tests/id:000291,src:000000,op:arith8,pos:5,val:-34 similarity index 100% rename from src/mint/afl-tests/id:000291,src:000000,op:arith8,pos:5,val:-34 rename to src/exchange/afl-tests/id:000291,src:000000,op:arith8,pos:5,val:-34 diff --git a/src/mint/afl-tests/id:000292,src:000000,op:arith8,pos:25,val:-25,+cov b/src/exchange/afl-tests/id:000292,src:000000,op:arith8,pos:25,val:-25,+cov similarity index 100% rename from src/mint/afl-tests/id:000292,src:000000,op:arith8,pos:25,val:-25,+cov rename to src/exchange/afl-tests/id:000292,src:000000,op:arith8,pos:25,val:-25,+cov diff --git a/src/mint/afl-tests/id:000292,src:000000,op:arith8,pos:6,val:-34,+cov b/src/exchange/afl-tests/id:000292,src:000000,op:arith8,pos:6,val:-34,+cov similarity index 100% rename from src/mint/afl-tests/id:000292,src:000000,op:arith8,pos:6,val:-34,+cov rename to src/exchange/afl-tests/id:000292,src:000000,op:arith8,pos:6,val:-34,+cov diff --git a/src/mint/afl-tests/id:000293,src:000000,op:arith8,pos:25,val:-29,+cov b/src/exchange/afl-tests/id:000293,src:000000,op:arith8,pos:25,val:-29,+cov similarity index 100% rename from src/mint/afl-tests/id:000293,src:000000,op:arith8,pos:25,val:-29,+cov rename to src/exchange/afl-tests/id:000293,src:000000,op:arith8,pos:25,val:-29,+cov diff --git a/src/mint/afl-tests/id:000293,src:000000,op:arith8,pos:7,val:-34,+cov b/src/exchange/afl-tests/id:000293,src:000000,op:arith8,pos:7,val:-34,+cov similarity index 100% rename from src/mint/afl-tests/id:000293,src:000000,op:arith8,pos:7,val:-34,+cov rename to src/exchange/afl-tests/id:000293,src:000000,op:arith8,pos:7,val:-34,+cov diff --git a/src/mint/afl-tests/id:000294,src:000000,op:arith8,pos:11,val:-34 b/src/exchange/afl-tests/id:000294,src:000000,op:arith8,pos:11,val:-34 similarity index 100% rename from src/mint/afl-tests/id:000294,src:000000,op:arith8,pos:11,val:-34 rename to src/exchange/afl-tests/id:000294,src:000000,op:arith8,pos:11,val:-34 diff --git a/src/mint/afl-tests/id:000294,src:000000,op:arith8,pos:26,val:+12,+cov b/src/exchange/afl-tests/id:000294,src:000000,op:arith8,pos:26,val:+12,+cov similarity index 100% rename from src/mint/afl-tests/id:000294,src:000000,op:arith8,pos:26,val:+12,+cov rename to src/exchange/afl-tests/id:000294,src:000000,op:arith8,pos:26,val:+12,+cov diff --git a/src/mint/afl-tests/id:000295,src:000000,op:arith8,pos:15,val:-10,+cov b/src/exchange/afl-tests/id:000295,src:000000,op:arith8,pos:15,val:-10,+cov similarity index 100% rename from src/mint/afl-tests/id:000295,src:000000,op:arith8,pos:15,val:-10,+cov rename to src/exchange/afl-tests/id:000295,src:000000,op:arith8,pos:15,val:-10,+cov diff --git a/src/mint/afl-tests/id:000295,src:000000,op:arith8,pos:26,val:+17,+cov b/src/exchange/afl-tests/id:000295,src:000000,op:arith8,pos:26,val:+17,+cov similarity index 100% rename from src/mint/afl-tests/id:000295,src:000000,op:arith8,pos:26,val:+17,+cov rename to src/exchange/afl-tests/id:000295,src:000000,op:arith8,pos:26,val:+17,+cov diff --git a/src/mint/afl-tests/id:000296,src:000000,op:arith8,pos:25,val:+24,+cov b/src/exchange/afl-tests/id:000296,src:000000,op:arith8,pos:25,val:+24,+cov similarity index 100% rename from src/mint/afl-tests/id:000296,src:000000,op:arith8,pos:25,val:+24,+cov rename to src/exchange/afl-tests/id:000296,src:000000,op:arith8,pos:25,val:+24,+cov diff --git a/src/mint/afl-tests/id:000296,src:000000,op:arith8,pos:27,val:-29,+cov b/src/exchange/afl-tests/id:000296,src:000000,op:arith8,pos:27,val:-29,+cov similarity index 100% rename from src/mint/afl-tests/id:000296,src:000000,op:arith8,pos:27,val:-29,+cov rename to src/exchange/afl-tests/id:000296,src:000000,op:arith8,pos:27,val:-29,+cov diff --git a/src/mint/afl-tests/id:000297,src:000000,op:arith8,pos:27,val:+26,+cov b/src/exchange/afl-tests/id:000297,src:000000,op:arith8,pos:27,val:+26,+cov similarity index 100% rename from src/mint/afl-tests/id:000297,src:000000,op:arith8,pos:27,val:+26,+cov rename to src/exchange/afl-tests/id:000297,src:000000,op:arith8,pos:27,val:+26,+cov diff --git a/src/mint/afl-tests/id:000297,src:000000,op:arith8,pos:27,val:+33,+cov b/src/exchange/afl-tests/id:000297,src:000000,op:arith8,pos:27,val:+33,+cov similarity index 100% rename from src/mint/afl-tests/id:000297,src:000000,op:arith8,pos:27,val:+33,+cov rename to src/exchange/afl-tests/id:000297,src:000000,op:arith8,pos:27,val:+33,+cov diff --git a/src/mint/afl-tests/id:000298,src:000000,op:arith8,pos:28,val:+13,+cov b/src/exchange/afl-tests/id:000298,src:000000,op:arith8,pos:28,val:+13,+cov similarity index 100% rename from src/mint/afl-tests/id:000298,src:000000,op:arith8,pos:28,val:+13,+cov rename to src/exchange/afl-tests/id:000298,src:000000,op:arith8,pos:28,val:+13,+cov diff --git a/src/mint/afl-tests/id:000298,src:000000,op:arith8,pos:28,val:+9,+cov b/src/exchange/afl-tests/id:000298,src:000000,op:arith8,pos:28,val:+9,+cov similarity index 100% rename from src/mint/afl-tests/id:000298,src:000000,op:arith8,pos:28,val:+9,+cov rename to src/exchange/afl-tests/id:000298,src:000000,op:arith8,pos:28,val:+9,+cov diff --git a/src/mint/afl-tests/id:000299,src:000000,op:arith8,pos:28,val:-15,+cov b/src/exchange/afl-tests/id:000299,src:000000,op:arith8,pos:28,val:-15,+cov similarity index 100% rename from src/mint/afl-tests/id:000299,src:000000,op:arith8,pos:28,val:-15,+cov rename to src/exchange/afl-tests/id:000299,src:000000,op:arith8,pos:28,val:-15,+cov diff --git a/src/mint/afl-tests/id:000299,src:000000,op:arith8,pos:28,val:-17 b/src/exchange/afl-tests/id:000299,src:000000,op:arith8,pos:28,val:-17 similarity index 100% rename from src/mint/afl-tests/id:000299,src:000000,op:arith8,pos:28,val:-17 rename to src/exchange/afl-tests/id:000299,src:000000,op:arith8,pos:28,val:-17 diff --git a/src/mint/afl-tests/id:000300,src:000000,op:arith8,pos:28,val:+27,+cov b/src/exchange/afl-tests/id:000300,src:000000,op:arith8,pos:28,val:+27,+cov similarity index 100% rename from src/mint/afl-tests/id:000300,src:000000,op:arith8,pos:28,val:+27,+cov rename to src/exchange/afl-tests/id:000300,src:000000,op:arith8,pos:28,val:+27,+cov diff --git a/src/mint/afl-tests/id:000300,src:000000,op:arith8,pos:28,val:-33,+cov b/src/exchange/afl-tests/id:000300,src:000000,op:arith8,pos:28,val:-33,+cov similarity index 100% rename from src/mint/afl-tests/id:000300,src:000000,op:arith8,pos:28,val:-33,+cov rename to src/exchange/afl-tests/id:000300,src:000000,op:arith8,pos:28,val:-33,+cov diff --git a/src/mint/afl-tests/id:000301,src:000000,op:arith8,pos:28,val:-31,+cov b/src/exchange/afl-tests/id:000301,src:000000,op:arith8,pos:28,val:-31,+cov similarity index 100% rename from src/mint/afl-tests/id:000301,src:000000,op:arith8,pos:28,val:-31,+cov rename to src/exchange/afl-tests/id:000301,src:000000,op:arith8,pos:28,val:-31,+cov diff --git a/src/mint/afl-tests/id:000301,src:000000,op:arith8,pos:29,val:+14,+cov b/src/exchange/afl-tests/id:000301,src:000000,op:arith8,pos:29,val:+14,+cov similarity index 100% rename from src/mint/afl-tests/id:000301,src:000000,op:arith8,pos:29,val:+14,+cov rename to src/exchange/afl-tests/id:000301,src:000000,op:arith8,pos:29,val:+14,+cov diff --git a/src/mint/afl-tests/id:000302,src:000000,op:arith8,pos:29,val:-29,+cov b/src/exchange/afl-tests/id:000302,src:000000,op:arith8,pos:29,val:-29,+cov similarity index 100% rename from src/mint/afl-tests/id:000302,src:000000,op:arith8,pos:29,val:-29,+cov rename to src/exchange/afl-tests/id:000302,src:000000,op:arith8,pos:29,val:-29,+cov diff --git a/src/mint/afl-tests/id:000302,src:000000,op:arith8,pos:30,val:+3,+cov b/src/exchange/afl-tests/id:000302,src:000000,op:arith8,pos:30,val:+3,+cov similarity index 100% rename from src/mint/afl-tests/id:000302,src:000000,op:arith8,pos:30,val:+3,+cov rename to src/exchange/afl-tests/id:000302,src:000000,op:arith8,pos:30,val:+3,+cov diff --git a/src/mint/afl-tests/id:000303,src:000000,op:arith8,pos:30,val:+18,+cov b/src/exchange/afl-tests/id:000303,src:000000,op:arith8,pos:30,val:+18,+cov similarity index 100% rename from src/mint/afl-tests/id:000303,src:000000,op:arith8,pos:30,val:+18,+cov rename to src/exchange/afl-tests/id:000303,src:000000,op:arith8,pos:30,val:+18,+cov diff --git a/src/mint/afl-tests/id:000303,src:000000,op:arith8,pos:30,val:+31,+cov b/src/exchange/afl-tests/id:000303,src:000000,op:arith8,pos:30,val:+31,+cov similarity index 100% rename from src/mint/afl-tests/id:000303,src:000000,op:arith8,pos:30,val:+31,+cov rename to src/exchange/afl-tests/id:000303,src:000000,op:arith8,pos:30,val:+31,+cov diff --git a/src/mint/afl-tests/id:000304,src:000000,op:arith8,pos:31,val:+19,+cov b/src/exchange/afl-tests/id:000304,src:000000,op:arith8,pos:31,val:+19,+cov similarity index 100% rename from src/mint/afl-tests/id:000304,src:000000,op:arith8,pos:31,val:+19,+cov rename to src/exchange/afl-tests/id:000304,src:000000,op:arith8,pos:31,val:+19,+cov diff --git a/src/mint/afl-tests/id:000304,src:000000,op:arith8,pos:31,val:-33,+cov b/src/exchange/afl-tests/id:000304,src:000000,op:arith8,pos:31,val:-33,+cov similarity index 100% rename from src/mint/afl-tests/id:000304,src:000000,op:arith8,pos:31,val:-33,+cov rename to src/exchange/afl-tests/id:000304,src:000000,op:arith8,pos:31,val:-33,+cov diff --git a/src/mint/afl-tests/id:000305,src:000000,op:arith8,pos:31,val:-29,+cov b/src/exchange/afl-tests/id:000305,src:000000,op:arith8,pos:31,val:-29,+cov similarity index 100% rename from src/mint/afl-tests/id:000305,src:000000,op:arith8,pos:31,val:-29,+cov rename to src/exchange/afl-tests/id:000305,src:000000,op:arith8,pos:31,val:-29,+cov diff --git a/src/mint/afl-tests/id:000305,src:000000,op:arith8,pos:32,val:+19,+cov b/src/exchange/afl-tests/id:000305,src:000000,op:arith8,pos:32,val:+19,+cov similarity index 100% rename from src/mint/afl-tests/id:000305,src:000000,op:arith8,pos:32,val:+19,+cov rename to src/exchange/afl-tests/id:000305,src:000000,op:arith8,pos:32,val:+19,+cov diff --git a/src/mint/afl-tests/id:000306,src:000000,op:arith8,pos:31,val:-33,+cov b/src/exchange/afl-tests/id:000306,src:000000,op:arith8,pos:31,val:-33,+cov similarity index 100% rename from src/mint/afl-tests/id:000306,src:000000,op:arith8,pos:31,val:-33,+cov rename to src/exchange/afl-tests/id:000306,src:000000,op:arith8,pos:31,val:-33,+cov diff --git a/src/mint/afl-tests/id:000306,src:000000,op:arith8,pos:33,val:+15,+cov b/src/exchange/afl-tests/id:000306,src:000000,op:arith8,pos:33,val:+15,+cov similarity index 100% rename from src/mint/afl-tests/id:000306,src:000000,op:arith8,pos:33,val:+15,+cov rename to src/exchange/afl-tests/id:000306,src:000000,op:arith8,pos:33,val:+15,+cov diff --git a/src/mint/afl-tests/id:000307,src:000000,op:arith8,pos:31,val:+34,+cov b/src/exchange/afl-tests/id:000307,src:000000,op:arith8,pos:31,val:+34,+cov similarity index 100% rename from src/mint/afl-tests/id:000307,src:000000,op:arith8,pos:31,val:+34,+cov rename to src/exchange/afl-tests/id:000307,src:000000,op:arith8,pos:31,val:+34,+cov diff --git a/src/mint/afl-tests/id:000307,src:000000,op:arith8,pos:33,val:-15,+cov b/src/exchange/afl-tests/id:000307,src:000000,op:arith8,pos:33,val:-15,+cov similarity index 100% rename from src/mint/afl-tests/id:000307,src:000000,op:arith8,pos:33,val:-15,+cov rename to src/exchange/afl-tests/id:000307,src:000000,op:arith8,pos:33,val:-15,+cov diff --git a/src/mint/afl-tests/id:000308,src:000000,op:arith8,pos:32,val:+10,+cov b/src/exchange/afl-tests/id:000308,src:000000,op:arith8,pos:32,val:+10,+cov similarity index 100% rename from src/mint/afl-tests/id:000308,src:000000,op:arith8,pos:32,val:+10,+cov rename to src/exchange/afl-tests/id:000308,src:000000,op:arith8,pos:32,val:+10,+cov diff --git a/src/mint/afl-tests/id:000308,src:000000,op:arith8,pos:34,val:-27,+cov b/src/exchange/afl-tests/id:000308,src:000000,op:arith8,pos:34,val:-27,+cov similarity index 100% rename from src/mint/afl-tests/id:000308,src:000000,op:arith8,pos:34,val:-27,+cov rename to src/exchange/afl-tests/id:000308,src:000000,op:arith8,pos:34,val:-27,+cov diff --git a/src/mint/afl-tests/id:000309,src:000000,op:arith8,pos:32,val:-20,+cov b/src/exchange/afl-tests/id:000309,src:000000,op:arith8,pos:32,val:-20,+cov similarity index 100% rename from src/mint/afl-tests/id:000309,src:000000,op:arith8,pos:32,val:-20,+cov rename to src/exchange/afl-tests/id:000309,src:000000,op:arith8,pos:32,val:-20,+cov diff --git a/src/mint/afl-tests/id:000309,src:000000,op:arith8,pos:34,val:+34,+cov b/src/exchange/afl-tests/id:000309,src:000000,op:arith8,pos:34,val:+34,+cov similarity index 100% rename from src/mint/afl-tests/id:000309,src:000000,op:arith8,pos:34,val:+34,+cov rename to src/exchange/afl-tests/id:000309,src:000000,op:arith8,pos:34,val:+34,+cov diff --git a/src/mint/afl-tests/id:000310,src:000000,op:arith8,pos:33,val:+20,+cov b/src/exchange/afl-tests/id:000310,src:000000,op:arith8,pos:33,val:+20,+cov similarity index 100% rename from src/mint/afl-tests/id:000310,src:000000,op:arith8,pos:33,val:+20,+cov rename to src/exchange/afl-tests/id:000310,src:000000,op:arith8,pos:33,val:+20,+cov diff --git a/src/mint/afl-tests/id:000310,src:000000,op:arith8,pos:35,val:+18,+cov b/src/exchange/afl-tests/id:000310,src:000000,op:arith8,pos:35,val:+18,+cov similarity index 100% rename from src/mint/afl-tests/id:000310,src:000000,op:arith8,pos:35,val:+18,+cov rename to src/exchange/afl-tests/id:000310,src:000000,op:arith8,pos:35,val:+18,+cov diff --git a/src/mint/afl-tests/id:000311,src:000000,op:arith8,pos:33,val:+24,+cov b/src/exchange/afl-tests/id:000311,src:000000,op:arith8,pos:33,val:+24,+cov similarity index 100% rename from src/mint/afl-tests/id:000311,src:000000,op:arith8,pos:33,val:+24,+cov rename to src/exchange/afl-tests/id:000311,src:000000,op:arith8,pos:33,val:+24,+cov diff --git a/src/mint/afl-tests/id:000311,src:000000,op:arith8,pos:35,val:-27,+cov b/src/exchange/afl-tests/id:000311,src:000000,op:arith8,pos:35,val:-27,+cov similarity index 100% rename from src/mint/afl-tests/id:000311,src:000000,op:arith8,pos:35,val:-27,+cov rename to src/exchange/afl-tests/id:000311,src:000000,op:arith8,pos:35,val:-27,+cov diff --git a/src/mint/afl-tests/id:000312,src:000000,op:arith8,pos:34,val:-3,+cov b/src/exchange/afl-tests/id:000312,src:000000,op:arith8,pos:34,val:-3,+cov similarity index 100% rename from src/mint/afl-tests/id:000312,src:000000,op:arith8,pos:34,val:-3,+cov rename to src/exchange/afl-tests/id:000312,src:000000,op:arith8,pos:34,val:-3,+cov diff --git a/src/mint/afl-tests/id:000312,src:000000,op:arith8,pos:35,val:+35,+cov b/src/exchange/afl-tests/id:000312,src:000000,op:arith8,pos:35,val:+35,+cov similarity index 100% rename from src/mint/afl-tests/id:000312,src:000000,op:arith8,pos:35,val:+35,+cov rename to src/exchange/afl-tests/id:000312,src:000000,op:arith8,pos:35,val:+35,+cov diff --git a/src/mint/afl-tests/id:000313,src:000000,op:arith8,pos:34,val:+18,+cov b/src/exchange/afl-tests/id:000313,src:000000,op:arith8,pos:34,val:+18,+cov similarity index 100% rename from src/mint/afl-tests/id:000313,src:000000,op:arith8,pos:34,val:+18,+cov rename to src/exchange/afl-tests/id:000313,src:000000,op:arith8,pos:34,val:+18,+cov diff --git a/src/mint/afl-tests/id:000313,src:000000,op:arith8,pos:36,val:+13,+cov b/src/exchange/afl-tests/id:000313,src:000000,op:arith8,pos:36,val:+13,+cov similarity index 100% rename from src/mint/afl-tests/id:000313,src:000000,op:arith8,pos:36,val:+13,+cov rename to src/exchange/afl-tests/id:000313,src:000000,op:arith8,pos:36,val:+13,+cov diff --git a/src/mint/afl-tests/id:000314,src:000000,op:arith8,pos:34,val:-30,+cov b/src/exchange/afl-tests/id:000314,src:000000,op:arith8,pos:34,val:-30,+cov similarity index 100% rename from src/mint/afl-tests/id:000314,src:000000,op:arith8,pos:34,val:-30,+cov rename to src/exchange/afl-tests/id:000314,src:000000,op:arith8,pos:34,val:-30,+cov diff --git a/src/mint/afl-tests/id:000314,src:000000,op:arith8,pos:36,val:+32,+cov b/src/exchange/afl-tests/id:000314,src:000000,op:arith8,pos:36,val:+32,+cov similarity index 100% rename from src/mint/afl-tests/id:000314,src:000000,op:arith8,pos:36,val:+32,+cov rename to src/exchange/afl-tests/id:000314,src:000000,op:arith8,pos:36,val:+32,+cov diff --git a/src/mint/afl-tests/id:000315,src:000000,op:arith8,pos:35,val:+17,+cov b/src/exchange/afl-tests/id:000315,src:000000,op:arith8,pos:35,val:+17,+cov similarity index 100% rename from src/mint/afl-tests/id:000315,src:000000,op:arith8,pos:35,val:+17,+cov rename to src/exchange/afl-tests/id:000315,src:000000,op:arith8,pos:35,val:+17,+cov diff --git a/src/mint/afl-tests/id:000315,src:000000,op:arith8,pos:37,val:+24,+cov b/src/exchange/afl-tests/id:000315,src:000000,op:arith8,pos:37,val:+24,+cov similarity index 100% rename from src/mint/afl-tests/id:000315,src:000000,op:arith8,pos:37,val:+24,+cov rename to src/exchange/afl-tests/id:000315,src:000000,op:arith8,pos:37,val:+24,+cov diff --git a/src/mint/afl-tests/id:000316,src:000000,op:arith8,pos:35,val:-19,+cov b/src/exchange/afl-tests/id:000316,src:000000,op:arith8,pos:35,val:-19,+cov similarity index 100% rename from src/mint/afl-tests/id:000316,src:000000,op:arith8,pos:35,val:-19,+cov rename to src/exchange/afl-tests/id:000316,src:000000,op:arith8,pos:35,val:-19,+cov diff --git a/src/mint/afl-tests/id:000316,src:000000,op:arith8,pos:37,val:+32,+cov b/src/exchange/afl-tests/id:000316,src:000000,op:arith8,pos:37,val:+32,+cov similarity index 100% rename from src/mint/afl-tests/id:000316,src:000000,op:arith8,pos:37,val:+32,+cov rename to src/exchange/afl-tests/id:000316,src:000000,op:arith8,pos:37,val:+32,+cov diff --git a/src/mint/afl-tests/id:000317,src:000000,op:arith8,pos:36,val:-26,+cov b/src/exchange/afl-tests/id:000317,src:000000,op:arith8,pos:36,val:-26,+cov similarity index 100% rename from src/mint/afl-tests/id:000317,src:000000,op:arith8,pos:36,val:-26,+cov rename to src/exchange/afl-tests/id:000317,src:000000,op:arith8,pos:36,val:-26,+cov diff --git a/src/mint/afl-tests/id:000317,src:000000,op:arith8,pos:38,val:-35,+cov b/src/exchange/afl-tests/id:000317,src:000000,op:arith8,pos:38,val:-35,+cov similarity index 100% rename from src/mint/afl-tests/id:000317,src:000000,op:arith8,pos:38,val:-35,+cov rename to src/exchange/afl-tests/id:000317,src:000000,op:arith8,pos:38,val:-35,+cov diff --git a/src/mint/afl-tests/id:000318,src:000000,op:arith8,pos:36,val:+27,+cov b/src/exchange/afl-tests/id:000318,src:000000,op:arith8,pos:36,val:+27,+cov similarity index 100% rename from src/mint/afl-tests/id:000318,src:000000,op:arith8,pos:36,val:+27,+cov rename to src/exchange/afl-tests/id:000318,src:000000,op:arith8,pos:36,val:+27,+cov diff --git a/src/mint/afl-tests/id:000318,src:000000,op:arith8,pos:39,val:+18,+cov b/src/exchange/afl-tests/id:000318,src:000000,op:arith8,pos:39,val:+18,+cov similarity index 100% rename from src/mint/afl-tests/id:000318,src:000000,op:arith8,pos:39,val:+18,+cov rename to src/exchange/afl-tests/id:000318,src:000000,op:arith8,pos:39,val:+18,+cov diff --git a/src/mint/afl-tests/id:000319,src:000000,op:arith8,pos:36,val:+32,+cov b/src/exchange/afl-tests/id:000319,src:000000,op:arith8,pos:36,val:+32,+cov similarity index 100% rename from src/mint/afl-tests/id:000319,src:000000,op:arith8,pos:36,val:+32,+cov rename to src/exchange/afl-tests/id:000319,src:000000,op:arith8,pos:36,val:+32,+cov diff --git a/src/mint/afl-tests/id:000319,src:000000,op:arith8,pos:39,val:-23,+cov b/src/exchange/afl-tests/id:000319,src:000000,op:arith8,pos:39,val:-23,+cov similarity index 100% rename from src/mint/afl-tests/id:000319,src:000000,op:arith8,pos:39,val:-23,+cov rename to src/exchange/afl-tests/id:000319,src:000000,op:arith8,pos:39,val:-23,+cov diff --git a/src/mint/afl-tests/id:000320,src:000000,op:arith8,pos:37,val:-9,+cov b/src/exchange/afl-tests/id:000320,src:000000,op:arith8,pos:37,val:-9,+cov similarity index 100% rename from src/mint/afl-tests/id:000320,src:000000,op:arith8,pos:37,val:-9,+cov rename to src/exchange/afl-tests/id:000320,src:000000,op:arith8,pos:37,val:-9,+cov diff --git a/src/mint/afl-tests/id:000320,src:000000,op:arith8,pos:39,val:-24,+cov b/src/exchange/afl-tests/id:000320,src:000000,op:arith8,pos:39,val:-24,+cov similarity index 100% rename from src/mint/afl-tests/id:000320,src:000000,op:arith8,pos:39,val:-24,+cov rename to src/exchange/afl-tests/id:000320,src:000000,op:arith8,pos:39,val:-24,+cov diff --git a/src/mint/afl-tests/id:000321,src:000000,op:arith8,pos:37,val:+21 b/src/exchange/afl-tests/id:000321,src:000000,op:arith8,pos:37,val:+21 similarity index 100% rename from src/mint/afl-tests/id:000321,src:000000,op:arith8,pos:37,val:+21 rename to src/exchange/afl-tests/id:000321,src:000000,op:arith8,pos:37,val:+21 diff --git a/src/mint/afl-tests/id:000321,src:000000,op:arith8,pos:39,val:+25,+cov b/src/exchange/afl-tests/id:000321,src:000000,op:arith8,pos:39,val:+25,+cov similarity index 100% rename from src/mint/afl-tests/id:000321,src:000000,op:arith8,pos:39,val:+25,+cov rename to src/exchange/afl-tests/id:000321,src:000000,op:arith8,pos:39,val:+25,+cov diff --git a/src/mint/afl-tests/id:000322,src:000000,op:arith8,pos:37,val:+24,+cov b/src/exchange/afl-tests/id:000322,src:000000,op:arith8,pos:37,val:+24,+cov similarity index 100% rename from src/mint/afl-tests/id:000322,src:000000,op:arith8,pos:37,val:+24,+cov rename to src/exchange/afl-tests/id:000322,src:000000,op:arith8,pos:37,val:+24,+cov diff --git a/src/mint/afl-tests/id:000322,src:000000,op:arith8,pos:40,val:-21,+cov b/src/exchange/afl-tests/id:000322,src:000000,op:arith8,pos:40,val:-21,+cov similarity index 100% rename from src/mint/afl-tests/id:000322,src:000000,op:arith8,pos:40,val:-21,+cov rename to src/exchange/afl-tests/id:000322,src:000000,op:arith8,pos:40,val:-21,+cov diff --git a/src/mint/afl-tests/id:000323,src:000000,op:arith8,pos:39,val:+13,+cov b/src/exchange/afl-tests/id:000323,src:000000,op:arith8,pos:39,val:+13,+cov similarity index 100% rename from src/mint/afl-tests/id:000323,src:000000,op:arith8,pos:39,val:+13,+cov rename to src/exchange/afl-tests/id:000323,src:000000,op:arith8,pos:39,val:+13,+cov diff --git a/src/mint/afl-tests/id:000323,src:000000,op:arith8,pos:41,val:-5,+cov b/src/exchange/afl-tests/id:000323,src:000000,op:arith8,pos:41,val:-5,+cov similarity index 100% rename from src/mint/afl-tests/id:000323,src:000000,op:arith8,pos:41,val:-5,+cov rename to src/exchange/afl-tests/id:000323,src:000000,op:arith8,pos:41,val:-5,+cov diff --git a/src/mint/afl-tests/id:000324,src:000000,op:arith8,pos:39,val:-23,+cov b/src/exchange/afl-tests/id:000324,src:000000,op:arith8,pos:39,val:-23,+cov similarity index 100% rename from src/mint/afl-tests/id:000324,src:000000,op:arith8,pos:39,val:-23,+cov rename to src/exchange/afl-tests/id:000324,src:000000,op:arith8,pos:39,val:-23,+cov diff --git a/src/mint/afl-tests/id:000324,src:000000,op:arith8,pos:41,val:+13,+cov b/src/exchange/afl-tests/id:000324,src:000000,op:arith8,pos:41,val:+13,+cov similarity index 100% rename from src/mint/afl-tests/id:000324,src:000000,op:arith8,pos:41,val:+13,+cov rename to src/exchange/afl-tests/id:000324,src:000000,op:arith8,pos:41,val:+13,+cov diff --git a/src/mint/afl-tests/id:000325,src:000000,op:arith8,pos:40,val:+20,+cov b/src/exchange/afl-tests/id:000325,src:000000,op:arith8,pos:40,val:+20,+cov similarity index 100% rename from src/mint/afl-tests/id:000325,src:000000,op:arith8,pos:40,val:+20,+cov rename to src/exchange/afl-tests/id:000325,src:000000,op:arith8,pos:40,val:+20,+cov diff --git a/src/mint/afl-tests/id:000325,src:000000,op:arith8,pos:41,val:+26,+cov b/src/exchange/afl-tests/id:000325,src:000000,op:arith8,pos:41,val:+26,+cov similarity index 100% rename from src/mint/afl-tests/id:000325,src:000000,op:arith8,pos:41,val:+26,+cov rename to src/exchange/afl-tests/id:000325,src:000000,op:arith8,pos:41,val:+26,+cov diff --git a/src/mint/afl-tests/id:000326,src:000000,op:arith8,pos:40,val:+27,+cov b/src/exchange/afl-tests/id:000326,src:000000,op:arith8,pos:40,val:+27,+cov similarity index 100% rename from src/mint/afl-tests/id:000326,src:000000,op:arith8,pos:40,val:+27,+cov rename to src/exchange/afl-tests/id:000326,src:000000,op:arith8,pos:40,val:+27,+cov diff --git a/src/mint/afl-tests/id:000326,src:000000,op:arith8,pos:41,val:+27,+cov b/src/exchange/afl-tests/id:000326,src:000000,op:arith8,pos:41,val:+27,+cov similarity index 100% rename from src/mint/afl-tests/id:000326,src:000000,op:arith8,pos:41,val:+27,+cov rename to src/exchange/afl-tests/id:000326,src:000000,op:arith8,pos:41,val:+27,+cov diff --git a/src/mint/afl-tests/id:000327,src:000000,op:arith8,pos:41,val:-33,+cov b/src/exchange/afl-tests/id:000327,src:000000,op:arith8,pos:41,val:-33,+cov similarity index 100% rename from src/mint/afl-tests/id:000327,src:000000,op:arith8,pos:41,val:-33,+cov rename to src/exchange/afl-tests/id:000327,src:000000,op:arith8,pos:41,val:-33,+cov diff --git a/src/mint/afl-tests/id:000327,src:000000,op:arith8,pos:42,val:+29,+cov b/src/exchange/afl-tests/id:000327,src:000000,op:arith8,pos:42,val:+29,+cov similarity index 100% rename from src/mint/afl-tests/id:000327,src:000000,op:arith8,pos:42,val:+29,+cov rename to src/exchange/afl-tests/id:000327,src:000000,op:arith8,pos:42,val:+29,+cov diff --git a/src/mint/afl-tests/id:000328,src:000000,op:arith8,pos:41,val:+35,+cov b/src/exchange/afl-tests/id:000328,src:000000,op:arith8,pos:41,val:+35,+cov similarity index 100% rename from src/mint/afl-tests/id:000328,src:000000,op:arith8,pos:41,val:+35,+cov rename to src/exchange/afl-tests/id:000328,src:000000,op:arith8,pos:41,val:+35,+cov diff --git a/src/mint/afl-tests/id:000328,src:000000,op:arith8,pos:43,val:-33,+cov b/src/exchange/afl-tests/id:000328,src:000000,op:arith8,pos:43,val:-33,+cov similarity index 100% rename from src/mint/afl-tests/id:000328,src:000000,op:arith8,pos:43,val:-33,+cov rename to src/exchange/afl-tests/id:000328,src:000000,op:arith8,pos:43,val:-33,+cov diff --git a/src/mint/afl-tests/id:000329,src:000000,op:arith8,pos:42,val:-6,+cov b/src/exchange/afl-tests/id:000329,src:000000,op:arith8,pos:42,val:-6,+cov similarity index 100% rename from src/mint/afl-tests/id:000329,src:000000,op:arith8,pos:42,val:-6,+cov rename to src/exchange/afl-tests/id:000329,src:000000,op:arith8,pos:42,val:-6,+cov diff --git a/src/mint/afl-tests/id:000329,src:000000,op:arith8,pos:44,val:+17,+cov b/src/exchange/afl-tests/id:000329,src:000000,op:arith8,pos:44,val:+17,+cov similarity index 100% rename from src/mint/afl-tests/id:000329,src:000000,op:arith8,pos:44,val:+17,+cov rename to src/exchange/afl-tests/id:000329,src:000000,op:arith8,pos:44,val:+17,+cov diff --git a/src/mint/afl-tests/id:000330,src:000000,op:arith8,pos:42,val:+13,+cov b/src/exchange/afl-tests/id:000330,src:000000,op:arith8,pos:42,val:+13,+cov similarity index 100% rename from src/mint/afl-tests/id:000330,src:000000,op:arith8,pos:42,val:+13,+cov rename to src/exchange/afl-tests/id:000330,src:000000,op:arith8,pos:42,val:+13,+cov diff --git a/src/mint/afl-tests/id:000330,src:000000,op:arith8,pos:45,val:-5,+cov b/src/exchange/afl-tests/id:000330,src:000000,op:arith8,pos:45,val:-5,+cov similarity index 100% rename from src/mint/afl-tests/id:000330,src:000000,op:arith8,pos:45,val:-5,+cov rename to src/exchange/afl-tests/id:000330,src:000000,op:arith8,pos:45,val:-5,+cov diff --git a/src/mint/afl-tests/id:000331,src:000000,op:arith8,pos:42,val:+18,+cov b/src/exchange/afl-tests/id:000331,src:000000,op:arith8,pos:42,val:+18,+cov similarity index 100% rename from src/mint/afl-tests/id:000331,src:000000,op:arith8,pos:42,val:+18,+cov rename to src/exchange/afl-tests/id:000331,src:000000,op:arith8,pos:42,val:+18,+cov diff --git a/src/mint/afl-tests/id:000331,src:000000,op:arith8,pos:45,val:-11,+cov b/src/exchange/afl-tests/id:000331,src:000000,op:arith8,pos:45,val:-11,+cov similarity index 100% rename from src/mint/afl-tests/id:000331,src:000000,op:arith8,pos:45,val:-11,+cov rename to src/exchange/afl-tests/id:000331,src:000000,op:arith8,pos:45,val:-11,+cov diff --git a/src/mint/afl-tests/id:000332,src:000000,op:arith8,pos:43,val:-23,+cov b/src/exchange/afl-tests/id:000332,src:000000,op:arith8,pos:43,val:-23,+cov similarity index 100% rename from src/mint/afl-tests/id:000332,src:000000,op:arith8,pos:43,val:-23,+cov rename to src/exchange/afl-tests/id:000332,src:000000,op:arith8,pos:43,val:-23,+cov diff --git a/src/mint/afl-tests/id:000332,src:000000,op:arith8,pos:45,val:+19,+cov b/src/exchange/afl-tests/id:000332,src:000000,op:arith8,pos:45,val:+19,+cov similarity index 100% rename from src/mint/afl-tests/id:000332,src:000000,op:arith8,pos:45,val:+19,+cov rename to src/exchange/afl-tests/id:000332,src:000000,op:arith8,pos:45,val:+19,+cov diff --git a/src/mint/afl-tests/id:000333,src:000000,op:arith8,pos:43,val:+33,+cov b/src/exchange/afl-tests/id:000333,src:000000,op:arith8,pos:43,val:+33,+cov similarity index 100% rename from src/mint/afl-tests/id:000333,src:000000,op:arith8,pos:43,val:+33,+cov rename to src/exchange/afl-tests/id:000333,src:000000,op:arith8,pos:43,val:+33,+cov diff --git a/src/mint/afl-tests/id:000333,src:000000,op:arith8,pos:51,val:-12,+cov b/src/exchange/afl-tests/id:000333,src:000000,op:arith8,pos:51,val:-12,+cov similarity index 100% rename from src/mint/afl-tests/id:000333,src:000000,op:arith8,pos:51,val:-12,+cov rename to src/exchange/afl-tests/id:000333,src:000000,op:arith8,pos:51,val:-12,+cov diff --git a/src/mint/afl-tests/id:000334,src:000000,op:arith8,pos:44,val:+11,+cov b/src/exchange/afl-tests/id:000334,src:000000,op:arith8,pos:44,val:+11,+cov similarity index 100% rename from src/mint/afl-tests/id:000334,src:000000,op:arith8,pos:44,val:+11,+cov rename to src/exchange/afl-tests/id:000334,src:000000,op:arith8,pos:44,val:+11,+cov diff --git a/src/mint/afl-tests/id:000334,src:000000,op:arith8,pos:51,val:+14,+cov b/src/exchange/afl-tests/id:000334,src:000000,op:arith8,pos:51,val:+14,+cov similarity index 100% rename from src/mint/afl-tests/id:000334,src:000000,op:arith8,pos:51,val:+14,+cov rename to src/exchange/afl-tests/id:000334,src:000000,op:arith8,pos:51,val:+14,+cov diff --git a/src/mint/afl-tests/id:000335,src:000000,op:arith8,pos:45,val:-24,+cov b/src/exchange/afl-tests/id:000335,src:000000,op:arith8,pos:45,val:-24,+cov similarity index 100% rename from src/mint/afl-tests/id:000335,src:000000,op:arith8,pos:45,val:-24,+cov rename to src/exchange/afl-tests/id:000335,src:000000,op:arith8,pos:45,val:-24,+cov diff --git a/src/mint/afl-tests/id:000335,src:000000,op:arith8,pos:51,val:-22,+cov b/src/exchange/afl-tests/id:000335,src:000000,op:arith8,pos:51,val:-22,+cov similarity index 100% rename from src/mint/afl-tests/id:000335,src:000000,op:arith8,pos:51,val:-22,+cov rename to src/exchange/afl-tests/id:000335,src:000000,op:arith8,pos:51,val:-22,+cov diff --git a/src/mint/afl-tests/id:000336,src:000000,op:arith8,pos:45,val:-27,+cov b/src/exchange/afl-tests/id:000336,src:000000,op:arith8,pos:45,val:-27,+cov similarity index 100% rename from src/mint/afl-tests/id:000336,src:000000,op:arith8,pos:45,val:-27,+cov rename to src/exchange/afl-tests/id:000336,src:000000,op:arith8,pos:45,val:-27,+cov diff --git a/src/mint/afl-tests/id:000336,src:000000,op:arith8,pos:51,val:-23,+cov b/src/exchange/afl-tests/id:000336,src:000000,op:arith8,pos:51,val:-23,+cov similarity index 100% rename from src/mint/afl-tests/id:000336,src:000000,op:arith8,pos:51,val:-23,+cov rename to src/exchange/afl-tests/id:000336,src:000000,op:arith8,pos:51,val:-23,+cov diff --git a/src/mint/afl-tests/id:000337,src:000000,op:arith8,pos:46,val:+7,+cov b/src/exchange/afl-tests/id:000337,src:000000,op:arith8,pos:46,val:+7,+cov similarity index 100% rename from src/mint/afl-tests/id:000337,src:000000,op:arith8,pos:46,val:+7,+cov rename to src/exchange/afl-tests/id:000337,src:000000,op:arith8,pos:46,val:+7,+cov diff --git a/src/mint/afl-tests/id:000337,src:000000,op:arith8,pos:52,val:-14,+cov b/src/exchange/afl-tests/id:000337,src:000000,op:arith8,pos:52,val:-14,+cov similarity index 100% rename from src/mint/afl-tests/id:000337,src:000000,op:arith8,pos:52,val:-14,+cov rename to src/exchange/afl-tests/id:000337,src:000000,op:arith8,pos:52,val:-14,+cov diff --git a/src/mint/afl-tests/id:000338,src:000000,op:arith8,pos:46,val:-21,+cov b/src/exchange/afl-tests/id:000338,src:000000,op:arith8,pos:46,val:-21,+cov similarity index 100% rename from src/mint/afl-tests/id:000338,src:000000,op:arith8,pos:46,val:-21,+cov rename to src/exchange/afl-tests/id:000338,src:000000,op:arith8,pos:46,val:-21,+cov diff --git a/src/mint/afl-tests/id:000338,src:000000,op:arith8,pos:52,val:+28,+cov b/src/exchange/afl-tests/id:000338,src:000000,op:arith8,pos:52,val:+28,+cov similarity index 100% rename from src/mint/afl-tests/id:000338,src:000000,op:arith8,pos:52,val:+28,+cov rename to src/exchange/afl-tests/id:000338,src:000000,op:arith8,pos:52,val:+28,+cov diff --git a/src/mint/afl-tests/id:000339,src:000000,op:arith8,pos:46,val:+31,+cov b/src/exchange/afl-tests/id:000339,src:000000,op:arith8,pos:46,val:+31,+cov similarity index 100% rename from src/mint/afl-tests/id:000339,src:000000,op:arith8,pos:46,val:+31,+cov rename to src/exchange/afl-tests/id:000339,src:000000,op:arith8,pos:46,val:+31,+cov diff --git a/src/mint/afl-tests/id:000339,src:000000,op:arith8,pos:53,val:+9,+cov b/src/exchange/afl-tests/id:000339,src:000000,op:arith8,pos:53,val:+9,+cov similarity index 100% rename from src/mint/afl-tests/id:000339,src:000000,op:arith8,pos:53,val:+9,+cov rename to src/exchange/afl-tests/id:000339,src:000000,op:arith8,pos:53,val:+9,+cov diff --git a/src/mint/afl-tests/id:000340,src:000000,op:arith8,pos:49,val:+16,+cov b/src/exchange/afl-tests/id:000340,src:000000,op:arith8,pos:49,val:+16,+cov similarity index 100% rename from src/mint/afl-tests/id:000340,src:000000,op:arith8,pos:49,val:+16,+cov rename to src/exchange/afl-tests/id:000340,src:000000,op:arith8,pos:49,val:+16,+cov diff --git a/src/mint/afl-tests/id:000340,src:000000,op:arith8,pos:53,val:-11,+cov b/src/exchange/afl-tests/id:000340,src:000000,op:arith8,pos:53,val:-11,+cov similarity index 100% rename from src/mint/afl-tests/id:000340,src:000000,op:arith8,pos:53,val:-11,+cov rename to src/exchange/afl-tests/id:000340,src:000000,op:arith8,pos:53,val:-11,+cov diff --git a/src/mint/afl-tests/id:000341,src:000000,op:arith8,pos:49,val:-26,+cov b/src/exchange/afl-tests/id:000341,src:000000,op:arith8,pos:49,val:-26,+cov similarity index 100% rename from src/mint/afl-tests/id:000341,src:000000,op:arith8,pos:49,val:-26,+cov rename to src/exchange/afl-tests/id:000341,src:000000,op:arith8,pos:49,val:-26,+cov diff --git a/src/mint/afl-tests/id:000341,src:000000,op:arith8,pos:53,val:-17,+cov b/src/exchange/afl-tests/id:000341,src:000000,op:arith8,pos:53,val:-17,+cov similarity index 100% rename from src/mint/afl-tests/id:000341,src:000000,op:arith8,pos:53,val:-17,+cov rename to src/exchange/afl-tests/id:000341,src:000000,op:arith8,pos:53,val:-17,+cov diff --git a/src/mint/afl-tests/id:000342,src:000000,op:arith8,pos:49,val:+34,+cov b/src/exchange/afl-tests/id:000342,src:000000,op:arith8,pos:49,val:+34,+cov similarity index 100% rename from src/mint/afl-tests/id:000342,src:000000,op:arith8,pos:49,val:+34,+cov rename to src/exchange/afl-tests/id:000342,src:000000,op:arith8,pos:49,val:+34,+cov diff --git a/src/mint/afl-tests/id:000342,src:000000,op:arith8,pos:53,val:-18,+cov b/src/exchange/afl-tests/id:000342,src:000000,op:arith8,pos:53,val:-18,+cov similarity index 100% rename from src/mint/afl-tests/id:000342,src:000000,op:arith8,pos:53,val:-18,+cov rename to src/exchange/afl-tests/id:000342,src:000000,op:arith8,pos:53,val:-18,+cov diff --git a/src/mint/afl-tests/id:000343,src:000000,op:arith8,pos:50,val:-7,+cov b/src/exchange/afl-tests/id:000343,src:000000,op:arith8,pos:50,val:-7,+cov similarity index 100% rename from src/mint/afl-tests/id:000343,src:000000,op:arith8,pos:50,val:-7,+cov rename to src/exchange/afl-tests/id:000343,src:000000,op:arith8,pos:50,val:-7,+cov diff --git a/src/mint/afl-tests/id:000343,src:000000,op:arith8,pos:53,val:-35,+cov b/src/exchange/afl-tests/id:000343,src:000000,op:arith8,pos:53,val:-35,+cov similarity index 100% rename from src/mint/afl-tests/id:000343,src:000000,op:arith8,pos:53,val:-35,+cov rename to src/exchange/afl-tests/id:000343,src:000000,op:arith8,pos:53,val:-35,+cov diff --git a/src/mint/afl-tests/id:000344,src:000000,op:arith8,pos:50,val:+22,+cov b/src/exchange/afl-tests/id:000344,src:000000,op:arith8,pos:50,val:+22,+cov similarity index 100% rename from src/mint/afl-tests/id:000344,src:000000,op:arith8,pos:50,val:+22,+cov rename to src/exchange/afl-tests/id:000344,src:000000,op:arith8,pos:50,val:+22,+cov diff --git a/src/mint/afl-tests/id:000344,src:000000,op:arith8,pos:54,val:-15,+cov b/src/exchange/afl-tests/id:000344,src:000000,op:arith8,pos:54,val:-15,+cov similarity index 100% rename from src/mint/afl-tests/id:000344,src:000000,op:arith8,pos:54,val:-15,+cov rename to src/exchange/afl-tests/id:000344,src:000000,op:arith8,pos:54,val:-15,+cov diff --git a/src/mint/afl-tests/id:000345,src:000000,op:arith8,pos:50,val:+24,+cov b/src/exchange/afl-tests/id:000345,src:000000,op:arith8,pos:50,val:+24,+cov similarity index 100% rename from src/mint/afl-tests/id:000345,src:000000,op:arith8,pos:50,val:+24,+cov rename to src/exchange/afl-tests/id:000345,src:000000,op:arith8,pos:50,val:+24,+cov diff --git a/src/mint/afl-tests/id:000345,src:000000,op:arith8,pos:54,val:-22,+cov b/src/exchange/afl-tests/id:000345,src:000000,op:arith8,pos:54,val:-22,+cov similarity index 100% rename from src/mint/afl-tests/id:000345,src:000000,op:arith8,pos:54,val:-22,+cov rename to src/exchange/afl-tests/id:000345,src:000000,op:arith8,pos:54,val:-22,+cov diff --git a/src/mint/afl-tests/id:000346,src:000000,op:arith8,pos:50,val:-31,+cov b/src/exchange/afl-tests/id:000346,src:000000,op:arith8,pos:50,val:-31,+cov similarity index 100% rename from src/mint/afl-tests/id:000346,src:000000,op:arith8,pos:50,val:-31,+cov rename to src/exchange/afl-tests/id:000346,src:000000,op:arith8,pos:50,val:-31,+cov diff --git a/src/mint/afl-tests/id:000346,src:000000,op:arith8,pos:55,val:-7 b/src/exchange/afl-tests/id:000346,src:000000,op:arith8,pos:55,val:-7 similarity index 100% rename from src/mint/afl-tests/id:000346,src:000000,op:arith8,pos:55,val:-7 rename to src/exchange/afl-tests/id:000346,src:000000,op:arith8,pos:55,val:-7 diff --git a/src/mint/afl-tests/id:000347,src:000000,op:arith8,pos:51,val:-1,+cov b/src/exchange/afl-tests/id:000347,src:000000,op:arith8,pos:51,val:-1,+cov similarity index 100% rename from src/mint/afl-tests/id:000347,src:000000,op:arith8,pos:51,val:-1,+cov rename to src/exchange/afl-tests/id:000347,src:000000,op:arith8,pos:51,val:-1,+cov diff --git a/src/mint/afl-tests/id:000347,src:000000,op:arith8,pos:55,val:-33,+cov b/src/exchange/afl-tests/id:000347,src:000000,op:arith8,pos:55,val:-33,+cov similarity index 100% rename from src/mint/afl-tests/id:000347,src:000000,op:arith8,pos:55,val:-33,+cov rename to src/exchange/afl-tests/id:000347,src:000000,op:arith8,pos:55,val:-33,+cov diff --git a/src/mint/afl-tests/id:000348,src:000000,op:arith8,pos:51,val:+18,+cov b/src/exchange/afl-tests/id:000348,src:000000,op:arith8,pos:51,val:+18,+cov similarity index 100% rename from src/mint/afl-tests/id:000348,src:000000,op:arith8,pos:51,val:+18,+cov rename to src/exchange/afl-tests/id:000348,src:000000,op:arith8,pos:51,val:+18,+cov diff --git a/src/mint/afl-tests/id:000348,src:000000,op:arith8,pos:55,val:-35,+cov b/src/exchange/afl-tests/id:000348,src:000000,op:arith8,pos:55,val:-35,+cov similarity index 100% rename from src/mint/afl-tests/id:000348,src:000000,op:arith8,pos:55,val:-35,+cov rename to src/exchange/afl-tests/id:000348,src:000000,op:arith8,pos:55,val:-35,+cov diff --git a/src/mint/afl-tests/id:000349,src:000000,op:arith8,pos:52,val:-6,+cov b/src/exchange/afl-tests/id:000349,src:000000,op:arith8,pos:52,val:-6,+cov similarity index 100% rename from src/mint/afl-tests/id:000349,src:000000,op:arith8,pos:52,val:-6,+cov rename to src/exchange/afl-tests/id:000349,src:000000,op:arith8,pos:52,val:-6,+cov diff --git a/src/mint/afl-tests/id:000349,src:000000,op:arith8,pos:57,val:-14,+cov b/src/exchange/afl-tests/id:000349,src:000000,op:arith8,pos:57,val:-14,+cov similarity index 100% rename from src/mint/afl-tests/id:000349,src:000000,op:arith8,pos:57,val:-14,+cov rename to src/exchange/afl-tests/id:000349,src:000000,op:arith8,pos:57,val:-14,+cov diff --git a/src/mint/afl-tests/id:000350,src:000000,op:arith8,pos:52,val:+22,+cov b/src/exchange/afl-tests/id:000350,src:000000,op:arith8,pos:52,val:+22,+cov similarity index 100% rename from src/mint/afl-tests/id:000350,src:000000,op:arith8,pos:52,val:+22,+cov rename to src/exchange/afl-tests/id:000350,src:000000,op:arith8,pos:52,val:+22,+cov diff --git a/src/mint/afl-tests/id:000350,src:000000,op:arith8,pos:57,val:+28,+cov b/src/exchange/afl-tests/id:000350,src:000000,op:arith8,pos:57,val:+28,+cov similarity index 100% rename from src/mint/afl-tests/id:000350,src:000000,op:arith8,pos:57,val:+28,+cov rename to src/exchange/afl-tests/id:000350,src:000000,op:arith8,pos:57,val:+28,+cov diff --git a/src/mint/afl-tests/id:000351,src:000000,op:arith8,pos:52,val:-31,+cov b/src/exchange/afl-tests/id:000351,src:000000,op:arith8,pos:52,val:-31,+cov similarity index 100% rename from src/mint/afl-tests/id:000351,src:000000,op:arith8,pos:52,val:-31,+cov rename to src/exchange/afl-tests/id:000351,src:000000,op:arith8,pos:52,val:-31,+cov diff --git a/src/mint/afl-tests/id:000351,src:000000,op:arith8,pos:57,val:-29,+cov b/src/exchange/afl-tests/id:000351,src:000000,op:arith8,pos:57,val:-29,+cov similarity index 100% rename from src/mint/afl-tests/id:000351,src:000000,op:arith8,pos:57,val:-29,+cov rename to src/exchange/afl-tests/id:000351,src:000000,op:arith8,pos:57,val:-29,+cov diff --git a/src/mint/afl-tests/id:000352,src:000000,op:arith8,pos:53,val:-18,+cov b/src/exchange/afl-tests/id:000352,src:000000,op:arith8,pos:53,val:-18,+cov similarity index 100% rename from src/mint/afl-tests/id:000352,src:000000,op:arith8,pos:53,val:-18,+cov rename to src/exchange/afl-tests/id:000352,src:000000,op:arith8,pos:53,val:-18,+cov diff --git a/src/mint/afl-tests/id:000352,src:000000,op:arith8,pos:58,val:-29,+cov b/src/exchange/afl-tests/id:000352,src:000000,op:arith8,pos:58,val:-29,+cov similarity index 100% rename from src/mint/afl-tests/id:000352,src:000000,op:arith8,pos:58,val:-29,+cov rename to src/exchange/afl-tests/id:000352,src:000000,op:arith8,pos:58,val:-29,+cov diff --git a/src/mint/afl-tests/id:000353,src:000000,op:arith8,pos:53,val:+27,+cov b/src/exchange/afl-tests/id:000353,src:000000,op:arith8,pos:53,val:+27,+cov similarity index 100% rename from src/mint/afl-tests/id:000353,src:000000,op:arith8,pos:53,val:+27,+cov rename to src/exchange/afl-tests/id:000353,src:000000,op:arith8,pos:53,val:+27,+cov diff --git a/src/mint/afl-tests/id:000353,src:000000,op:arith8,pos:59,val:+10,+cov b/src/exchange/afl-tests/id:000353,src:000000,op:arith8,pos:59,val:+10,+cov similarity index 100% rename from src/mint/afl-tests/id:000353,src:000000,op:arith8,pos:59,val:+10,+cov rename to src/exchange/afl-tests/id:000353,src:000000,op:arith8,pos:59,val:+10,+cov diff --git a/src/mint/afl-tests/id:000354,src:000000,op:arith8,pos:53,val:-27,+cov b/src/exchange/afl-tests/id:000354,src:000000,op:arith8,pos:53,val:-27,+cov similarity index 100% rename from src/mint/afl-tests/id:000354,src:000000,op:arith8,pos:53,val:-27,+cov rename to src/exchange/afl-tests/id:000354,src:000000,op:arith8,pos:53,val:-27,+cov diff --git a/src/mint/afl-tests/id:000354,src:000000,op:arith8,pos:59,val:+23,+cov b/src/exchange/afl-tests/id:000354,src:000000,op:arith8,pos:59,val:+23,+cov similarity index 100% rename from src/mint/afl-tests/id:000354,src:000000,op:arith8,pos:59,val:+23,+cov rename to src/exchange/afl-tests/id:000354,src:000000,op:arith8,pos:59,val:+23,+cov diff --git a/src/mint/afl-tests/id:000355,src:000000,op:arith8,pos:53,val:-28,+cov b/src/exchange/afl-tests/id:000355,src:000000,op:arith8,pos:53,val:-28,+cov similarity index 100% rename from src/mint/afl-tests/id:000355,src:000000,op:arith8,pos:53,val:-28,+cov rename to src/exchange/afl-tests/id:000355,src:000000,op:arith8,pos:53,val:-28,+cov diff --git a/src/mint/afl-tests/id:000355,src:000000,op:arith8,pos:62,val:+9,+cov b/src/exchange/afl-tests/id:000355,src:000000,op:arith8,pos:62,val:+9,+cov similarity index 100% rename from src/mint/afl-tests/id:000355,src:000000,op:arith8,pos:62,val:+9,+cov rename to src/exchange/afl-tests/id:000355,src:000000,op:arith8,pos:62,val:+9,+cov diff --git a/src/mint/afl-tests/id:000356,src:000000,op:arith8,pos:55,val:-2,+cov b/src/exchange/afl-tests/id:000356,src:000000,op:arith8,pos:55,val:-2,+cov similarity index 100% rename from src/mint/afl-tests/id:000356,src:000000,op:arith8,pos:55,val:-2,+cov rename to src/exchange/afl-tests/id:000356,src:000000,op:arith8,pos:55,val:-2,+cov diff --git a/src/mint/afl-tests/id:000356,src:000000,op:arith8,pos:62,val:-21,+cov b/src/exchange/afl-tests/id:000356,src:000000,op:arith8,pos:62,val:-21,+cov similarity index 100% rename from src/mint/afl-tests/id:000356,src:000000,op:arith8,pos:62,val:-21,+cov rename to src/exchange/afl-tests/id:000356,src:000000,op:arith8,pos:62,val:-21,+cov diff --git a/src/mint/afl-tests/id:000357,src:000000,op:arith8,pos:55,val:-7 b/src/exchange/afl-tests/id:000357,src:000000,op:arith8,pos:55,val:-7 similarity index 100% rename from src/mint/afl-tests/id:000357,src:000000,op:arith8,pos:55,val:-7 rename to src/exchange/afl-tests/id:000357,src:000000,op:arith8,pos:55,val:-7 diff --git a/src/mint/afl-tests/id:000357,src:000000,op:arith8,pos:62,val:-23,+cov b/src/exchange/afl-tests/id:000357,src:000000,op:arith8,pos:62,val:-23,+cov similarity index 100% rename from src/mint/afl-tests/id:000357,src:000000,op:arith8,pos:62,val:-23,+cov rename to src/exchange/afl-tests/id:000357,src:000000,op:arith8,pos:62,val:-23,+cov diff --git a/src/mint/afl-tests/id:000358,src:000000,op:arith8,pos:55,val:-33,+cov b/src/exchange/afl-tests/id:000358,src:000000,op:arith8,pos:55,val:-33,+cov similarity index 100% rename from src/mint/afl-tests/id:000358,src:000000,op:arith8,pos:55,val:-33,+cov rename to src/exchange/afl-tests/id:000358,src:000000,op:arith8,pos:55,val:-33,+cov diff --git a/src/mint/afl-tests/id:000358,src:000000,op:arith8,pos:62,val:-35,+cov b/src/exchange/afl-tests/id:000358,src:000000,op:arith8,pos:62,val:-35,+cov similarity index 100% rename from src/mint/afl-tests/id:000358,src:000000,op:arith8,pos:62,val:-35,+cov rename to src/exchange/afl-tests/id:000358,src:000000,op:arith8,pos:62,val:-35,+cov diff --git a/src/mint/afl-tests/id:000359,src:000000,op:arith8,pos:56,val:-17,+cov b/src/exchange/afl-tests/id:000359,src:000000,op:arith8,pos:56,val:-17,+cov similarity index 100% rename from src/mint/afl-tests/id:000359,src:000000,op:arith8,pos:56,val:-17,+cov rename to src/exchange/afl-tests/id:000359,src:000000,op:arith8,pos:56,val:-17,+cov diff --git a/src/mint/afl-tests/id:000359,src:000000,op:arith8,pos:63,val:+3,+cov b/src/exchange/afl-tests/id:000359,src:000000,op:arith8,pos:63,val:+3,+cov similarity index 100% rename from src/mint/afl-tests/id:000359,src:000000,op:arith8,pos:63,val:+3,+cov rename to src/exchange/afl-tests/id:000359,src:000000,op:arith8,pos:63,val:+3,+cov diff --git a/src/mint/afl-tests/id:000360,src:000000,op:arith8,pos:56,val:+34,+cov b/src/exchange/afl-tests/id:000360,src:000000,op:arith8,pos:56,val:+34,+cov similarity index 100% rename from src/mint/afl-tests/id:000360,src:000000,op:arith8,pos:56,val:+34,+cov rename to src/exchange/afl-tests/id:000360,src:000000,op:arith8,pos:56,val:+34,+cov diff --git a/src/mint/afl-tests/id:000360,src:000000,op:arith8,pos:64,val:-5,+cov b/src/exchange/afl-tests/id:000360,src:000000,op:arith8,pos:64,val:-5,+cov similarity index 100% rename from src/mint/afl-tests/id:000360,src:000000,op:arith8,pos:64,val:-5,+cov rename to src/exchange/afl-tests/id:000360,src:000000,op:arith8,pos:64,val:-5,+cov diff --git a/src/mint/afl-tests/id:000361,src:000000,op:arith8,pos:57,val:-23,+cov b/src/exchange/afl-tests/id:000361,src:000000,op:arith8,pos:57,val:-23,+cov similarity index 100% rename from src/mint/afl-tests/id:000361,src:000000,op:arith8,pos:57,val:-23,+cov rename to src/exchange/afl-tests/id:000361,src:000000,op:arith8,pos:57,val:-23,+cov diff --git a/src/mint/afl-tests/id:000361,src:000000,op:arith8,pos:64,val:-26,+cov b/src/exchange/afl-tests/id:000361,src:000000,op:arith8,pos:64,val:-26,+cov similarity index 100% rename from src/mint/afl-tests/id:000361,src:000000,op:arith8,pos:64,val:-26,+cov rename to src/exchange/afl-tests/id:000361,src:000000,op:arith8,pos:64,val:-26,+cov diff --git a/src/mint/afl-tests/id:000362,src:000000,op:arith8,pos:58,val:+34,+cov b/src/exchange/afl-tests/id:000362,src:000000,op:arith8,pos:58,val:+34,+cov similarity index 100% rename from src/mint/afl-tests/id:000362,src:000000,op:arith8,pos:58,val:+34,+cov rename to src/exchange/afl-tests/id:000362,src:000000,op:arith8,pos:58,val:+34,+cov diff --git a/src/mint/afl-tests/id:000362,src:000000,op:arith8,pos:65,val:-10,+cov b/src/exchange/afl-tests/id:000362,src:000000,op:arith8,pos:65,val:-10,+cov similarity index 100% rename from src/mint/afl-tests/id:000362,src:000000,op:arith8,pos:65,val:-10,+cov rename to src/exchange/afl-tests/id:000362,src:000000,op:arith8,pos:65,val:-10,+cov diff --git a/src/mint/afl-tests/id:000363,src:000000,op:arith8,pos:60,val:-14,+cov b/src/exchange/afl-tests/id:000363,src:000000,op:arith8,pos:60,val:-14,+cov similarity index 100% rename from src/mint/afl-tests/id:000363,src:000000,op:arith8,pos:60,val:-14,+cov rename to src/exchange/afl-tests/id:000363,src:000000,op:arith8,pos:60,val:-14,+cov diff --git a/src/mint/afl-tests/id:000363,src:000000,op:arith8,pos:65,val:-27,+cov b/src/exchange/afl-tests/id:000363,src:000000,op:arith8,pos:65,val:-27,+cov similarity index 100% rename from src/mint/afl-tests/id:000363,src:000000,op:arith8,pos:65,val:-27,+cov rename to src/exchange/afl-tests/id:000363,src:000000,op:arith8,pos:65,val:-27,+cov diff --git a/src/mint/afl-tests/id:000364,src:000000,op:arith8,pos:60,val:-15,+cov b/src/exchange/afl-tests/id:000364,src:000000,op:arith8,pos:60,val:-15,+cov similarity index 100% rename from src/mint/afl-tests/id:000364,src:000000,op:arith8,pos:60,val:-15,+cov rename to src/exchange/afl-tests/id:000364,src:000000,op:arith8,pos:60,val:-15,+cov diff --git a/src/mint/afl-tests/id:000364,src:000000,op:arith8,pos:65,val:-30,+cov b/src/exchange/afl-tests/id:000364,src:000000,op:arith8,pos:65,val:-30,+cov similarity index 100% rename from src/mint/afl-tests/id:000364,src:000000,op:arith8,pos:65,val:-30,+cov rename to src/exchange/afl-tests/id:000364,src:000000,op:arith8,pos:65,val:-30,+cov diff --git a/src/mint/afl-tests/id:000365,src:000000,op:arith8,pos:60,val:-27,+cov b/src/exchange/afl-tests/id:000365,src:000000,op:arith8,pos:60,val:-27,+cov similarity index 100% rename from src/mint/afl-tests/id:000365,src:000000,op:arith8,pos:60,val:-27,+cov rename to src/exchange/afl-tests/id:000365,src:000000,op:arith8,pos:60,val:-27,+cov diff --git a/src/mint/afl-tests/id:000365,src:000000,op:arith8,pos:66,val:+13,+cov b/src/exchange/afl-tests/id:000365,src:000000,op:arith8,pos:66,val:+13,+cov similarity index 100% rename from src/mint/afl-tests/id:000365,src:000000,op:arith8,pos:66,val:+13,+cov rename to src/exchange/afl-tests/id:000365,src:000000,op:arith8,pos:66,val:+13,+cov diff --git a/src/mint/afl-tests/id:000366,src:000000,op:arith8,pos:62,val:+13,+cov b/src/exchange/afl-tests/id:000366,src:000000,op:arith8,pos:62,val:+13,+cov similarity index 100% rename from src/mint/afl-tests/id:000366,src:000000,op:arith8,pos:62,val:+13,+cov rename to src/exchange/afl-tests/id:000366,src:000000,op:arith8,pos:62,val:+13,+cov diff --git a/src/mint/afl-tests/id:000366,src:000000,op:arith8,pos:67,val:-9 b/src/exchange/afl-tests/id:000366,src:000000,op:arith8,pos:67,val:-9 similarity index 100% rename from src/mint/afl-tests/id:000366,src:000000,op:arith8,pos:67,val:-9 rename to src/exchange/afl-tests/id:000366,src:000000,op:arith8,pos:67,val:-9 diff --git a/src/mint/afl-tests/id:000367,src:000000,op:arith8,pos:62,val:-21,+cov b/src/exchange/afl-tests/id:000367,src:000000,op:arith8,pos:62,val:-21,+cov similarity index 100% rename from src/mint/afl-tests/id:000367,src:000000,op:arith8,pos:62,val:-21,+cov rename to src/exchange/afl-tests/id:000367,src:000000,op:arith8,pos:62,val:-21,+cov diff --git a/src/mint/afl-tests/id:000367,src:000000,op:arith8,pos:67,val:+15,+cov b/src/exchange/afl-tests/id:000367,src:000000,op:arith8,pos:67,val:+15,+cov similarity index 100% rename from src/mint/afl-tests/id:000367,src:000000,op:arith8,pos:67,val:+15,+cov rename to src/exchange/afl-tests/id:000367,src:000000,op:arith8,pos:67,val:+15,+cov diff --git a/src/mint/afl-tests/id:000368,src:000000,op:arith8,pos:62,val:-23,+cov b/src/exchange/afl-tests/id:000368,src:000000,op:arith8,pos:62,val:-23,+cov similarity index 100% rename from src/mint/afl-tests/id:000368,src:000000,op:arith8,pos:62,val:-23,+cov rename to src/exchange/afl-tests/id:000368,src:000000,op:arith8,pos:62,val:-23,+cov diff --git a/src/mint/afl-tests/id:000368,src:000000,op:arith8,pos:67,val:-35 b/src/exchange/afl-tests/id:000368,src:000000,op:arith8,pos:67,val:-35 similarity index 100% rename from src/mint/afl-tests/id:000368,src:000000,op:arith8,pos:67,val:-35 rename to src/exchange/afl-tests/id:000368,src:000000,op:arith8,pos:67,val:-35 diff --git a/src/mint/afl-tests/id:000369,src:000000,op:arith8,pos:63,val:+6,+cov b/src/exchange/afl-tests/id:000369,src:000000,op:arith8,pos:63,val:+6,+cov similarity index 100% rename from src/mint/afl-tests/id:000369,src:000000,op:arith8,pos:63,val:+6,+cov rename to src/exchange/afl-tests/id:000369,src:000000,op:arith8,pos:63,val:+6,+cov diff --git a/src/mint/afl-tests/id:000369,src:000000,op:arith8,pos:72,val:+30,+cov b/src/exchange/afl-tests/id:000369,src:000000,op:arith8,pos:72,val:+30,+cov similarity index 100% rename from src/mint/afl-tests/id:000369,src:000000,op:arith8,pos:72,val:+30,+cov rename to src/exchange/afl-tests/id:000369,src:000000,op:arith8,pos:72,val:+30,+cov diff --git a/src/mint/afl-tests/id:000370,src:000000,op:arith8,pos:63,val:-18,+cov b/src/exchange/afl-tests/id:000370,src:000000,op:arith8,pos:63,val:-18,+cov similarity index 100% rename from src/mint/afl-tests/id:000370,src:000000,op:arith8,pos:63,val:-18,+cov rename to src/exchange/afl-tests/id:000370,src:000000,op:arith8,pos:63,val:-18,+cov diff --git a/src/mint/afl-tests/id:000370,src:000000,op:arith8,pos:72,val:-35,+cov b/src/exchange/afl-tests/id:000370,src:000000,op:arith8,pos:72,val:-35,+cov similarity index 100% rename from src/mint/afl-tests/id:000370,src:000000,op:arith8,pos:72,val:-35,+cov rename to src/exchange/afl-tests/id:000370,src:000000,op:arith8,pos:72,val:-35,+cov diff --git a/src/mint/afl-tests/id:000371,src:000000,op:arith8,pos:63,val:-28,+cov b/src/exchange/afl-tests/id:000371,src:000000,op:arith8,pos:63,val:-28,+cov similarity index 100% rename from src/mint/afl-tests/id:000371,src:000000,op:arith8,pos:63,val:-28,+cov rename to src/exchange/afl-tests/id:000371,src:000000,op:arith8,pos:63,val:-28,+cov diff --git a/src/mint/afl-tests/id:000371,src:000000,op:arith8,pos:74,val:+5,+cov b/src/exchange/afl-tests/id:000371,src:000000,op:arith8,pos:74,val:+5,+cov similarity index 100% rename from src/mint/afl-tests/id:000371,src:000000,op:arith8,pos:74,val:+5,+cov rename to src/exchange/afl-tests/id:000371,src:000000,op:arith8,pos:74,val:+5,+cov diff --git a/src/mint/afl-tests/id:000372,src:000000,op:arith8,pos:64,val:-5,+cov b/src/exchange/afl-tests/id:000372,src:000000,op:arith8,pos:64,val:-5,+cov similarity index 100% rename from src/mint/afl-tests/id:000372,src:000000,op:arith8,pos:64,val:-5,+cov rename to src/exchange/afl-tests/id:000372,src:000000,op:arith8,pos:64,val:-5,+cov diff --git a/src/mint/afl-tests/id:000372,src:000000,op:arith8,pos:75,val:-23,+cov b/src/exchange/afl-tests/id:000372,src:000000,op:arith8,pos:75,val:-23,+cov similarity index 100% rename from src/mint/afl-tests/id:000372,src:000000,op:arith8,pos:75,val:-23,+cov rename to src/exchange/afl-tests/id:000372,src:000000,op:arith8,pos:75,val:-23,+cov diff --git a/src/mint/afl-tests/id:000373,src:000000,op:arith8,pos:64,val:-13,+cov b/src/exchange/afl-tests/id:000373,src:000000,op:arith8,pos:64,val:-13,+cov similarity index 100% rename from src/mint/afl-tests/id:000373,src:000000,op:arith8,pos:64,val:-13,+cov rename to src/exchange/afl-tests/id:000373,src:000000,op:arith8,pos:64,val:-13,+cov diff --git a/src/mint/afl-tests/id:000373,src:000000,op:arith8,pos:75,val:+28,+cov b/src/exchange/afl-tests/id:000373,src:000000,op:arith8,pos:75,val:+28,+cov similarity index 100% rename from src/mint/afl-tests/id:000373,src:000000,op:arith8,pos:75,val:+28,+cov rename to src/exchange/afl-tests/id:000373,src:000000,op:arith8,pos:75,val:+28,+cov diff --git a/src/mint/afl-tests/id:000374,src:000000,op:arith8,pos:64,val:-18,+cov b/src/exchange/afl-tests/id:000374,src:000000,op:arith8,pos:64,val:-18,+cov similarity index 100% rename from src/mint/afl-tests/id:000374,src:000000,op:arith8,pos:64,val:-18,+cov rename to src/exchange/afl-tests/id:000374,src:000000,op:arith8,pos:64,val:-18,+cov diff --git a/src/mint/afl-tests/id:000374,src:000000,op:arith8,pos:76,val:-5,+cov b/src/exchange/afl-tests/id:000374,src:000000,op:arith8,pos:76,val:-5,+cov similarity index 100% rename from src/mint/afl-tests/id:000374,src:000000,op:arith8,pos:76,val:-5,+cov rename to src/exchange/afl-tests/id:000374,src:000000,op:arith8,pos:76,val:-5,+cov diff --git a/src/mint/afl-tests/id:000375,src:000000,op:arith8,pos:64,val:-35,+cov b/src/exchange/afl-tests/id:000375,src:000000,op:arith8,pos:64,val:-35,+cov similarity index 100% rename from src/mint/afl-tests/id:000375,src:000000,op:arith8,pos:64,val:-35,+cov rename to src/exchange/afl-tests/id:000375,src:000000,op:arith8,pos:64,val:-35,+cov diff --git a/src/mint/afl-tests/id:000375,src:000000,op:arith8,pos:76,val:-20,+cov b/src/exchange/afl-tests/id:000375,src:000000,op:arith8,pos:76,val:-20,+cov similarity index 100% rename from src/mint/afl-tests/id:000375,src:000000,op:arith8,pos:76,val:-20,+cov rename to src/exchange/afl-tests/id:000375,src:000000,op:arith8,pos:76,val:-20,+cov diff --git a/src/mint/afl-tests/id:000376,src:000000,op:arith8,pos:65,val:-27,+cov b/src/exchange/afl-tests/id:000376,src:000000,op:arith8,pos:65,val:-27,+cov similarity index 100% rename from src/mint/afl-tests/id:000376,src:000000,op:arith8,pos:65,val:-27,+cov rename to src/exchange/afl-tests/id:000376,src:000000,op:arith8,pos:65,val:-27,+cov diff --git a/src/mint/afl-tests/id:000376,src:000000,op:arith8,pos:77,val:-5,+cov b/src/exchange/afl-tests/id:000376,src:000000,op:arith8,pos:77,val:-5,+cov similarity index 100% rename from src/mint/afl-tests/id:000376,src:000000,op:arith8,pos:77,val:-5,+cov rename to src/exchange/afl-tests/id:000376,src:000000,op:arith8,pos:77,val:-5,+cov diff --git a/src/mint/afl-tests/id:000377,src:000000,op:arith8,pos:65,val:+29,+cov b/src/exchange/afl-tests/id:000377,src:000000,op:arith8,pos:65,val:+29,+cov similarity index 100% rename from src/mint/afl-tests/id:000377,src:000000,op:arith8,pos:65,val:+29,+cov rename to src/exchange/afl-tests/id:000377,src:000000,op:arith8,pos:65,val:+29,+cov diff --git a/src/mint/afl-tests/id:000377,src:000000,op:arith8,pos:77,val:+25,+cov b/src/exchange/afl-tests/id:000377,src:000000,op:arith8,pos:77,val:+25,+cov similarity index 100% rename from src/mint/afl-tests/id:000377,src:000000,op:arith8,pos:77,val:+25,+cov rename to src/exchange/afl-tests/id:000377,src:000000,op:arith8,pos:77,val:+25,+cov diff --git a/src/mint/afl-tests/id:000378,src:000000,op:arith8,pos:66,val:-20,+cov b/src/exchange/afl-tests/id:000378,src:000000,op:arith8,pos:66,val:-20,+cov similarity index 100% rename from src/mint/afl-tests/id:000378,src:000000,op:arith8,pos:66,val:-20,+cov rename to src/exchange/afl-tests/id:000378,src:000000,op:arith8,pos:66,val:-20,+cov diff --git a/src/mint/afl-tests/id:000378,src:000000,op:arith8,pos:80,val:+20,+cov b/src/exchange/afl-tests/id:000378,src:000000,op:arith8,pos:80,val:+20,+cov similarity index 100% rename from src/mint/afl-tests/id:000378,src:000000,op:arith8,pos:80,val:+20,+cov rename to src/exchange/afl-tests/id:000378,src:000000,op:arith8,pos:80,val:+20,+cov diff --git a/src/mint/afl-tests/id:000379,src:000000,op:arith8,pos:66,val:+28,+cov b/src/exchange/afl-tests/id:000379,src:000000,op:arith8,pos:66,val:+28,+cov similarity index 100% rename from src/mint/afl-tests/id:000379,src:000000,op:arith8,pos:66,val:+28,+cov rename to src/exchange/afl-tests/id:000379,src:000000,op:arith8,pos:66,val:+28,+cov diff --git a/src/mint/afl-tests/id:000379,src:000000,op:arith8,pos:81,val:+20,+cov b/src/exchange/afl-tests/id:000379,src:000000,op:arith8,pos:81,val:+20,+cov similarity index 100% rename from src/mint/afl-tests/id:000379,src:000000,op:arith8,pos:81,val:+20,+cov rename to src/exchange/afl-tests/id:000379,src:000000,op:arith8,pos:81,val:+20,+cov diff --git a/src/mint/afl-tests/id:000380,src:000000,op:arith8,pos:66,val:-31,+cov b/src/exchange/afl-tests/id:000380,src:000000,op:arith8,pos:66,val:-31,+cov similarity index 100% rename from src/mint/afl-tests/id:000380,src:000000,op:arith8,pos:66,val:-31,+cov rename to src/exchange/afl-tests/id:000380,src:000000,op:arith8,pos:66,val:-31,+cov diff --git a/src/mint/afl-tests/id:000380,src:000000,op:arith8,pos:82,val:-5,+cov b/src/exchange/afl-tests/id:000380,src:000000,op:arith8,pos:82,val:-5,+cov similarity index 100% rename from src/mint/afl-tests/id:000380,src:000000,op:arith8,pos:82,val:-5,+cov rename to src/exchange/afl-tests/id:000380,src:000000,op:arith8,pos:82,val:-5,+cov diff --git a/src/mint/afl-tests/id:000381,src:000000,op:arith8,pos:67,val:-9 b/src/exchange/afl-tests/id:000381,src:000000,op:arith8,pos:67,val:-9 similarity index 100% rename from src/mint/afl-tests/id:000381,src:000000,op:arith8,pos:67,val:-9 rename to src/exchange/afl-tests/id:000381,src:000000,op:arith8,pos:67,val:-9 diff --git a/src/mint/afl-tests/id:000381,src:000000,op:arith8,pos:83,val:-18,+cov b/src/exchange/afl-tests/id:000381,src:000000,op:arith8,pos:83,val:-18,+cov similarity index 100% rename from src/mint/afl-tests/id:000381,src:000000,op:arith8,pos:83,val:-18,+cov rename to src/exchange/afl-tests/id:000381,src:000000,op:arith8,pos:83,val:-18,+cov diff --git a/src/mint/afl-tests/id:000382,src:000000,op:arith8,pos:67,val:+10,+cov b/src/exchange/afl-tests/id:000382,src:000000,op:arith8,pos:67,val:+10,+cov similarity index 100% rename from src/mint/afl-tests/id:000382,src:000000,op:arith8,pos:67,val:+10,+cov rename to src/exchange/afl-tests/id:000382,src:000000,op:arith8,pos:67,val:+10,+cov diff --git a/src/mint/afl-tests/id:000382,src:000000,op:arith8,pos:84,val:+10,+cov b/src/exchange/afl-tests/id:000382,src:000000,op:arith8,pos:84,val:+10,+cov similarity index 100% rename from src/mint/afl-tests/id:000382,src:000000,op:arith8,pos:84,val:+10,+cov rename to src/exchange/afl-tests/id:000382,src:000000,op:arith8,pos:84,val:+10,+cov diff --git a/src/mint/afl-tests/id:000383,src:000000,op:arith8,pos:67,val:-15,+cov b/src/exchange/afl-tests/id:000383,src:000000,op:arith8,pos:67,val:-15,+cov similarity index 100% rename from src/mint/afl-tests/id:000383,src:000000,op:arith8,pos:67,val:-15,+cov rename to src/exchange/afl-tests/id:000383,src:000000,op:arith8,pos:67,val:-15,+cov diff --git a/src/mint/afl-tests/id:000383,src:000000,op:arith8,pos:84,val:-30,+cov b/src/exchange/afl-tests/id:000383,src:000000,op:arith8,pos:84,val:-30,+cov similarity index 100% rename from src/mint/afl-tests/id:000383,src:000000,op:arith8,pos:84,val:-30,+cov rename to src/exchange/afl-tests/id:000383,src:000000,op:arith8,pos:84,val:-30,+cov diff --git a/src/mint/afl-tests/id:000384,src:000000,op:arith8,pos:67,val:-35 b/src/exchange/afl-tests/id:000384,src:000000,op:arith8,pos:67,val:-35 similarity index 100% rename from src/mint/afl-tests/id:000384,src:000000,op:arith8,pos:67,val:-35 rename to src/exchange/afl-tests/id:000384,src:000000,op:arith8,pos:67,val:-35 diff --git a/src/mint/afl-tests/id:000384,src:000000,op:arith8,pos:84,val:+34,+cov b/src/exchange/afl-tests/id:000384,src:000000,op:arith8,pos:84,val:+34,+cov similarity index 100% rename from src/mint/afl-tests/id:000384,src:000000,op:arith8,pos:84,val:+34,+cov rename to src/exchange/afl-tests/id:000384,src:000000,op:arith8,pos:84,val:+34,+cov diff --git a/src/mint/afl-tests/id:000385,src:000000,op:arith8,pos:68,val:+32,+cov b/src/exchange/afl-tests/id:000385,src:000000,op:arith8,pos:68,val:+32,+cov similarity index 100% rename from src/mint/afl-tests/id:000385,src:000000,op:arith8,pos:68,val:+32,+cov rename to src/exchange/afl-tests/id:000385,src:000000,op:arith8,pos:68,val:+32,+cov diff --git a/src/mint/afl-tests/id:000385,src:000000,op:arith8,pos:86,val:-9,+cov b/src/exchange/afl-tests/id:000385,src:000000,op:arith8,pos:86,val:-9,+cov similarity index 100% rename from src/mint/afl-tests/id:000385,src:000000,op:arith8,pos:86,val:-9,+cov rename to src/exchange/afl-tests/id:000385,src:000000,op:arith8,pos:86,val:-9,+cov diff --git a/src/mint/afl-tests/id:000386,src:000000,op:arith8,pos:69,val:+14,+cov b/src/exchange/afl-tests/id:000386,src:000000,op:arith8,pos:69,val:+14,+cov similarity index 100% rename from src/mint/afl-tests/id:000386,src:000000,op:arith8,pos:69,val:+14,+cov rename to src/exchange/afl-tests/id:000386,src:000000,op:arith8,pos:69,val:+14,+cov diff --git a/src/mint/afl-tests/id:000386,src:000000,op:arith8,pos:86,val:-19,+cov b/src/exchange/afl-tests/id:000386,src:000000,op:arith8,pos:86,val:-19,+cov similarity index 100% rename from src/mint/afl-tests/id:000386,src:000000,op:arith8,pos:86,val:-19,+cov rename to src/exchange/afl-tests/id:000386,src:000000,op:arith8,pos:86,val:-19,+cov diff --git a/src/mint/afl-tests/id:000387,src:000000,op:arith8,pos:70,val:-21,+cov b/src/exchange/afl-tests/id:000387,src:000000,op:arith8,pos:70,val:-21,+cov similarity index 100% rename from src/mint/afl-tests/id:000387,src:000000,op:arith8,pos:70,val:-21,+cov rename to src/exchange/afl-tests/id:000387,src:000000,op:arith8,pos:70,val:-21,+cov diff --git a/src/mint/afl-tests/id:000387,src:000000,op:arith8,pos:87,val:+10,+cov b/src/exchange/afl-tests/id:000387,src:000000,op:arith8,pos:87,val:+10,+cov similarity index 100% rename from src/mint/afl-tests/id:000387,src:000000,op:arith8,pos:87,val:+10,+cov rename to src/exchange/afl-tests/id:000387,src:000000,op:arith8,pos:87,val:+10,+cov diff --git a/src/mint/afl-tests/id:000388,src:000000,op:arith8,pos:71,val:+3 b/src/exchange/afl-tests/id:000388,src:000000,op:arith8,pos:71,val:+3 similarity index 100% rename from src/mint/afl-tests/id:000388,src:000000,op:arith8,pos:71,val:+3 rename to src/exchange/afl-tests/id:000388,src:000000,op:arith8,pos:71,val:+3 diff --git a/src/mint/afl-tests/id:000388,src:000000,op:arith8,pos:87,val:+15,+cov b/src/exchange/afl-tests/id:000388,src:000000,op:arith8,pos:87,val:+15,+cov similarity index 100% rename from src/mint/afl-tests/id:000388,src:000000,op:arith8,pos:87,val:+15,+cov rename to src/exchange/afl-tests/id:000388,src:000000,op:arith8,pos:87,val:+15,+cov diff --git a/src/mint/afl-tests/id:000389,src:000000,op:arith8,pos:72,val:-7,+cov b/src/exchange/afl-tests/id:000389,src:000000,op:arith8,pos:72,val:-7,+cov similarity index 100% rename from src/mint/afl-tests/id:000389,src:000000,op:arith8,pos:72,val:-7,+cov rename to src/exchange/afl-tests/id:000389,src:000000,op:arith8,pos:72,val:-7,+cov diff --git a/src/mint/afl-tests/id:000389,src:000000,op:arith8,pos:87,val:-26,+cov b/src/exchange/afl-tests/id:000389,src:000000,op:arith8,pos:87,val:-26,+cov similarity index 100% rename from src/mint/afl-tests/id:000389,src:000000,op:arith8,pos:87,val:-26,+cov rename to src/exchange/afl-tests/id:000389,src:000000,op:arith8,pos:87,val:-26,+cov diff --git a/src/mint/afl-tests/id:000390,src:000000,op:arith8,pos:72,val:+30,+cov b/src/exchange/afl-tests/id:000390,src:000000,op:arith8,pos:72,val:+30,+cov similarity index 100% rename from src/mint/afl-tests/id:000390,src:000000,op:arith8,pos:72,val:+30,+cov rename to src/exchange/afl-tests/id:000390,src:000000,op:arith8,pos:72,val:+30,+cov diff --git a/src/mint/afl-tests/id:000390,src:000000,op:arith8,pos:88,val:+9,+cov b/src/exchange/afl-tests/id:000390,src:000000,op:arith8,pos:88,val:+9,+cov similarity index 100% rename from src/mint/afl-tests/id:000390,src:000000,op:arith8,pos:88,val:+9,+cov rename to src/exchange/afl-tests/id:000390,src:000000,op:arith8,pos:88,val:+9,+cov diff --git a/src/mint/afl-tests/id:000391,src:000000,op:arith8,pos:73,val:-13,+cov b/src/exchange/afl-tests/id:000391,src:000000,op:arith8,pos:73,val:-13,+cov similarity index 100% rename from src/mint/afl-tests/id:000391,src:000000,op:arith8,pos:73,val:-13,+cov rename to src/exchange/afl-tests/id:000391,src:000000,op:arith8,pos:73,val:-13,+cov diff --git a/src/mint/afl-tests/id:000391,src:000000,op:arith8,pos:88,val:+25 b/src/exchange/afl-tests/id:000391,src:000000,op:arith8,pos:88,val:+25 similarity index 100% rename from src/mint/afl-tests/id:000391,src:000000,op:arith8,pos:88,val:+25 rename to src/exchange/afl-tests/id:000391,src:000000,op:arith8,pos:88,val:+25 diff --git a/src/mint/afl-tests/id:000392,src:000000,op:arith8,pos:73,val:-29,+cov b/src/exchange/afl-tests/id:000392,src:000000,op:arith8,pos:73,val:-29,+cov similarity index 100% rename from src/mint/afl-tests/id:000392,src:000000,op:arith8,pos:73,val:-29,+cov rename to src/exchange/afl-tests/id:000392,src:000000,op:arith8,pos:73,val:-29,+cov diff --git a/src/mint/afl-tests/id:000392,src:000000,op:arith8,pos:88,val:+26,+cov b/src/exchange/afl-tests/id:000392,src:000000,op:arith8,pos:88,val:+26,+cov similarity index 100% rename from src/mint/afl-tests/id:000392,src:000000,op:arith8,pos:88,val:+26,+cov rename to src/exchange/afl-tests/id:000392,src:000000,op:arith8,pos:88,val:+26,+cov diff --git a/src/mint/afl-tests/id:000393,src:000000,op:arith8,pos:73,val:-35,+cov b/src/exchange/afl-tests/id:000393,src:000000,op:arith8,pos:73,val:-35,+cov similarity index 100% rename from src/mint/afl-tests/id:000393,src:000000,op:arith8,pos:73,val:-35,+cov rename to src/exchange/afl-tests/id:000393,src:000000,op:arith8,pos:73,val:-35,+cov diff --git a/src/mint/afl-tests/id:000393,src:000000,op:arith8,pos:90,val:-33,+cov b/src/exchange/afl-tests/id:000393,src:000000,op:arith8,pos:90,val:-33,+cov similarity index 100% rename from src/mint/afl-tests/id:000393,src:000000,op:arith8,pos:90,val:-33,+cov rename to src/exchange/afl-tests/id:000393,src:000000,op:arith8,pos:90,val:-33,+cov diff --git a/src/mint/afl-tests/id:000394,src:000000,op:arith8,pos:75,val:-20,+cov b/src/exchange/afl-tests/id:000394,src:000000,op:arith8,pos:75,val:-20,+cov similarity index 100% rename from src/mint/afl-tests/id:000394,src:000000,op:arith8,pos:75,val:-20,+cov rename to src/exchange/afl-tests/id:000394,src:000000,op:arith8,pos:75,val:-20,+cov diff --git a/src/mint/afl-tests/id:000394,src:000000,op:arith8,pos:91,val:-14,+cov b/src/exchange/afl-tests/id:000394,src:000000,op:arith8,pos:91,val:-14,+cov similarity index 100% rename from src/mint/afl-tests/id:000394,src:000000,op:arith8,pos:91,val:-14,+cov rename to src/exchange/afl-tests/id:000394,src:000000,op:arith8,pos:91,val:-14,+cov diff --git a/src/mint/afl-tests/id:000395,src:000000,op:arith8,pos:76,val:+21,+cov b/src/exchange/afl-tests/id:000395,src:000000,op:arith8,pos:76,val:+21,+cov similarity index 100% rename from src/mint/afl-tests/id:000395,src:000000,op:arith8,pos:76,val:+21,+cov rename to src/exchange/afl-tests/id:000395,src:000000,op:arith8,pos:76,val:+21,+cov diff --git a/src/mint/afl-tests/id:000395,src:000000,op:arith8,pos:91,val:+24 b/src/exchange/afl-tests/id:000395,src:000000,op:arith8,pos:91,val:+24 similarity index 100% rename from src/mint/afl-tests/id:000395,src:000000,op:arith8,pos:91,val:+24 rename to src/exchange/afl-tests/id:000395,src:000000,op:arith8,pos:91,val:+24 diff --git a/src/mint/afl-tests/id:000396,src:000000,op:arith8,pos:77,val:+24,+cov b/src/exchange/afl-tests/id:000396,src:000000,op:arith8,pos:77,val:+24,+cov similarity index 100% rename from src/mint/afl-tests/id:000396,src:000000,op:arith8,pos:77,val:+24,+cov rename to src/exchange/afl-tests/id:000396,src:000000,op:arith8,pos:77,val:+24,+cov diff --git a/src/mint/afl-tests/id:000396,src:000000,op:arith8,pos:92,val:+11,+cov b/src/exchange/afl-tests/id:000396,src:000000,op:arith8,pos:92,val:+11,+cov similarity index 100% rename from src/mint/afl-tests/id:000396,src:000000,op:arith8,pos:92,val:+11,+cov rename to src/exchange/afl-tests/id:000396,src:000000,op:arith8,pos:92,val:+11,+cov diff --git a/src/mint/afl-tests/id:000397,src:000000,op:arith8,pos:80,val:-11,+cov b/src/exchange/afl-tests/id:000397,src:000000,op:arith8,pos:80,val:-11,+cov similarity index 100% rename from src/mint/afl-tests/id:000397,src:000000,op:arith8,pos:80,val:-11,+cov rename to src/exchange/afl-tests/id:000397,src:000000,op:arith8,pos:80,val:-11,+cov diff --git a/src/mint/afl-tests/id:000397,src:000000,op:arith8,pos:92,val:-23,+cov b/src/exchange/afl-tests/id:000397,src:000000,op:arith8,pos:92,val:-23,+cov similarity index 100% rename from src/mint/afl-tests/id:000397,src:000000,op:arith8,pos:92,val:-23,+cov rename to src/exchange/afl-tests/id:000397,src:000000,op:arith8,pos:92,val:-23,+cov diff --git a/src/mint/afl-tests/id:000398,src:000000,op:arith8,pos:80,val:+18,+cov b/src/exchange/afl-tests/id:000398,src:000000,op:arith8,pos:80,val:+18,+cov similarity index 100% rename from src/mint/afl-tests/id:000398,src:000000,op:arith8,pos:80,val:+18,+cov rename to src/exchange/afl-tests/id:000398,src:000000,op:arith8,pos:80,val:+18,+cov diff --git a/src/mint/afl-tests/id:000398,src:000000,op:arith8,pos:93,val:+19,+cov b/src/exchange/afl-tests/id:000398,src:000000,op:arith8,pos:93,val:+19,+cov similarity index 100% rename from src/mint/afl-tests/id:000398,src:000000,op:arith8,pos:93,val:+19,+cov rename to src/exchange/afl-tests/id:000398,src:000000,op:arith8,pos:93,val:+19,+cov diff --git a/src/mint/afl-tests/id:000399,src:000000,op:arith8,pos:81,val:+22,+cov b/src/exchange/afl-tests/id:000399,src:000000,op:arith8,pos:81,val:+22,+cov similarity index 100% rename from src/mint/afl-tests/id:000399,src:000000,op:arith8,pos:81,val:+22,+cov rename to src/exchange/afl-tests/id:000399,src:000000,op:arith8,pos:81,val:+22,+cov diff --git a/src/mint/afl-tests/id:000399,src:000000,op:arith8,pos:93,val:-25,+cov b/src/exchange/afl-tests/id:000399,src:000000,op:arith8,pos:93,val:-25,+cov similarity index 100% rename from src/mint/afl-tests/id:000399,src:000000,op:arith8,pos:93,val:-25,+cov rename to src/exchange/afl-tests/id:000399,src:000000,op:arith8,pos:93,val:-25,+cov diff --git a/src/mint/afl-tests/id:000400,src:000000,op:arith8,pos:81,val:-30,+cov b/src/exchange/afl-tests/id:000400,src:000000,op:arith8,pos:81,val:-30,+cov similarity index 100% rename from src/mint/afl-tests/id:000400,src:000000,op:arith8,pos:81,val:-30,+cov rename to src/exchange/afl-tests/id:000400,src:000000,op:arith8,pos:81,val:-30,+cov diff --git a/src/mint/afl-tests/id:000400,src:000000,op:arith8,pos:93,val:+35,+cov b/src/exchange/afl-tests/id:000400,src:000000,op:arith8,pos:93,val:+35,+cov similarity index 100% rename from src/mint/afl-tests/id:000400,src:000000,op:arith8,pos:93,val:+35,+cov rename to src/exchange/afl-tests/id:000400,src:000000,op:arith8,pos:93,val:+35,+cov diff --git a/src/mint/afl-tests/id:000401,src:000000,op:arith8,pos:83,val:-1 b/src/exchange/afl-tests/id:000401,src:000000,op:arith8,pos:83,val:-1 similarity index 100% rename from src/mint/afl-tests/id:000401,src:000000,op:arith8,pos:83,val:-1 rename to src/exchange/afl-tests/id:000401,src:000000,op:arith8,pos:83,val:-1 diff --git a/src/mint/afl-tests/id:000401,src:000000,op:arith8,pos:96,val:-5,+cov b/src/exchange/afl-tests/id:000401,src:000000,op:arith8,pos:96,val:-5,+cov similarity index 100% rename from src/mint/afl-tests/id:000401,src:000000,op:arith8,pos:96,val:-5,+cov rename to src/exchange/afl-tests/id:000401,src:000000,op:arith8,pos:96,val:-5,+cov diff --git a/src/mint/afl-tests/id:000402,src:000000,op:arith8,pos:83,val:-22,+cov b/src/exchange/afl-tests/id:000402,src:000000,op:arith8,pos:83,val:-22,+cov similarity index 100% rename from src/mint/afl-tests/id:000402,src:000000,op:arith8,pos:83,val:-22,+cov rename to src/exchange/afl-tests/id:000402,src:000000,op:arith8,pos:83,val:-22,+cov diff --git a/src/mint/afl-tests/id:000402,src:000000,op:arith8,pos:96,val:+32,+cov b/src/exchange/afl-tests/id:000402,src:000000,op:arith8,pos:96,val:+32,+cov similarity index 100% rename from src/mint/afl-tests/id:000402,src:000000,op:arith8,pos:96,val:+32,+cov rename to src/exchange/afl-tests/id:000402,src:000000,op:arith8,pos:96,val:+32,+cov diff --git a/src/mint/afl-tests/id:000403,src:000000,op:arith8,pos:83,val:+35,+cov b/src/exchange/afl-tests/id:000403,src:000000,op:arith8,pos:83,val:+35,+cov similarity index 100% rename from src/mint/afl-tests/id:000403,src:000000,op:arith8,pos:83,val:+35,+cov rename to src/exchange/afl-tests/id:000403,src:000000,op:arith8,pos:83,val:+35,+cov diff --git a/src/mint/afl-tests/id:000403,src:000000,op:arith8,pos:96,val:-34,+cov b/src/exchange/afl-tests/id:000403,src:000000,op:arith8,pos:96,val:-34,+cov similarity index 100% rename from src/mint/afl-tests/id:000403,src:000000,op:arith8,pos:96,val:-34,+cov rename to src/exchange/afl-tests/id:000403,src:000000,op:arith8,pos:96,val:-34,+cov diff --git a/src/mint/afl-tests/id:000404,src:000000,op:arith8,pos:84,val:+7,+cov b/src/exchange/afl-tests/id:000404,src:000000,op:arith8,pos:84,val:+7,+cov similarity index 100% rename from src/mint/afl-tests/id:000404,src:000000,op:arith8,pos:84,val:+7,+cov rename to src/exchange/afl-tests/id:000404,src:000000,op:arith8,pos:84,val:+7,+cov diff --git a/src/mint/afl-tests/id:000404,src:000000,op:arith8,pos:98,val:-34,+cov b/src/exchange/afl-tests/id:000404,src:000000,op:arith8,pos:98,val:-34,+cov similarity index 100% rename from src/mint/afl-tests/id:000404,src:000000,op:arith8,pos:98,val:-34,+cov rename to src/exchange/afl-tests/id:000404,src:000000,op:arith8,pos:98,val:-34,+cov diff --git a/src/mint/afl-tests/id:000405,src:000000,op:arith8,pos:84,val:+31,+cov b/src/exchange/afl-tests/id:000405,src:000000,op:arith8,pos:84,val:+31,+cov similarity index 100% rename from src/mint/afl-tests/id:000405,src:000000,op:arith8,pos:84,val:+31,+cov rename to src/exchange/afl-tests/id:000405,src:000000,op:arith8,pos:84,val:+31,+cov diff --git a/src/mint/afl-tests/id:000405,src:000000,op:arith8,pos:98,val:-35 b/src/exchange/afl-tests/id:000405,src:000000,op:arith8,pos:98,val:-35 similarity index 100% rename from src/mint/afl-tests/id:000405,src:000000,op:arith8,pos:98,val:-35 rename to src/exchange/afl-tests/id:000405,src:000000,op:arith8,pos:98,val:-35 diff --git a/src/mint/afl-tests/id:000406,src:000000,op:arith8,pos:113,val:-19 b/src/exchange/afl-tests/id:000406,src:000000,op:arith8,pos:113,val:-19 similarity index 100% rename from src/mint/afl-tests/id:000406,src:000000,op:arith8,pos:113,val:-19 rename to src/exchange/afl-tests/id:000406,src:000000,op:arith8,pos:113,val:-19 diff --git a/src/mint/afl-tests/id:000406,src:000000,op:arith8,pos:86,val:-11,+cov b/src/exchange/afl-tests/id:000406,src:000000,op:arith8,pos:86,val:-11,+cov similarity index 100% rename from src/mint/afl-tests/id:000406,src:000000,op:arith8,pos:86,val:-11,+cov rename to src/exchange/afl-tests/id:000406,src:000000,op:arith8,pos:86,val:-11,+cov diff --git a/src/mint/afl-tests/id:000407,src:000000,op:arith8,pos:113,val:-22 b/src/exchange/afl-tests/id:000407,src:000000,op:arith8,pos:113,val:-22 similarity index 100% rename from src/mint/afl-tests/id:000407,src:000000,op:arith8,pos:113,val:-22 rename to src/exchange/afl-tests/id:000407,src:000000,op:arith8,pos:113,val:-22 diff --git a/src/mint/afl-tests/id:000407,src:000000,op:arith8,pos:86,val:+22,+cov b/src/exchange/afl-tests/id:000407,src:000000,op:arith8,pos:86,val:+22,+cov similarity index 100% rename from src/mint/afl-tests/id:000407,src:000000,op:arith8,pos:86,val:+22,+cov rename to src/exchange/afl-tests/id:000407,src:000000,op:arith8,pos:86,val:+22,+cov diff --git a/src/mint/afl-tests/id:000408,src:000000,op:arith8,pos:121,val:-13,+cov b/src/exchange/afl-tests/id:000408,src:000000,op:arith8,pos:121,val:-13,+cov similarity index 100% rename from src/mint/afl-tests/id:000408,src:000000,op:arith8,pos:121,val:-13,+cov rename to src/exchange/afl-tests/id:000408,src:000000,op:arith8,pos:121,val:-13,+cov diff --git a/src/mint/afl-tests/id:000408,src:000000,op:arith8,pos:86,val:-24 b/src/exchange/afl-tests/id:000408,src:000000,op:arith8,pos:86,val:-24 similarity index 100% rename from src/mint/afl-tests/id:000408,src:000000,op:arith8,pos:86,val:-24 rename to src/exchange/afl-tests/id:000408,src:000000,op:arith8,pos:86,val:-24 diff --git a/src/mint/afl-tests/id:000409,src:000000,op:arith8,pos:135,val:+23,+cov b/src/exchange/afl-tests/id:000409,src:000000,op:arith8,pos:135,val:+23,+cov similarity index 100% rename from src/mint/afl-tests/id:000409,src:000000,op:arith8,pos:135,val:+23,+cov rename to src/exchange/afl-tests/id:000409,src:000000,op:arith8,pos:135,val:+23,+cov diff --git a/src/mint/afl-tests/id:000409,src:000000,op:arith8,pos:87,val:-2,+cov b/src/exchange/afl-tests/id:000409,src:000000,op:arith8,pos:87,val:-2,+cov similarity index 100% rename from src/mint/afl-tests/id:000409,src:000000,op:arith8,pos:87,val:-2,+cov rename to src/exchange/afl-tests/id:000409,src:000000,op:arith8,pos:87,val:-2,+cov diff --git a/src/mint/afl-tests/id:000410,src:000000,op:arith8,pos:136,val:-9,+cov b/src/exchange/afl-tests/id:000410,src:000000,op:arith8,pos:136,val:-9,+cov similarity index 100% rename from src/mint/afl-tests/id:000410,src:000000,op:arith8,pos:136,val:-9,+cov rename to src/exchange/afl-tests/id:000410,src:000000,op:arith8,pos:136,val:-9,+cov diff --git a/src/mint/afl-tests/id:000410,src:000000,op:arith8,pos:87,val:+9,+cov b/src/exchange/afl-tests/id:000410,src:000000,op:arith8,pos:87,val:+9,+cov similarity index 100% rename from src/mint/afl-tests/id:000410,src:000000,op:arith8,pos:87,val:+9,+cov rename to src/exchange/afl-tests/id:000410,src:000000,op:arith8,pos:87,val:+9,+cov diff --git a/src/mint/afl-tests/id:000411,src:000000,op:arith8,pos:136,val:-21,+cov b/src/exchange/afl-tests/id:000411,src:000000,op:arith8,pos:136,val:-21,+cov similarity index 100% rename from src/mint/afl-tests/id:000411,src:000000,op:arith8,pos:136,val:-21,+cov rename to src/exchange/afl-tests/id:000411,src:000000,op:arith8,pos:136,val:-21,+cov diff --git a/src/mint/afl-tests/id:000411,src:000000,op:arith8,pos:87,val:-15,+cov b/src/exchange/afl-tests/id:000411,src:000000,op:arith8,pos:87,val:-15,+cov similarity index 100% rename from src/mint/afl-tests/id:000411,src:000000,op:arith8,pos:87,val:-15,+cov rename to src/exchange/afl-tests/id:000411,src:000000,op:arith8,pos:87,val:-15,+cov diff --git a/src/mint/afl-tests/id:000412,src:000000,op:arith8,pos:137,val:+8,+cov b/src/exchange/afl-tests/id:000412,src:000000,op:arith8,pos:137,val:+8,+cov similarity index 100% rename from src/mint/afl-tests/id:000412,src:000000,op:arith8,pos:137,val:+8,+cov rename to src/exchange/afl-tests/id:000412,src:000000,op:arith8,pos:137,val:+8,+cov diff --git a/src/mint/afl-tests/id:000412,src:000000,op:arith8,pos:87,val:-24,+cov b/src/exchange/afl-tests/id:000412,src:000000,op:arith8,pos:87,val:-24,+cov similarity index 100% rename from src/mint/afl-tests/id:000412,src:000000,op:arith8,pos:87,val:-24,+cov rename to src/exchange/afl-tests/id:000412,src:000000,op:arith8,pos:87,val:-24,+cov diff --git a/src/mint/afl-tests/id:000413,src:000000,op:arith8,pos:137,val:-11 b/src/exchange/afl-tests/id:000413,src:000000,op:arith8,pos:137,val:-11 similarity index 100% rename from src/mint/afl-tests/id:000413,src:000000,op:arith8,pos:137,val:-11 rename to src/exchange/afl-tests/id:000413,src:000000,op:arith8,pos:137,val:-11 diff --git a/src/mint/afl-tests/id:000413,src:000000,op:arith8,pos:88,val:+30,+cov b/src/exchange/afl-tests/id:000413,src:000000,op:arith8,pos:88,val:+30,+cov similarity index 100% rename from src/mint/afl-tests/id:000413,src:000000,op:arith8,pos:88,val:+30,+cov rename to src/exchange/afl-tests/id:000413,src:000000,op:arith8,pos:88,val:+30,+cov diff --git a/src/mint/afl-tests/id:000414,src:000000,op:arith8,pos:137,val:-19,+cov b/src/exchange/afl-tests/id:000414,src:000000,op:arith8,pos:137,val:-19,+cov similarity index 100% rename from src/mint/afl-tests/id:000414,src:000000,op:arith8,pos:137,val:-19,+cov rename to src/exchange/afl-tests/id:000414,src:000000,op:arith8,pos:137,val:-19,+cov diff --git a/src/mint/afl-tests/id:000414,src:000000,op:arith8,pos:89,val:+29,+cov b/src/exchange/afl-tests/id:000414,src:000000,op:arith8,pos:89,val:+29,+cov similarity index 100% rename from src/mint/afl-tests/id:000414,src:000000,op:arith8,pos:89,val:+29,+cov rename to src/exchange/afl-tests/id:000414,src:000000,op:arith8,pos:89,val:+29,+cov diff --git a/src/mint/afl-tests/id:000415,src:000000,op:arith8,pos:138,val:+3,+cov b/src/exchange/afl-tests/id:000415,src:000000,op:arith8,pos:138,val:+3,+cov similarity index 100% rename from src/mint/afl-tests/id:000415,src:000000,op:arith8,pos:138,val:+3,+cov rename to src/exchange/afl-tests/id:000415,src:000000,op:arith8,pos:138,val:+3,+cov diff --git a/src/mint/afl-tests/id:000415,src:000000,op:arith8,pos:90,val:-21,+cov b/src/exchange/afl-tests/id:000415,src:000000,op:arith8,pos:90,val:-21,+cov similarity index 100% rename from src/mint/afl-tests/id:000415,src:000000,op:arith8,pos:90,val:-21,+cov rename to src/exchange/afl-tests/id:000415,src:000000,op:arith8,pos:90,val:-21,+cov diff --git a/src/mint/afl-tests/id:000416,src:000000,op:arith8,pos:138,val:-12,+cov b/src/exchange/afl-tests/id:000416,src:000000,op:arith8,pos:138,val:-12,+cov similarity index 100% rename from src/mint/afl-tests/id:000416,src:000000,op:arith8,pos:138,val:-12,+cov rename to src/exchange/afl-tests/id:000416,src:000000,op:arith8,pos:138,val:-12,+cov diff --git a/src/mint/afl-tests/id:000416,src:000000,op:arith8,pos:91,val:+28,+cov b/src/exchange/afl-tests/id:000416,src:000000,op:arith8,pos:91,val:+28,+cov similarity index 100% rename from src/mint/afl-tests/id:000416,src:000000,op:arith8,pos:91,val:+28,+cov rename to src/exchange/afl-tests/id:000416,src:000000,op:arith8,pos:91,val:+28,+cov diff --git a/src/mint/afl-tests/id:000417,src:000000,op:arith8,pos:139,val:-10,+cov b/src/exchange/afl-tests/id:000417,src:000000,op:arith8,pos:139,val:-10,+cov similarity index 100% rename from src/mint/afl-tests/id:000417,src:000000,op:arith8,pos:139,val:-10,+cov rename to src/exchange/afl-tests/id:000417,src:000000,op:arith8,pos:139,val:-10,+cov diff --git a/src/mint/afl-tests/id:000417,src:000000,op:arith8,pos:91,val:+34,+cov b/src/exchange/afl-tests/id:000417,src:000000,op:arith8,pos:91,val:+34,+cov similarity index 100% rename from src/mint/afl-tests/id:000417,src:000000,op:arith8,pos:91,val:+34,+cov rename to src/exchange/afl-tests/id:000417,src:000000,op:arith8,pos:91,val:+34,+cov diff --git a/src/mint/afl-tests/id:000418,src:000000,op:arith8,pos:139,val:-26,+cov b/src/exchange/afl-tests/id:000418,src:000000,op:arith8,pos:139,val:-26,+cov similarity index 100% rename from src/mint/afl-tests/id:000418,src:000000,op:arith8,pos:139,val:-26,+cov rename to src/exchange/afl-tests/id:000418,src:000000,op:arith8,pos:139,val:-26,+cov diff --git a/src/mint/afl-tests/id:000418,src:000000,op:arith8,pos:94,val:-23,+cov b/src/exchange/afl-tests/id:000418,src:000000,op:arith8,pos:94,val:-23,+cov similarity index 100% rename from src/mint/afl-tests/id:000418,src:000000,op:arith8,pos:94,val:-23,+cov rename to src/exchange/afl-tests/id:000418,src:000000,op:arith8,pos:94,val:-23,+cov diff --git a/src/mint/afl-tests/id:000419,src:000000,op:arith8,pos:143,val:+21,+cov b/src/exchange/afl-tests/id:000419,src:000000,op:arith8,pos:143,val:+21,+cov similarity index 100% rename from src/mint/afl-tests/id:000419,src:000000,op:arith8,pos:143,val:+21,+cov rename to src/exchange/afl-tests/id:000419,src:000000,op:arith8,pos:143,val:+21,+cov diff --git a/src/mint/afl-tests/id:000419,src:000000,op:arith8,pos:95,val:+3,+cov b/src/exchange/afl-tests/id:000419,src:000000,op:arith8,pos:95,val:+3,+cov similarity index 100% rename from src/mint/afl-tests/id:000419,src:000000,op:arith8,pos:95,val:+3,+cov rename to src/exchange/afl-tests/id:000419,src:000000,op:arith8,pos:95,val:+3,+cov diff --git a/src/mint/afl-tests/id:000420,src:000000,op:arith8,pos:145,val:+15,+cov b/src/exchange/afl-tests/id:000420,src:000000,op:arith8,pos:145,val:+15,+cov similarity index 100% rename from src/mint/afl-tests/id:000420,src:000000,op:arith8,pos:145,val:+15,+cov rename to src/exchange/afl-tests/id:000420,src:000000,op:arith8,pos:145,val:+15,+cov diff --git a/src/mint/afl-tests/id:000420,src:000000,op:arith8,pos:95,val:-23,+cov b/src/exchange/afl-tests/id:000420,src:000000,op:arith8,pos:95,val:-23,+cov similarity index 100% rename from src/mint/afl-tests/id:000420,src:000000,op:arith8,pos:95,val:-23,+cov rename to src/exchange/afl-tests/id:000420,src:000000,op:arith8,pos:95,val:-23,+cov diff --git a/src/mint/afl-tests/id:000421,src:000000,op:arith8,pos:146,val:-14,+cov b/src/exchange/afl-tests/id:000421,src:000000,op:arith8,pos:146,val:-14,+cov similarity index 100% rename from src/mint/afl-tests/id:000421,src:000000,op:arith8,pos:146,val:-14,+cov rename to src/exchange/afl-tests/id:000421,src:000000,op:arith8,pos:146,val:-14,+cov diff --git a/src/mint/afl-tests/id:000421,src:000000,op:arith8,pos:95,val:+31,+cov b/src/exchange/afl-tests/id:000421,src:000000,op:arith8,pos:95,val:+31,+cov similarity index 100% rename from src/mint/afl-tests/id:000421,src:000000,op:arith8,pos:95,val:+31,+cov rename to src/exchange/afl-tests/id:000421,src:000000,op:arith8,pos:95,val:+31,+cov diff --git a/src/mint/afl-tests/id:000422,src:000000,op:arith8,pos:148,val:+28,+cov b/src/exchange/afl-tests/id:000422,src:000000,op:arith8,pos:148,val:+28,+cov similarity index 100% rename from src/mint/afl-tests/id:000422,src:000000,op:arith8,pos:148,val:+28,+cov rename to src/exchange/afl-tests/id:000422,src:000000,op:arith8,pos:148,val:+28,+cov diff --git a/src/mint/afl-tests/id:000422,src:000000,op:arith8,pos:98,val:-35 b/src/exchange/afl-tests/id:000422,src:000000,op:arith8,pos:98,val:-35 similarity index 100% rename from src/mint/afl-tests/id:000422,src:000000,op:arith8,pos:98,val:-35 rename to src/exchange/afl-tests/id:000422,src:000000,op:arith8,pos:98,val:-35 diff --git a/src/mint/afl-tests/id:000423,src:000000,op:arith8,pos:100,val:-33,+cov b/src/exchange/afl-tests/id:000423,src:000000,op:arith8,pos:100,val:-33,+cov similarity index 100% rename from src/mint/afl-tests/id:000423,src:000000,op:arith8,pos:100,val:-33,+cov rename to src/exchange/afl-tests/id:000423,src:000000,op:arith8,pos:100,val:-33,+cov diff --git a/src/mint/afl-tests/id:000423,src:000000,op:arith8,pos:151,val:-35,+cov b/src/exchange/afl-tests/id:000423,src:000000,op:arith8,pos:151,val:-35,+cov similarity index 100% rename from src/mint/afl-tests/id:000423,src:000000,op:arith8,pos:151,val:-35,+cov rename to src/exchange/afl-tests/id:000423,src:000000,op:arith8,pos:151,val:-35,+cov diff --git a/src/mint/afl-tests/id:000424,src:000000,op:arith8,pos:113,val:-19 b/src/exchange/afl-tests/id:000424,src:000000,op:arith8,pos:113,val:-19 similarity index 100% rename from src/mint/afl-tests/id:000424,src:000000,op:arith8,pos:113,val:-19 rename to src/exchange/afl-tests/id:000424,src:000000,op:arith8,pos:113,val:-19 diff --git a/src/mint/afl-tests/id:000424,src:000000,op:arith8,pos:152,val:-12,+cov b/src/exchange/afl-tests/id:000424,src:000000,op:arith8,pos:152,val:-12,+cov similarity index 100% rename from src/mint/afl-tests/id:000424,src:000000,op:arith8,pos:152,val:-12,+cov rename to src/exchange/afl-tests/id:000424,src:000000,op:arith8,pos:152,val:-12,+cov diff --git a/src/mint/afl-tests/id:000425,src:000000,op:arith8,pos:113,val:-22 b/src/exchange/afl-tests/id:000425,src:000000,op:arith8,pos:113,val:-22 similarity index 100% rename from src/mint/afl-tests/id:000425,src:000000,op:arith8,pos:113,val:-22 rename to src/exchange/afl-tests/id:000425,src:000000,op:arith8,pos:113,val:-22 diff --git a/src/mint/afl-tests/id:000425,src:000000,op:arith8,pos:152,val:+27,+cov b/src/exchange/afl-tests/id:000425,src:000000,op:arith8,pos:152,val:+27,+cov similarity index 100% rename from src/mint/afl-tests/id:000425,src:000000,op:arith8,pos:152,val:+27,+cov rename to src/exchange/afl-tests/id:000425,src:000000,op:arith8,pos:152,val:+27,+cov diff --git a/src/mint/afl-tests/id:000426,src:000000,op:arith8,pos:127,val:-20,+cov b/src/exchange/afl-tests/id:000426,src:000000,op:arith8,pos:127,val:-20,+cov similarity index 100% rename from src/mint/afl-tests/id:000426,src:000000,op:arith8,pos:127,val:-20,+cov rename to src/exchange/afl-tests/id:000426,src:000000,op:arith8,pos:127,val:-20,+cov diff --git a/src/mint/afl-tests/id:000426,src:000000,op:arith8,pos:152,val:+31,+cov b/src/exchange/afl-tests/id:000426,src:000000,op:arith8,pos:152,val:+31,+cov similarity index 100% rename from src/mint/afl-tests/id:000426,src:000000,op:arith8,pos:152,val:+31,+cov rename to src/exchange/afl-tests/id:000426,src:000000,op:arith8,pos:152,val:+31,+cov diff --git a/src/mint/afl-tests/id:000427,src:000000,op:arith8,pos:131,val:-20,+cov b/src/exchange/afl-tests/id:000427,src:000000,op:arith8,pos:131,val:-20,+cov similarity index 100% rename from src/mint/afl-tests/id:000427,src:000000,op:arith8,pos:131,val:-20,+cov rename to src/exchange/afl-tests/id:000427,src:000000,op:arith8,pos:131,val:-20,+cov diff --git a/src/mint/afl-tests/id:000427,src:000000,op:arith8,pos:153,val:+20,+cov b/src/exchange/afl-tests/id:000427,src:000000,op:arith8,pos:153,val:+20,+cov similarity index 100% rename from src/mint/afl-tests/id:000427,src:000000,op:arith8,pos:153,val:+20,+cov rename to src/exchange/afl-tests/id:000427,src:000000,op:arith8,pos:153,val:+20,+cov diff --git a/src/mint/afl-tests/id:000428,src:000000,op:arith8,pos:132,val:+6,+cov b/src/exchange/afl-tests/id:000428,src:000000,op:arith8,pos:132,val:+6,+cov similarity index 100% rename from src/mint/afl-tests/id:000428,src:000000,op:arith8,pos:132,val:+6,+cov rename to src/exchange/afl-tests/id:000428,src:000000,op:arith8,pos:132,val:+6,+cov diff --git a/src/mint/afl-tests/id:000428,src:000000,op:arith8,pos:154,val:+7,+cov b/src/exchange/afl-tests/id:000428,src:000000,op:arith8,pos:154,val:+7,+cov similarity index 100% rename from src/mint/afl-tests/id:000428,src:000000,op:arith8,pos:154,val:+7,+cov rename to src/exchange/afl-tests/id:000428,src:000000,op:arith8,pos:154,val:+7,+cov diff --git a/src/mint/afl-tests/id:000429,src:000000,op:arith8,pos:135,val:-28,+cov b/src/exchange/afl-tests/id:000429,src:000000,op:arith8,pos:135,val:-28,+cov similarity index 100% rename from src/mint/afl-tests/id:000429,src:000000,op:arith8,pos:135,val:-28,+cov rename to src/exchange/afl-tests/id:000429,src:000000,op:arith8,pos:135,val:-28,+cov diff --git a/src/mint/afl-tests/id:000429,src:000000,op:arith8,pos:156,val:+18,+cov b/src/exchange/afl-tests/id:000429,src:000000,op:arith8,pos:156,val:+18,+cov similarity index 100% rename from src/mint/afl-tests/id:000429,src:000000,op:arith8,pos:156,val:+18,+cov rename to src/exchange/afl-tests/id:000429,src:000000,op:arith8,pos:156,val:+18,+cov diff --git a/src/mint/afl-tests/id:000430,src:000000,op:arith8,pos:135,val:-35,+cov b/src/exchange/afl-tests/id:000430,src:000000,op:arith8,pos:135,val:-35,+cov similarity index 100% rename from src/mint/afl-tests/id:000430,src:000000,op:arith8,pos:135,val:-35,+cov rename to src/exchange/afl-tests/id:000430,src:000000,op:arith8,pos:135,val:-35,+cov diff --git a/src/mint/afl-tests/id:000430,src:000000,op:arith8,pos:156,val:+28,+cov b/src/exchange/afl-tests/id:000430,src:000000,op:arith8,pos:156,val:+28,+cov similarity index 100% rename from src/mint/afl-tests/id:000430,src:000000,op:arith8,pos:156,val:+28,+cov rename to src/exchange/afl-tests/id:000430,src:000000,op:arith8,pos:156,val:+28,+cov diff --git a/src/mint/afl-tests/id:000431,src:000000,op:arith8,pos:136,val:+3,+cov b/src/exchange/afl-tests/id:000431,src:000000,op:arith8,pos:136,val:+3,+cov similarity index 100% rename from src/mint/afl-tests/id:000431,src:000000,op:arith8,pos:136,val:+3,+cov rename to src/exchange/afl-tests/id:000431,src:000000,op:arith8,pos:136,val:+3,+cov diff --git a/src/mint/afl-tests/id:000431,src:000000,op:arith8,pos:159,val:-30,+cov b/src/exchange/afl-tests/id:000431,src:000000,op:arith8,pos:159,val:-30,+cov similarity index 100% rename from src/mint/afl-tests/id:000431,src:000000,op:arith8,pos:159,val:-30,+cov rename to src/exchange/afl-tests/id:000431,src:000000,op:arith8,pos:159,val:-30,+cov diff --git a/src/mint/afl-tests/id:000432,src:000000,op:arith8,pos:136,val:-5,+cov b/src/exchange/afl-tests/id:000432,src:000000,op:arith8,pos:136,val:-5,+cov similarity index 100% rename from src/mint/afl-tests/id:000432,src:000000,op:arith8,pos:136,val:-5,+cov rename to src/exchange/afl-tests/id:000432,src:000000,op:arith8,pos:136,val:-5,+cov diff --git a/src/mint/afl-tests/id:000432,src:000000,op:arith8,pos:160,val:-31,+cov b/src/exchange/afl-tests/id:000432,src:000000,op:arith8,pos:160,val:-31,+cov similarity index 100% rename from src/mint/afl-tests/id:000432,src:000000,op:arith8,pos:160,val:-31,+cov rename to src/exchange/afl-tests/id:000432,src:000000,op:arith8,pos:160,val:-31,+cov diff --git a/src/mint/afl-tests/id:000433,src:000000,op:arith8,pos:136,val:-9,+cov b/src/exchange/afl-tests/id:000433,src:000000,op:arith8,pos:136,val:-9,+cov similarity index 100% rename from src/mint/afl-tests/id:000433,src:000000,op:arith8,pos:136,val:-9,+cov rename to src/exchange/afl-tests/id:000433,src:000000,op:arith8,pos:136,val:-9,+cov diff --git a/src/mint/afl-tests/id:000433,src:000000,op:arith8,pos:161,val:+5,+cov b/src/exchange/afl-tests/id:000433,src:000000,op:arith8,pos:161,val:+5,+cov similarity index 100% rename from src/mint/afl-tests/id:000433,src:000000,op:arith8,pos:161,val:+5,+cov rename to src/exchange/afl-tests/id:000433,src:000000,op:arith8,pos:161,val:+5,+cov diff --git a/src/mint/afl-tests/id:000434,src:000000,op:arith8,pos:136,val:+20,+cov b/src/exchange/afl-tests/id:000434,src:000000,op:arith8,pos:136,val:+20,+cov similarity index 100% rename from src/mint/afl-tests/id:000434,src:000000,op:arith8,pos:136,val:+20,+cov rename to src/exchange/afl-tests/id:000434,src:000000,op:arith8,pos:136,val:+20,+cov diff --git a/src/mint/afl-tests/id:000434,src:000000,op:arith8,pos:161,val:-11,+cov b/src/exchange/afl-tests/id:000434,src:000000,op:arith8,pos:161,val:-11,+cov similarity index 100% rename from src/mint/afl-tests/id:000434,src:000000,op:arith8,pos:161,val:-11,+cov rename to src/exchange/afl-tests/id:000434,src:000000,op:arith8,pos:161,val:-11,+cov diff --git a/src/mint/afl-tests/id:000435,src:000000,op:arith8,pos:136,val:-29,+cov b/src/exchange/afl-tests/id:000435,src:000000,op:arith8,pos:136,val:-29,+cov similarity index 100% rename from src/mint/afl-tests/id:000435,src:000000,op:arith8,pos:136,val:-29,+cov rename to src/exchange/afl-tests/id:000435,src:000000,op:arith8,pos:136,val:-29,+cov diff --git a/src/mint/afl-tests/id:000435,src:000000,op:arith8,pos:162,val:+22 b/src/exchange/afl-tests/id:000435,src:000000,op:arith8,pos:162,val:+22 similarity index 100% rename from src/mint/afl-tests/id:000435,src:000000,op:arith8,pos:162,val:+22 rename to src/exchange/afl-tests/id:000435,src:000000,op:arith8,pos:162,val:+22 diff --git a/src/mint/afl-tests/id:000436,src:000000,op:arith8,pos:137,val:+7,+cov b/src/exchange/afl-tests/id:000436,src:000000,op:arith8,pos:137,val:+7,+cov similarity index 100% rename from src/mint/afl-tests/id:000436,src:000000,op:arith8,pos:137,val:+7,+cov rename to src/exchange/afl-tests/id:000436,src:000000,op:arith8,pos:137,val:+7,+cov diff --git a/src/mint/afl-tests/id:000436,src:000000,op:arith8,pos:163,val:+19,+cov b/src/exchange/afl-tests/id:000436,src:000000,op:arith8,pos:163,val:+19,+cov similarity index 100% rename from src/mint/afl-tests/id:000436,src:000000,op:arith8,pos:163,val:+19,+cov rename to src/exchange/afl-tests/id:000436,src:000000,op:arith8,pos:163,val:+19,+cov diff --git a/src/mint/afl-tests/id:000437,src:000000,op:arith8,pos:137,val:+10,+cov b/src/exchange/afl-tests/id:000437,src:000000,op:arith8,pos:137,val:+10,+cov similarity index 100% rename from src/mint/afl-tests/id:000437,src:000000,op:arith8,pos:137,val:+10,+cov rename to src/exchange/afl-tests/id:000437,src:000000,op:arith8,pos:137,val:+10,+cov diff --git a/src/mint/afl-tests/id:000437,src:000000,op:arith8,pos:164,val:+27,+cov b/src/exchange/afl-tests/id:000437,src:000000,op:arith8,pos:164,val:+27,+cov similarity index 100% rename from src/mint/afl-tests/id:000437,src:000000,op:arith8,pos:164,val:+27,+cov rename to src/exchange/afl-tests/id:000437,src:000000,op:arith8,pos:164,val:+27,+cov diff --git a/src/mint/afl-tests/id:000438,src:000000,op:arith8,pos:138,val:+19,+cov b/src/exchange/afl-tests/id:000438,src:000000,op:arith8,pos:138,val:+19,+cov similarity index 100% rename from src/mint/afl-tests/id:000438,src:000000,op:arith8,pos:138,val:+19,+cov rename to src/exchange/afl-tests/id:000438,src:000000,op:arith8,pos:138,val:+19,+cov diff --git a/src/mint/afl-tests/id:000438,src:000000,op:arith8,pos:166,val:+13,+cov b/src/exchange/afl-tests/id:000438,src:000000,op:arith8,pos:166,val:+13,+cov similarity index 100% rename from src/mint/afl-tests/id:000438,src:000000,op:arith8,pos:166,val:+13,+cov rename to src/exchange/afl-tests/id:000438,src:000000,op:arith8,pos:166,val:+13,+cov diff --git a/src/mint/afl-tests/id:000439,src:000000,op:arith8,pos:139,val:+25,+cov b/src/exchange/afl-tests/id:000439,src:000000,op:arith8,pos:139,val:+25,+cov similarity index 100% rename from src/mint/afl-tests/id:000439,src:000000,op:arith8,pos:139,val:+25,+cov rename to src/exchange/afl-tests/id:000439,src:000000,op:arith8,pos:139,val:+25,+cov diff --git a/src/mint/afl-tests/id:000439,src:000000,op:arith8,pos:167,val:+33,+cov b/src/exchange/afl-tests/id:000439,src:000000,op:arith8,pos:167,val:+33,+cov similarity index 100% rename from src/mint/afl-tests/id:000439,src:000000,op:arith8,pos:167,val:+33,+cov rename to src/exchange/afl-tests/id:000439,src:000000,op:arith8,pos:167,val:+33,+cov diff --git a/src/mint/afl-tests/id:000440,src:000000,op:arith8,pos:139,val:-26,+cov b/src/exchange/afl-tests/id:000440,src:000000,op:arith8,pos:139,val:-26,+cov similarity index 100% rename from src/mint/afl-tests/id:000440,src:000000,op:arith8,pos:139,val:-26,+cov rename to src/exchange/afl-tests/id:000440,src:000000,op:arith8,pos:139,val:-26,+cov diff --git a/src/mint/afl-tests/id:000440,src:000000,op:arith8,pos:168,val:-17,+cov b/src/exchange/afl-tests/id:000440,src:000000,op:arith8,pos:168,val:-17,+cov similarity index 100% rename from src/mint/afl-tests/id:000440,src:000000,op:arith8,pos:168,val:-17,+cov rename to src/exchange/afl-tests/id:000440,src:000000,op:arith8,pos:168,val:-17,+cov diff --git a/src/mint/afl-tests/id:000441,src:000000,op:arith8,pos:140,val:+20,+cov b/src/exchange/afl-tests/id:000441,src:000000,op:arith8,pos:140,val:+20,+cov similarity index 100% rename from src/mint/afl-tests/id:000441,src:000000,op:arith8,pos:140,val:+20,+cov rename to src/exchange/afl-tests/id:000441,src:000000,op:arith8,pos:140,val:+20,+cov diff --git a/src/mint/afl-tests/id:000441,src:000000,op:arith8,pos:168,val:+29,+cov b/src/exchange/afl-tests/id:000441,src:000000,op:arith8,pos:168,val:+29,+cov similarity index 100% rename from src/mint/afl-tests/id:000441,src:000000,op:arith8,pos:168,val:+29,+cov rename to src/exchange/afl-tests/id:000441,src:000000,op:arith8,pos:168,val:+29,+cov diff --git a/src/mint/afl-tests/id:000442,src:000000,op:arith8,pos:141,val:+6,+cov b/src/exchange/afl-tests/id:000442,src:000000,op:arith8,pos:141,val:+6,+cov similarity index 100% rename from src/mint/afl-tests/id:000442,src:000000,op:arith8,pos:141,val:+6,+cov rename to src/exchange/afl-tests/id:000442,src:000000,op:arith8,pos:141,val:+6,+cov diff --git a/src/mint/afl-tests/id:000442,src:000000,op:arith8,pos:168,val:+30,+cov b/src/exchange/afl-tests/id:000442,src:000000,op:arith8,pos:168,val:+30,+cov similarity index 100% rename from src/mint/afl-tests/id:000442,src:000000,op:arith8,pos:168,val:+30,+cov rename to src/exchange/afl-tests/id:000442,src:000000,op:arith8,pos:168,val:+30,+cov diff --git a/src/mint/afl-tests/id:000443,src:000000,op:arith8,pos:141,val:+10,+cov b/src/exchange/afl-tests/id:000443,src:000000,op:arith8,pos:141,val:+10,+cov similarity index 100% rename from src/mint/afl-tests/id:000443,src:000000,op:arith8,pos:141,val:+10,+cov rename to src/exchange/afl-tests/id:000443,src:000000,op:arith8,pos:141,val:+10,+cov diff --git a/src/mint/afl-tests/id:000443,src:000000,op:arith8,pos:171,val:+22,+cov b/src/exchange/afl-tests/id:000443,src:000000,op:arith8,pos:171,val:+22,+cov similarity index 100% rename from src/mint/afl-tests/id:000443,src:000000,op:arith8,pos:171,val:+22,+cov rename to src/exchange/afl-tests/id:000443,src:000000,op:arith8,pos:171,val:+22,+cov diff --git a/src/mint/afl-tests/id:000444,src:000000,op:arith8,pos:141,val:+13,+cov b/src/exchange/afl-tests/id:000444,src:000000,op:arith8,pos:141,val:+13,+cov similarity index 100% rename from src/mint/afl-tests/id:000444,src:000000,op:arith8,pos:141,val:+13,+cov rename to src/exchange/afl-tests/id:000444,src:000000,op:arith8,pos:141,val:+13,+cov diff --git a/src/mint/afl-tests/id:000444,src:000000,op:arith8,pos:171,val:+25,+cov b/src/exchange/afl-tests/id:000444,src:000000,op:arith8,pos:171,val:+25,+cov similarity index 100% rename from src/mint/afl-tests/id:000444,src:000000,op:arith8,pos:171,val:+25,+cov rename to src/exchange/afl-tests/id:000444,src:000000,op:arith8,pos:171,val:+25,+cov diff --git a/src/mint/afl-tests/id:000445,src:000000,op:arith8,pos:141,val:+20,+cov b/src/exchange/afl-tests/id:000445,src:000000,op:arith8,pos:141,val:+20,+cov similarity index 100% rename from src/mint/afl-tests/id:000445,src:000000,op:arith8,pos:141,val:+20,+cov rename to src/exchange/afl-tests/id:000445,src:000000,op:arith8,pos:141,val:+20,+cov diff --git a/src/mint/afl-tests/id:000445,src:000000,op:arith8,pos:172,val:-13,+cov b/src/exchange/afl-tests/id:000445,src:000000,op:arith8,pos:172,val:-13,+cov similarity index 100% rename from src/mint/afl-tests/id:000445,src:000000,op:arith8,pos:172,val:-13,+cov rename to src/exchange/afl-tests/id:000445,src:000000,op:arith8,pos:172,val:-13,+cov diff --git a/src/mint/afl-tests/id:000446,src:000000,op:arith8,pos:142,val:+6,+cov b/src/exchange/afl-tests/id:000446,src:000000,op:arith8,pos:142,val:+6,+cov similarity index 100% rename from src/mint/afl-tests/id:000446,src:000000,op:arith8,pos:142,val:+6,+cov rename to src/exchange/afl-tests/id:000446,src:000000,op:arith8,pos:142,val:+6,+cov diff --git a/src/mint/afl-tests/id:000446,src:000000,op:arith8,pos:172,val:+19,+cov b/src/exchange/afl-tests/id:000446,src:000000,op:arith8,pos:172,val:+19,+cov similarity index 100% rename from src/mint/afl-tests/id:000446,src:000000,op:arith8,pos:172,val:+19,+cov rename to src/exchange/afl-tests/id:000446,src:000000,op:arith8,pos:172,val:+19,+cov diff --git a/src/mint/afl-tests/id:000447,src:000000,op:arith8,pos:142,val:-20,+cov b/src/exchange/afl-tests/id:000447,src:000000,op:arith8,pos:142,val:-20,+cov similarity index 100% rename from src/mint/afl-tests/id:000447,src:000000,op:arith8,pos:142,val:-20,+cov rename to src/exchange/afl-tests/id:000447,src:000000,op:arith8,pos:142,val:-20,+cov diff --git a/src/mint/afl-tests/id:000447,src:000000,op:arith8,pos:173,val:-15,+cov b/src/exchange/afl-tests/id:000447,src:000000,op:arith8,pos:173,val:-15,+cov similarity index 100% rename from src/mint/afl-tests/id:000447,src:000000,op:arith8,pos:173,val:-15,+cov rename to src/exchange/afl-tests/id:000447,src:000000,op:arith8,pos:173,val:-15,+cov diff --git a/src/mint/afl-tests/id:000448,src:000000,op:arith8,pos:143,val:+17,+cov b/src/exchange/afl-tests/id:000448,src:000000,op:arith8,pos:143,val:+17,+cov similarity index 100% rename from src/mint/afl-tests/id:000448,src:000000,op:arith8,pos:143,val:+17,+cov rename to src/exchange/afl-tests/id:000448,src:000000,op:arith8,pos:143,val:+17,+cov diff --git a/src/mint/afl-tests/id:000448,src:000000,op:arith8,pos:174,val:+23,+cov b/src/exchange/afl-tests/id:000448,src:000000,op:arith8,pos:174,val:+23,+cov similarity index 100% rename from src/mint/afl-tests/id:000448,src:000000,op:arith8,pos:174,val:+23,+cov rename to src/exchange/afl-tests/id:000448,src:000000,op:arith8,pos:174,val:+23,+cov diff --git a/src/mint/afl-tests/id:000449,src:000000,op:arith8,pos:144,val:+28,+cov b/src/exchange/afl-tests/id:000449,src:000000,op:arith8,pos:144,val:+28,+cov similarity index 100% rename from src/mint/afl-tests/id:000449,src:000000,op:arith8,pos:144,val:+28,+cov rename to src/exchange/afl-tests/id:000449,src:000000,op:arith8,pos:144,val:+28,+cov diff --git a/src/mint/afl-tests/id:000449,src:000000,op:arith8,pos:174,val:+33,+cov b/src/exchange/afl-tests/id:000449,src:000000,op:arith8,pos:174,val:+33,+cov similarity index 100% rename from src/mint/afl-tests/id:000449,src:000000,op:arith8,pos:174,val:+33,+cov rename to src/exchange/afl-tests/id:000449,src:000000,op:arith8,pos:174,val:+33,+cov diff --git a/src/mint/afl-tests/id:000450,src:000000,op:arith8,pos:145,val:+27,+cov b/src/exchange/afl-tests/id:000450,src:000000,op:arith8,pos:145,val:+27,+cov similarity index 100% rename from src/mint/afl-tests/id:000450,src:000000,op:arith8,pos:145,val:+27,+cov rename to src/exchange/afl-tests/id:000450,src:000000,op:arith8,pos:145,val:+27,+cov diff --git a/src/mint/afl-tests/id:000450,src:000000,op:arith8,pos:176,val:+20,+cov b/src/exchange/afl-tests/id:000450,src:000000,op:arith8,pos:176,val:+20,+cov similarity index 100% rename from src/mint/afl-tests/id:000450,src:000000,op:arith8,pos:176,val:+20,+cov rename to src/exchange/afl-tests/id:000450,src:000000,op:arith8,pos:176,val:+20,+cov diff --git a/src/mint/afl-tests/id:000451,src:000000,op:arith8,pos:146,val:-11,+cov b/src/exchange/afl-tests/id:000451,src:000000,op:arith8,pos:146,val:-11,+cov similarity index 100% rename from src/mint/afl-tests/id:000451,src:000000,op:arith8,pos:146,val:-11,+cov rename to src/exchange/afl-tests/id:000451,src:000000,op:arith8,pos:146,val:-11,+cov diff --git a/src/mint/afl-tests/id:000451,src:000000,op:arith8,pos:177,val:+33,+cov b/src/exchange/afl-tests/id:000451,src:000000,op:arith8,pos:177,val:+33,+cov similarity index 100% rename from src/mint/afl-tests/id:000451,src:000000,op:arith8,pos:177,val:+33,+cov rename to src/exchange/afl-tests/id:000451,src:000000,op:arith8,pos:177,val:+33,+cov diff --git a/src/mint/afl-tests/id:000452,src:000000,op:arith8,pos:146,val:-13,+cov b/src/exchange/afl-tests/id:000452,src:000000,op:arith8,pos:146,val:-13,+cov similarity index 100% rename from src/mint/afl-tests/id:000452,src:000000,op:arith8,pos:146,val:-13,+cov rename to src/exchange/afl-tests/id:000452,src:000000,op:arith8,pos:146,val:-13,+cov diff --git a/src/mint/afl-tests/id:000452,src:000000,op:arith8,pos:181,val:+12,+cov b/src/exchange/afl-tests/id:000452,src:000000,op:arith8,pos:181,val:+12,+cov similarity index 100% rename from src/mint/afl-tests/id:000452,src:000000,op:arith8,pos:181,val:+12,+cov rename to src/exchange/afl-tests/id:000452,src:000000,op:arith8,pos:181,val:+12,+cov diff --git a/src/mint/afl-tests/id:000453,src:000000,op:arith8,pos:146,val:-21,+cov b/src/exchange/afl-tests/id:000453,src:000000,op:arith8,pos:146,val:-21,+cov similarity index 100% rename from src/mint/afl-tests/id:000453,src:000000,op:arith8,pos:146,val:-21,+cov rename to src/exchange/afl-tests/id:000453,src:000000,op:arith8,pos:146,val:-21,+cov diff --git a/src/mint/afl-tests/id:000453,src:000000,op:arith8,pos:181,val:+21 b/src/exchange/afl-tests/id:000453,src:000000,op:arith8,pos:181,val:+21 similarity index 100% rename from src/mint/afl-tests/id:000453,src:000000,op:arith8,pos:181,val:+21 rename to src/exchange/afl-tests/id:000453,src:000000,op:arith8,pos:181,val:+21 diff --git a/src/mint/afl-tests/id:000454,src:000000,op:arith8,pos:147,val:-3,+cov b/src/exchange/afl-tests/id:000454,src:000000,op:arith8,pos:147,val:-3,+cov similarity index 100% rename from src/mint/afl-tests/id:000454,src:000000,op:arith8,pos:147,val:-3,+cov rename to src/exchange/afl-tests/id:000454,src:000000,op:arith8,pos:147,val:-3,+cov diff --git a/src/mint/afl-tests/id:000454,src:000000,op:arith8,pos:181,val:+25,+cov b/src/exchange/afl-tests/id:000454,src:000000,op:arith8,pos:181,val:+25,+cov similarity index 100% rename from src/mint/afl-tests/id:000454,src:000000,op:arith8,pos:181,val:+25,+cov rename to src/exchange/afl-tests/id:000454,src:000000,op:arith8,pos:181,val:+25,+cov diff --git a/src/mint/afl-tests/id:000455,src:000000,op:arith8,pos:147,val:-9,+cov b/src/exchange/afl-tests/id:000455,src:000000,op:arith8,pos:147,val:-9,+cov similarity index 100% rename from src/mint/afl-tests/id:000455,src:000000,op:arith8,pos:147,val:-9,+cov rename to src/exchange/afl-tests/id:000455,src:000000,op:arith8,pos:147,val:-9,+cov diff --git a/src/mint/afl-tests/id:000455,src:000000,op:arith8,pos:183,val:-3 b/src/exchange/afl-tests/id:000455,src:000000,op:arith8,pos:183,val:-3 similarity index 100% rename from src/mint/afl-tests/id:000455,src:000000,op:arith8,pos:183,val:-3 rename to src/exchange/afl-tests/id:000455,src:000000,op:arith8,pos:183,val:-3 diff --git a/src/mint/afl-tests/id:000456,src:000000,op:arith8,pos:147,val:-13,+cov b/src/exchange/afl-tests/id:000456,src:000000,op:arith8,pos:147,val:-13,+cov similarity index 100% rename from src/mint/afl-tests/id:000456,src:000000,op:arith8,pos:147,val:-13,+cov rename to src/exchange/afl-tests/id:000456,src:000000,op:arith8,pos:147,val:-13,+cov diff --git a/src/mint/afl-tests/id:000456,src:000000,op:arith8,pos:184,val:-13 b/src/exchange/afl-tests/id:000456,src:000000,op:arith8,pos:184,val:-13 similarity index 100% rename from src/mint/afl-tests/id:000456,src:000000,op:arith8,pos:184,val:-13 rename to src/exchange/afl-tests/id:000456,src:000000,op:arith8,pos:184,val:-13 diff --git a/src/mint/afl-tests/id:000457,src:000000,op:arith8,pos:148,val:+12,+cov b/src/exchange/afl-tests/id:000457,src:000000,op:arith8,pos:148,val:+12,+cov similarity index 100% rename from src/mint/afl-tests/id:000457,src:000000,op:arith8,pos:148,val:+12,+cov rename to src/exchange/afl-tests/id:000457,src:000000,op:arith8,pos:148,val:+12,+cov diff --git a/src/mint/afl-tests/id:000457,src:000000,op:arith8,pos:184,val:-34,+cov b/src/exchange/afl-tests/id:000457,src:000000,op:arith8,pos:184,val:-34,+cov similarity index 100% rename from src/mint/afl-tests/id:000457,src:000000,op:arith8,pos:184,val:-34,+cov rename to src/exchange/afl-tests/id:000457,src:000000,op:arith8,pos:184,val:-34,+cov diff --git a/src/mint/afl-tests/id:000458,src:000000,op:arith8,pos:151,val:-7,+cov b/src/exchange/afl-tests/id:000458,src:000000,op:arith8,pos:151,val:-7,+cov similarity index 100% rename from src/mint/afl-tests/id:000458,src:000000,op:arith8,pos:151,val:-7,+cov rename to src/exchange/afl-tests/id:000458,src:000000,op:arith8,pos:151,val:-7,+cov diff --git a/src/mint/afl-tests/id:000458,src:000000,op:arith8,pos:185,val:-6,+cov b/src/exchange/afl-tests/id:000458,src:000000,op:arith8,pos:185,val:-6,+cov similarity index 100% rename from src/mint/afl-tests/id:000458,src:000000,op:arith8,pos:185,val:-6,+cov rename to src/exchange/afl-tests/id:000458,src:000000,op:arith8,pos:185,val:-6,+cov diff --git a/src/mint/afl-tests/id:000459,src:000000,op:arith8,pos:151,val:+15,+cov b/src/exchange/afl-tests/id:000459,src:000000,op:arith8,pos:151,val:+15,+cov similarity index 100% rename from src/mint/afl-tests/id:000459,src:000000,op:arith8,pos:151,val:+15,+cov rename to src/exchange/afl-tests/id:000459,src:000000,op:arith8,pos:151,val:+15,+cov diff --git a/src/mint/afl-tests/id:000459,src:000000,op:arith8,pos:185,val:+14,+cov b/src/exchange/afl-tests/id:000459,src:000000,op:arith8,pos:185,val:+14,+cov similarity index 100% rename from src/mint/afl-tests/id:000459,src:000000,op:arith8,pos:185,val:+14,+cov rename to src/exchange/afl-tests/id:000459,src:000000,op:arith8,pos:185,val:+14,+cov diff --git a/src/mint/afl-tests/id:000460,src:000000,op:arith8,pos:152,val:-7,+cov b/src/exchange/afl-tests/id:000460,src:000000,op:arith8,pos:152,val:-7,+cov similarity index 100% rename from src/mint/afl-tests/id:000460,src:000000,op:arith8,pos:152,val:-7,+cov rename to src/exchange/afl-tests/id:000460,src:000000,op:arith8,pos:152,val:-7,+cov diff --git a/src/mint/afl-tests/id:000460,src:000000,op:arith8,pos:185,val:+29,+cov b/src/exchange/afl-tests/id:000460,src:000000,op:arith8,pos:185,val:+29,+cov similarity index 100% rename from src/mint/afl-tests/id:000460,src:000000,op:arith8,pos:185,val:+29,+cov rename to src/exchange/afl-tests/id:000460,src:000000,op:arith8,pos:185,val:+29,+cov diff --git a/src/mint/afl-tests/id:000461,src:000000,op:arith8,pos:152,val:+25,+cov b/src/exchange/afl-tests/id:000461,src:000000,op:arith8,pos:152,val:+25,+cov similarity index 100% rename from src/mint/afl-tests/id:000461,src:000000,op:arith8,pos:152,val:+25,+cov rename to src/exchange/afl-tests/id:000461,src:000000,op:arith8,pos:152,val:+25,+cov diff --git a/src/mint/afl-tests/id:000461,src:000000,op:arith8,pos:186,val:+23,+cov b/src/exchange/afl-tests/id:000461,src:000000,op:arith8,pos:186,val:+23,+cov similarity index 100% rename from src/mint/afl-tests/id:000461,src:000000,op:arith8,pos:186,val:+23,+cov rename to src/exchange/afl-tests/id:000461,src:000000,op:arith8,pos:186,val:+23,+cov diff --git a/src/mint/afl-tests/id:000462,src:000000,op:arith8,pos:152,val:-30 b/src/exchange/afl-tests/id:000462,src:000000,op:arith8,pos:152,val:-30 similarity index 100% rename from src/mint/afl-tests/id:000462,src:000000,op:arith8,pos:152,val:-30 rename to src/exchange/afl-tests/id:000462,src:000000,op:arith8,pos:152,val:-30 diff --git a/src/mint/afl-tests/id:000462,src:000000,op:arith8,pos:191,val:-26,+cov b/src/exchange/afl-tests/id:000462,src:000000,op:arith8,pos:191,val:-26,+cov similarity index 100% rename from src/mint/afl-tests/id:000462,src:000000,op:arith8,pos:191,val:-26,+cov rename to src/exchange/afl-tests/id:000462,src:000000,op:arith8,pos:191,val:-26,+cov diff --git a/src/mint/afl-tests/id:000463,src:000000,op:arith8,pos:153,val:+28,+cov b/src/exchange/afl-tests/id:000463,src:000000,op:arith8,pos:153,val:+28,+cov similarity index 100% rename from src/mint/afl-tests/id:000463,src:000000,op:arith8,pos:153,val:+28,+cov rename to src/exchange/afl-tests/id:000463,src:000000,op:arith8,pos:153,val:+28,+cov diff --git a/src/mint/afl-tests/id:000463,src:000000,op:arith8,pos:196,val:-18,+cov b/src/exchange/afl-tests/id:000463,src:000000,op:arith8,pos:196,val:-18,+cov similarity index 100% rename from src/mint/afl-tests/id:000463,src:000000,op:arith8,pos:196,val:-18,+cov rename to src/exchange/afl-tests/id:000463,src:000000,op:arith8,pos:196,val:-18,+cov diff --git a/src/mint/afl-tests/id:000464,src:000000,op:arith8,pos:157,val:+8,+cov b/src/exchange/afl-tests/id:000464,src:000000,op:arith8,pos:157,val:+8,+cov similarity index 100% rename from src/mint/afl-tests/id:000464,src:000000,op:arith8,pos:157,val:+8,+cov rename to src/exchange/afl-tests/id:000464,src:000000,op:arith8,pos:157,val:+8,+cov diff --git a/src/mint/afl-tests/id:000464,src:000000,op:arith8,pos:203,val:+22,+cov b/src/exchange/afl-tests/id:000464,src:000000,op:arith8,pos:203,val:+22,+cov similarity index 100% rename from src/mint/afl-tests/id:000464,src:000000,op:arith8,pos:203,val:+22,+cov rename to src/exchange/afl-tests/id:000464,src:000000,op:arith8,pos:203,val:+22,+cov diff --git a/src/mint/afl-tests/id:000465,src:000000,op:arith8,pos:157,val:-9,+cov b/src/exchange/afl-tests/id:000465,src:000000,op:arith8,pos:157,val:-9,+cov similarity index 100% rename from src/mint/afl-tests/id:000465,src:000000,op:arith8,pos:157,val:-9,+cov rename to src/exchange/afl-tests/id:000465,src:000000,op:arith8,pos:157,val:-9,+cov diff --git a/src/mint/afl-tests/id:000465,src:000000,op:arith8,pos:225,val:-6,+cov b/src/exchange/afl-tests/id:000465,src:000000,op:arith8,pos:225,val:-6,+cov similarity index 100% rename from src/mint/afl-tests/id:000465,src:000000,op:arith8,pos:225,val:-6,+cov rename to src/exchange/afl-tests/id:000465,src:000000,op:arith8,pos:225,val:-6,+cov diff --git a/src/mint/afl-tests/id:000466,src:000000,op:arith8,pos:157,val:-12,+cov b/src/exchange/afl-tests/id:000466,src:000000,op:arith8,pos:157,val:-12,+cov similarity index 100% rename from src/mint/afl-tests/id:000466,src:000000,op:arith8,pos:157,val:-12,+cov rename to src/exchange/afl-tests/id:000466,src:000000,op:arith8,pos:157,val:-12,+cov diff --git a/src/mint/afl-tests/id:000466,src:000000,op:arith8,pos:241,val:-26,+cov b/src/exchange/afl-tests/id:000466,src:000000,op:arith8,pos:241,val:-26,+cov similarity index 100% rename from src/mint/afl-tests/id:000466,src:000000,op:arith8,pos:241,val:-26,+cov rename to src/exchange/afl-tests/id:000466,src:000000,op:arith8,pos:241,val:-26,+cov diff --git a/src/mint/afl-tests/id:000467,src:000000,op:arith8,pos:157,val:-21,+cov b/src/exchange/afl-tests/id:000467,src:000000,op:arith8,pos:157,val:-21,+cov similarity index 100% rename from src/mint/afl-tests/id:000467,src:000000,op:arith8,pos:157,val:-21,+cov rename to src/exchange/afl-tests/id:000467,src:000000,op:arith8,pos:157,val:-21,+cov diff --git a/src/mint/afl-tests/id:000467,src:000000,op:arith8,pos:268,val:-4,+cov b/src/exchange/afl-tests/id:000467,src:000000,op:arith8,pos:268,val:-4,+cov similarity index 100% rename from src/mint/afl-tests/id:000467,src:000000,op:arith8,pos:268,val:-4,+cov rename to src/exchange/afl-tests/id:000467,src:000000,op:arith8,pos:268,val:-4,+cov diff --git a/src/mint/afl-tests/id:000468,src:000000,op:arith8,pos:158,val:-9,+cov b/src/exchange/afl-tests/id:000468,src:000000,op:arith8,pos:158,val:-9,+cov similarity index 100% rename from src/mint/afl-tests/id:000468,src:000000,op:arith8,pos:158,val:-9,+cov rename to src/exchange/afl-tests/id:000468,src:000000,op:arith8,pos:158,val:-9,+cov diff --git a/src/mint/afl-tests/id:000468,src:000000,op:arith8,pos:268,val:+7,+cov b/src/exchange/afl-tests/id:000468,src:000000,op:arith8,pos:268,val:+7,+cov similarity index 100% rename from src/mint/afl-tests/id:000468,src:000000,op:arith8,pos:268,val:+7,+cov rename to src/exchange/afl-tests/id:000468,src:000000,op:arith8,pos:268,val:+7,+cov diff --git a/src/mint/afl-tests/id:000469,src:000000,op:arith8,pos:158,val:+25,+cov b/src/exchange/afl-tests/id:000469,src:000000,op:arith8,pos:158,val:+25,+cov similarity index 100% rename from src/mint/afl-tests/id:000469,src:000000,op:arith8,pos:158,val:+25,+cov rename to src/exchange/afl-tests/id:000469,src:000000,op:arith8,pos:158,val:+25,+cov diff --git a/src/mint/afl-tests/id:000469,src:000000,op:arith8,pos:269,val:+11,+cov b/src/exchange/afl-tests/id:000469,src:000000,op:arith8,pos:269,val:+11,+cov similarity index 100% rename from src/mint/afl-tests/id:000469,src:000000,op:arith8,pos:269,val:+11,+cov rename to src/exchange/afl-tests/id:000469,src:000000,op:arith8,pos:269,val:+11,+cov diff --git a/src/mint/afl-tests/id:000470,src:000000,op:arith8,pos:159,val:-7,+cov b/src/exchange/afl-tests/id:000470,src:000000,op:arith8,pos:159,val:-7,+cov similarity index 100% rename from src/mint/afl-tests/id:000470,src:000000,op:arith8,pos:159,val:-7,+cov rename to src/exchange/afl-tests/id:000470,src:000000,op:arith8,pos:159,val:-7,+cov diff --git a/src/mint/afl-tests/id:000470,src:000000,op:arith8,pos:272,val:+29,+cov b/src/exchange/afl-tests/id:000470,src:000000,op:arith8,pos:272,val:+29,+cov similarity index 100% rename from src/mint/afl-tests/id:000470,src:000000,op:arith8,pos:272,val:+29,+cov rename to src/exchange/afl-tests/id:000470,src:000000,op:arith8,pos:272,val:+29,+cov diff --git a/src/mint/afl-tests/id:000471,src:000000,op:arith8,pos:159,val:+10,+cov b/src/exchange/afl-tests/id:000471,src:000000,op:arith8,pos:159,val:+10,+cov similarity index 100% rename from src/mint/afl-tests/id:000471,src:000000,op:arith8,pos:159,val:+10,+cov rename to src/exchange/afl-tests/id:000471,src:000000,op:arith8,pos:159,val:+10,+cov diff --git a/src/mint/afl-tests/id:000471,src:000000,op:arith8,pos:273,val:+29,+cov b/src/exchange/afl-tests/id:000471,src:000000,op:arith8,pos:273,val:+29,+cov similarity index 100% rename from src/mint/afl-tests/id:000471,src:000000,op:arith8,pos:273,val:+29,+cov rename to src/exchange/afl-tests/id:000471,src:000000,op:arith8,pos:273,val:+29,+cov diff --git a/src/mint/afl-tests/id:000472,src:000000,op:arith8,pos:159,val:-11,+cov b/src/exchange/afl-tests/id:000472,src:000000,op:arith8,pos:159,val:-11,+cov similarity index 100% rename from src/mint/afl-tests/id:000472,src:000000,op:arith8,pos:159,val:-11,+cov rename to src/exchange/afl-tests/id:000472,src:000000,op:arith8,pos:159,val:-11,+cov diff --git a/src/mint/afl-tests/id:000472,src:000000,op:arith8,pos:274,val:+11,+cov b/src/exchange/afl-tests/id:000472,src:000000,op:arith8,pos:274,val:+11,+cov similarity index 100% rename from src/mint/afl-tests/id:000472,src:000000,op:arith8,pos:274,val:+11,+cov rename to src/exchange/afl-tests/id:000472,src:000000,op:arith8,pos:274,val:+11,+cov diff --git a/src/mint/afl-tests/id:000473,src:000000,op:arith8,pos:160,val:+19,+cov b/src/exchange/afl-tests/id:000473,src:000000,op:arith8,pos:160,val:+19,+cov similarity index 100% rename from src/mint/afl-tests/id:000473,src:000000,op:arith8,pos:160,val:+19,+cov rename to src/exchange/afl-tests/id:000473,src:000000,op:arith8,pos:160,val:+19,+cov diff --git a/src/mint/afl-tests/id:000473,src:000000,op:arith8,pos:276,val:+9,+cov b/src/exchange/afl-tests/id:000473,src:000000,op:arith8,pos:276,val:+9,+cov similarity index 100% rename from src/mint/afl-tests/id:000473,src:000000,op:arith8,pos:276,val:+9,+cov rename to src/exchange/afl-tests/id:000473,src:000000,op:arith8,pos:276,val:+9,+cov diff --git a/src/mint/afl-tests/id:000474,src:000000,op:arith8,pos:161,val:+14,+cov b/src/exchange/afl-tests/id:000474,src:000000,op:arith8,pos:161,val:+14,+cov similarity index 100% rename from src/mint/afl-tests/id:000474,src:000000,op:arith8,pos:161,val:+14,+cov rename to src/exchange/afl-tests/id:000474,src:000000,op:arith8,pos:161,val:+14,+cov diff --git a/src/mint/afl-tests/id:000474,src:000000,op:arith8,pos:276,val:+19,+cov b/src/exchange/afl-tests/id:000474,src:000000,op:arith8,pos:276,val:+19,+cov similarity index 100% rename from src/mint/afl-tests/id:000474,src:000000,op:arith8,pos:276,val:+19,+cov rename to src/exchange/afl-tests/id:000474,src:000000,op:arith8,pos:276,val:+19,+cov diff --git a/src/mint/afl-tests/id:000475,src:000000,op:arith8,pos:162,val:+7,+cov b/src/exchange/afl-tests/id:000475,src:000000,op:arith8,pos:162,val:+7,+cov similarity index 100% rename from src/mint/afl-tests/id:000475,src:000000,op:arith8,pos:162,val:+7,+cov rename to src/exchange/afl-tests/id:000475,src:000000,op:arith8,pos:162,val:+7,+cov diff --git a/src/mint/afl-tests/id:000475,src:000000,op:arith8,pos:277,val:+35,+cov b/src/exchange/afl-tests/id:000475,src:000000,op:arith8,pos:277,val:+35,+cov similarity index 100% rename from src/mint/afl-tests/id:000475,src:000000,op:arith8,pos:277,val:+35,+cov rename to src/exchange/afl-tests/id:000475,src:000000,op:arith8,pos:277,val:+35,+cov diff --git a/src/mint/afl-tests/id:000476,src:000000,op:arith8,pos:163,val:+26,+cov b/src/exchange/afl-tests/id:000476,src:000000,op:arith8,pos:163,val:+26,+cov similarity index 100% rename from src/mint/afl-tests/id:000476,src:000000,op:arith8,pos:163,val:+26,+cov rename to src/exchange/afl-tests/id:000476,src:000000,op:arith8,pos:163,val:+26,+cov diff --git a/src/mint/afl-tests/id:000476,src:000000,op:arith8,pos:278,val:+5,+cov b/src/exchange/afl-tests/id:000476,src:000000,op:arith8,pos:278,val:+5,+cov similarity index 100% rename from src/mint/afl-tests/id:000476,src:000000,op:arith8,pos:278,val:+5,+cov rename to src/exchange/afl-tests/id:000476,src:000000,op:arith8,pos:278,val:+5,+cov diff --git a/src/mint/afl-tests/id:000477,src:000000,op:arith8,pos:163,val:+31,+cov b/src/exchange/afl-tests/id:000477,src:000000,op:arith8,pos:163,val:+31,+cov similarity index 100% rename from src/mint/afl-tests/id:000477,src:000000,op:arith8,pos:163,val:+31,+cov rename to src/exchange/afl-tests/id:000477,src:000000,op:arith8,pos:163,val:+31,+cov diff --git a/src/mint/afl-tests/id:000477,src:000000,op:arith8,pos:305,val:+14,+cov b/src/exchange/afl-tests/id:000477,src:000000,op:arith8,pos:305,val:+14,+cov similarity index 100% rename from src/mint/afl-tests/id:000477,src:000000,op:arith8,pos:305,val:+14,+cov rename to src/exchange/afl-tests/id:000477,src:000000,op:arith8,pos:305,val:+14,+cov diff --git a/src/mint/afl-tests/id:000478,src:000000,op:arith8,pos:164,val:+2,+cov b/src/exchange/afl-tests/id:000478,src:000000,op:arith8,pos:164,val:+2,+cov similarity index 100% rename from src/mint/afl-tests/id:000478,src:000000,op:arith8,pos:164,val:+2,+cov rename to src/exchange/afl-tests/id:000478,src:000000,op:arith8,pos:164,val:+2,+cov diff --git a/src/mint/afl-tests/id:000478,src:000000,op:arith8,pos:306,val:-20,+cov b/src/exchange/afl-tests/id:000478,src:000000,op:arith8,pos:306,val:-20,+cov similarity index 100% rename from src/mint/afl-tests/id:000478,src:000000,op:arith8,pos:306,val:-20,+cov rename to src/exchange/afl-tests/id:000478,src:000000,op:arith8,pos:306,val:-20,+cov diff --git a/src/mint/afl-tests/id:000479,src:000000,op:arith8,pos:169,val:+7,+cov b/src/exchange/afl-tests/id:000479,src:000000,op:arith8,pos:169,val:+7,+cov similarity index 100% rename from src/mint/afl-tests/id:000479,src:000000,op:arith8,pos:169,val:+7,+cov rename to src/exchange/afl-tests/id:000479,src:000000,op:arith8,pos:169,val:+7,+cov diff --git a/src/mint/afl-tests/id:000479,src:000000,op:arith8,pos:314,val:-17,+cov b/src/exchange/afl-tests/id:000479,src:000000,op:arith8,pos:314,val:-17,+cov similarity index 100% rename from src/mint/afl-tests/id:000479,src:000000,op:arith8,pos:314,val:-17,+cov rename to src/exchange/afl-tests/id:000479,src:000000,op:arith8,pos:314,val:-17,+cov diff --git a/src/mint/afl-tests/id:000480,src:000000,op:arith8,pos:169,val:-9,+cov b/src/exchange/afl-tests/id:000480,src:000000,op:arith8,pos:169,val:-9,+cov similarity index 100% rename from src/mint/afl-tests/id:000480,src:000000,op:arith8,pos:169,val:-9,+cov rename to src/exchange/afl-tests/id:000480,src:000000,op:arith8,pos:169,val:-9,+cov diff --git a/src/mint/afl-tests/id:000480,src:000000,op:arith8,pos:315,val:-17,+cov b/src/exchange/afl-tests/id:000480,src:000000,op:arith8,pos:315,val:-17,+cov similarity index 100% rename from src/mint/afl-tests/id:000480,src:000000,op:arith8,pos:315,val:-17,+cov rename to src/exchange/afl-tests/id:000480,src:000000,op:arith8,pos:315,val:-17,+cov diff --git a/src/mint/afl-tests/id:000481,src:000000,op:arith8,pos:169,val:+19,+cov b/src/exchange/afl-tests/id:000481,src:000000,op:arith8,pos:169,val:+19,+cov similarity index 100% rename from src/mint/afl-tests/id:000481,src:000000,op:arith8,pos:169,val:+19,+cov rename to src/exchange/afl-tests/id:000481,src:000000,op:arith8,pos:169,val:+19,+cov diff --git a/src/mint/afl-tests/id:000481,src:000000,op:arith8,pos:315,val:-19,+cov b/src/exchange/afl-tests/id:000481,src:000000,op:arith8,pos:315,val:-19,+cov similarity index 100% rename from src/mint/afl-tests/id:000481,src:000000,op:arith8,pos:315,val:-19,+cov rename to src/exchange/afl-tests/id:000481,src:000000,op:arith8,pos:315,val:-19,+cov diff --git a/src/mint/afl-tests/id:000482,src:000000,op:arith8,pos:172,val:-3,+cov b/src/exchange/afl-tests/id:000482,src:000000,op:arith8,pos:172,val:-3,+cov similarity index 100% rename from src/mint/afl-tests/id:000482,src:000000,op:arith8,pos:172,val:-3,+cov rename to src/exchange/afl-tests/id:000482,src:000000,op:arith8,pos:172,val:-3,+cov diff --git a/src/mint/afl-tests/id:000482,src:000000,op:arith8,pos:315,val:-29,+cov b/src/exchange/afl-tests/id:000482,src:000000,op:arith8,pos:315,val:-29,+cov similarity index 100% rename from src/mint/afl-tests/id:000482,src:000000,op:arith8,pos:315,val:-29,+cov rename to src/exchange/afl-tests/id:000482,src:000000,op:arith8,pos:315,val:-29,+cov diff --git a/src/mint/afl-tests/id:000483,src:000000,op:arith8,pos:172,val:-33,+cov b/src/exchange/afl-tests/id:000483,src:000000,op:arith8,pos:172,val:-33,+cov similarity index 100% rename from src/mint/afl-tests/id:000483,src:000000,op:arith8,pos:172,val:-33,+cov rename to src/exchange/afl-tests/id:000483,src:000000,op:arith8,pos:172,val:-33,+cov diff --git a/src/mint/afl-tests/id:000483,src:000000,op:arith8,pos:316,val:+14,+cov b/src/exchange/afl-tests/id:000483,src:000000,op:arith8,pos:316,val:+14,+cov similarity index 100% rename from src/mint/afl-tests/id:000483,src:000000,op:arith8,pos:316,val:+14,+cov rename to src/exchange/afl-tests/id:000483,src:000000,op:arith8,pos:316,val:+14,+cov diff --git a/src/mint/afl-tests/id:000484,src:000000,op:arith8,pos:175,val:+20,+cov b/src/exchange/afl-tests/id:000484,src:000000,op:arith8,pos:175,val:+20,+cov similarity index 100% rename from src/mint/afl-tests/id:000484,src:000000,op:arith8,pos:175,val:+20,+cov rename to src/exchange/afl-tests/id:000484,src:000000,op:arith8,pos:175,val:+20,+cov diff --git a/src/mint/afl-tests/id:000484,src:000000,op:arith8,pos:316,val:+17,+cov b/src/exchange/afl-tests/id:000484,src:000000,op:arith8,pos:316,val:+17,+cov similarity index 100% rename from src/mint/afl-tests/id:000484,src:000000,op:arith8,pos:316,val:+17,+cov rename to src/exchange/afl-tests/id:000484,src:000000,op:arith8,pos:316,val:+17,+cov diff --git a/src/mint/afl-tests/id:000485,src:000000,op:arith8,pos:176,val:+7,+cov b/src/exchange/afl-tests/id:000485,src:000000,op:arith8,pos:176,val:+7,+cov similarity index 100% rename from src/mint/afl-tests/id:000485,src:000000,op:arith8,pos:176,val:+7,+cov rename to src/exchange/afl-tests/id:000485,src:000000,op:arith8,pos:176,val:+7,+cov diff --git a/src/mint/afl-tests/id:000485,src:000000,op:arith8,pos:316,val:-23,+cov b/src/exchange/afl-tests/id:000485,src:000000,op:arith8,pos:316,val:-23,+cov similarity index 100% rename from src/mint/afl-tests/id:000485,src:000000,op:arith8,pos:316,val:-23,+cov rename to src/exchange/afl-tests/id:000485,src:000000,op:arith8,pos:316,val:-23,+cov diff --git a/src/mint/afl-tests/id:000486,src:000000,op:arith8,pos:176,val:-28,+cov b/src/exchange/afl-tests/id:000486,src:000000,op:arith8,pos:176,val:-28,+cov similarity index 100% rename from src/mint/afl-tests/id:000486,src:000000,op:arith8,pos:176,val:-28,+cov rename to src/exchange/afl-tests/id:000486,src:000000,op:arith8,pos:176,val:-28,+cov diff --git a/src/mint/afl-tests/id:000486,src:000000,op:arith8,pos:317,val:-30,+cov b/src/exchange/afl-tests/id:000486,src:000000,op:arith8,pos:317,val:-30,+cov similarity index 100% rename from src/mint/afl-tests/id:000486,src:000000,op:arith8,pos:317,val:-30,+cov rename to src/exchange/afl-tests/id:000486,src:000000,op:arith8,pos:317,val:-30,+cov diff --git a/src/mint/afl-tests/id:000487,src:000000,op:arith8,pos:177,val:+11,+cov b/src/exchange/afl-tests/id:000487,src:000000,op:arith8,pos:177,val:+11,+cov similarity index 100% rename from src/mint/afl-tests/id:000487,src:000000,op:arith8,pos:177,val:+11,+cov rename to src/exchange/afl-tests/id:000487,src:000000,op:arith8,pos:177,val:+11,+cov diff --git a/src/mint/afl-tests/id:000487,src:000000,op:arith8,pos:319,val:-7,+cov b/src/exchange/afl-tests/id:000487,src:000000,op:arith8,pos:319,val:-7,+cov similarity index 100% rename from src/mint/afl-tests/id:000487,src:000000,op:arith8,pos:319,val:-7,+cov rename to src/exchange/afl-tests/id:000487,src:000000,op:arith8,pos:319,val:-7,+cov diff --git a/src/mint/afl-tests/id:000488,src:000000,op:arith8,pos:177,val:+17,+cov b/src/exchange/afl-tests/id:000488,src:000000,op:arith8,pos:177,val:+17,+cov similarity index 100% rename from src/mint/afl-tests/id:000488,src:000000,op:arith8,pos:177,val:+17,+cov rename to src/exchange/afl-tests/id:000488,src:000000,op:arith8,pos:177,val:+17,+cov diff --git a/src/mint/afl-tests/id:000488,src:000000,op:arith8,pos:319,val:+9,+cov b/src/exchange/afl-tests/id:000488,src:000000,op:arith8,pos:319,val:+9,+cov similarity index 100% rename from src/mint/afl-tests/id:000488,src:000000,op:arith8,pos:319,val:+9,+cov rename to src/exchange/afl-tests/id:000488,src:000000,op:arith8,pos:319,val:+9,+cov diff --git a/src/mint/afl-tests/id:000489,src:000000,op:arith8,pos:177,val:+22,+cov b/src/exchange/afl-tests/id:000489,src:000000,op:arith8,pos:177,val:+22,+cov similarity index 100% rename from src/mint/afl-tests/id:000489,src:000000,op:arith8,pos:177,val:+22,+cov rename to src/exchange/afl-tests/id:000489,src:000000,op:arith8,pos:177,val:+22,+cov diff --git a/src/mint/afl-tests/id:000489,src:000000,op:arith8,pos:320,val:-7,+cov b/src/exchange/afl-tests/id:000489,src:000000,op:arith8,pos:320,val:-7,+cov similarity index 100% rename from src/mint/afl-tests/id:000489,src:000000,op:arith8,pos:320,val:-7,+cov rename to src/exchange/afl-tests/id:000489,src:000000,op:arith8,pos:320,val:-7,+cov diff --git a/src/mint/afl-tests/id:000490,src:000000,op:arith8,pos:178,val:-5,+cov b/src/exchange/afl-tests/id:000490,src:000000,op:arith8,pos:178,val:-5,+cov similarity index 100% rename from src/mint/afl-tests/id:000490,src:000000,op:arith8,pos:178,val:-5,+cov rename to src/exchange/afl-tests/id:000490,src:000000,op:arith8,pos:178,val:-5,+cov diff --git a/src/mint/afl-tests/id:000490,src:000000,op:arith8,pos:320,val:-25,+cov b/src/exchange/afl-tests/id:000490,src:000000,op:arith8,pos:320,val:-25,+cov similarity index 100% rename from src/mint/afl-tests/id:000490,src:000000,op:arith8,pos:320,val:-25,+cov rename to src/exchange/afl-tests/id:000490,src:000000,op:arith8,pos:320,val:-25,+cov diff --git a/src/mint/afl-tests/id:000491,src:000000,op:arith8,pos:178,val:+23,+cov b/src/exchange/afl-tests/id:000491,src:000000,op:arith8,pos:178,val:+23,+cov similarity index 100% rename from src/mint/afl-tests/id:000491,src:000000,op:arith8,pos:178,val:+23,+cov rename to src/exchange/afl-tests/id:000491,src:000000,op:arith8,pos:178,val:+23,+cov diff --git a/src/mint/afl-tests/id:000491,src:000000,op:arith8,pos:321,val:+11,+cov b/src/exchange/afl-tests/id:000491,src:000000,op:arith8,pos:321,val:+11,+cov similarity index 100% rename from src/mint/afl-tests/id:000491,src:000000,op:arith8,pos:321,val:+11,+cov rename to src/exchange/afl-tests/id:000491,src:000000,op:arith8,pos:321,val:+11,+cov diff --git a/src/mint/afl-tests/id:000492,src:000000,op:arith8,pos:181,val:-12,+cov b/src/exchange/afl-tests/id:000492,src:000000,op:arith8,pos:181,val:-12,+cov similarity index 100% rename from src/mint/afl-tests/id:000492,src:000000,op:arith8,pos:181,val:-12,+cov rename to src/exchange/afl-tests/id:000492,src:000000,op:arith8,pos:181,val:-12,+cov diff --git a/src/mint/afl-tests/id:000492,src:000000,op:arith8,pos:321,val:-24,+cov b/src/exchange/afl-tests/id:000492,src:000000,op:arith8,pos:321,val:-24,+cov similarity index 100% rename from src/mint/afl-tests/id:000492,src:000000,op:arith8,pos:321,val:-24,+cov rename to src/exchange/afl-tests/id:000492,src:000000,op:arith8,pos:321,val:-24,+cov diff --git a/src/mint/afl-tests/id:000493,src:000000,op:arith8,pos:182,val:-15,+cov b/src/exchange/afl-tests/id:000493,src:000000,op:arith8,pos:182,val:-15,+cov similarity index 100% rename from src/mint/afl-tests/id:000493,src:000000,op:arith8,pos:182,val:-15,+cov rename to src/exchange/afl-tests/id:000493,src:000000,op:arith8,pos:182,val:-15,+cov diff --git a/src/mint/afl-tests/id:000493,src:000000,op:arith8,pos:322,val:-21,+cov b/src/exchange/afl-tests/id:000493,src:000000,op:arith8,pos:322,val:-21,+cov similarity index 100% rename from src/mint/afl-tests/id:000493,src:000000,op:arith8,pos:322,val:-21,+cov rename to src/exchange/afl-tests/id:000493,src:000000,op:arith8,pos:322,val:-21,+cov diff --git a/src/mint/afl-tests/id:000494,src:000000,op:arith8,pos:182,val:+22,+cov b/src/exchange/afl-tests/id:000494,src:000000,op:arith8,pos:182,val:+22,+cov similarity index 100% rename from src/mint/afl-tests/id:000494,src:000000,op:arith8,pos:182,val:+22,+cov rename to src/exchange/afl-tests/id:000494,src:000000,op:arith8,pos:182,val:+22,+cov diff --git a/src/mint/afl-tests/id:000494,src:000000,op:arith8,pos:326,val:-20,+cov b/src/exchange/afl-tests/id:000494,src:000000,op:arith8,pos:326,val:-20,+cov similarity index 100% rename from src/mint/afl-tests/id:000494,src:000000,op:arith8,pos:326,val:-20,+cov rename to src/exchange/afl-tests/id:000494,src:000000,op:arith8,pos:326,val:-20,+cov diff --git a/src/mint/afl-tests/id:000495,src:000000,op:arith8,pos:183,val:-11 b/src/exchange/afl-tests/id:000495,src:000000,op:arith8,pos:183,val:-11 similarity index 100% rename from src/mint/afl-tests/id:000495,src:000000,op:arith8,pos:183,val:-11 rename to src/exchange/afl-tests/id:000495,src:000000,op:arith8,pos:183,val:-11 diff --git a/src/mint/afl-tests/id:000495,src:000000,op:arith8,pos:328,val:+27,+cov b/src/exchange/afl-tests/id:000495,src:000000,op:arith8,pos:328,val:+27,+cov similarity index 100% rename from src/mint/afl-tests/id:000495,src:000000,op:arith8,pos:328,val:+27,+cov rename to src/exchange/afl-tests/id:000495,src:000000,op:arith8,pos:328,val:+27,+cov diff --git a/src/mint/afl-tests/id:000496,src:000000,op:arith8,pos:183,val:+15,+cov b/src/exchange/afl-tests/id:000496,src:000000,op:arith8,pos:183,val:+15,+cov similarity index 100% rename from src/mint/afl-tests/id:000496,src:000000,op:arith8,pos:183,val:+15,+cov rename to src/exchange/afl-tests/id:000496,src:000000,op:arith8,pos:183,val:+15,+cov diff --git a/src/mint/afl-tests/id:000496,src:000000,op:arith8,pos:328,val:-27,+cov b/src/exchange/afl-tests/id:000496,src:000000,op:arith8,pos:328,val:-27,+cov similarity index 100% rename from src/mint/afl-tests/id:000496,src:000000,op:arith8,pos:328,val:-27,+cov rename to src/exchange/afl-tests/id:000496,src:000000,op:arith8,pos:328,val:-27,+cov diff --git a/src/mint/afl-tests/id:000497,src:000000,op:arith8,pos:184,val:-14,+cov b/src/exchange/afl-tests/id:000497,src:000000,op:arith8,pos:184,val:-14,+cov similarity index 100% rename from src/mint/afl-tests/id:000497,src:000000,op:arith8,pos:184,val:-14,+cov rename to src/exchange/afl-tests/id:000497,src:000000,op:arith8,pos:184,val:-14,+cov diff --git a/src/mint/afl-tests/id:000497,src:000000,op:arith8,pos:329,val:+5,+cov b/src/exchange/afl-tests/id:000497,src:000000,op:arith8,pos:329,val:+5,+cov similarity index 100% rename from src/mint/afl-tests/id:000497,src:000000,op:arith8,pos:329,val:+5,+cov rename to src/exchange/afl-tests/id:000497,src:000000,op:arith8,pos:329,val:+5,+cov diff --git a/src/mint/afl-tests/id:000498,src:000000,op:arith8,pos:184,val:+33,+cov b/src/exchange/afl-tests/id:000498,src:000000,op:arith8,pos:184,val:+33,+cov similarity index 100% rename from src/mint/afl-tests/id:000498,src:000000,op:arith8,pos:184,val:+33,+cov rename to src/exchange/afl-tests/id:000498,src:000000,op:arith8,pos:184,val:+33,+cov diff --git a/src/mint/afl-tests/id:000498,src:000000,op:arith8,pos:329,val:-24,+cov b/src/exchange/afl-tests/id:000498,src:000000,op:arith8,pos:329,val:-24,+cov similarity index 100% rename from src/mint/afl-tests/id:000498,src:000000,op:arith8,pos:329,val:-24,+cov rename to src/exchange/afl-tests/id:000498,src:000000,op:arith8,pos:329,val:-24,+cov diff --git a/src/mint/afl-tests/id:000499,src:000000,op:arith8,pos:184,val:-35,+cov b/src/exchange/afl-tests/id:000499,src:000000,op:arith8,pos:184,val:-35,+cov similarity index 100% rename from src/mint/afl-tests/id:000499,src:000000,op:arith8,pos:184,val:-35,+cov rename to src/exchange/afl-tests/id:000499,src:000000,op:arith8,pos:184,val:-35,+cov diff --git a/src/mint/afl-tests/id:000499,src:000000,op:arith8,pos:330,val:-3,+cov b/src/exchange/afl-tests/id:000499,src:000000,op:arith8,pos:330,val:-3,+cov similarity index 100% rename from src/mint/afl-tests/id:000499,src:000000,op:arith8,pos:330,val:-3,+cov rename to src/exchange/afl-tests/id:000499,src:000000,op:arith8,pos:330,val:-3,+cov diff --git a/src/mint/afl-tests/id:000500,src:000000,op:arith8,pos:185,val:+3,+cov b/src/exchange/afl-tests/id:000500,src:000000,op:arith8,pos:185,val:+3,+cov similarity index 100% rename from src/mint/afl-tests/id:000500,src:000000,op:arith8,pos:185,val:+3,+cov rename to src/exchange/afl-tests/id:000500,src:000000,op:arith8,pos:185,val:+3,+cov diff --git a/src/mint/afl-tests/id:000500,src:000000,op:arith8,pos:331,val:-14,+cov b/src/exchange/afl-tests/id:000500,src:000000,op:arith8,pos:331,val:-14,+cov similarity index 100% rename from src/mint/afl-tests/id:000500,src:000000,op:arith8,pos:331,val:-14,+cov rename to src/exchange/afl-tests/id:000500,src:000000,op:arith8,pos:331,val:-14,+cov diff --git a/src/mint/afl-tests/id:000501,src:000000,op:arith8,pos:185,val:+7,+cov b/src/exchange/afl-tests/id:000501,src:000000,op:arith8,pos:185,val:+7,+cov similarity index 100% rename from src/mint/afl-tests/id:000501,src:000000,op:arith8,pos:185,val:+7,+cov rename to src/exchange/afl-tests/id:000501,src:000000,op:arith8,pos:185,val:+7,+cov diff --git a/src/mint/afl-tests/id:000501,src:000000,op:arith8,pos:332,val:-15,+cov b/src/exchange/afl-tests/id:000501,src:000000,op:arith8,pos:332,val:-15,+cov similarity index 100% rename from src/mint/afl-tests/id:000501,src:000000,op:arith8,pos:332,val:-15,+cov rename to src/exchange/afl-tests/id:000501,src:000000,op:arith8,pos:332,val:-15,+cov diff --git a/src/mint/afl-tests/id:000502,src:000000,op:arith16,pos:33,val:-12,+cov b/src/exchange/afl-tests/id:000502,src:000000,op:arith16,pos:33,val:-12,+cov similarity index 100% rename from src/mint/afl-tests/id:000502,src:000000,op:arith16,pos:33,val:-12,+cov rename to src/exchange/afl-tests/id:000502,src:000000,op:arith16,pos:33,val:-12,+cov diff --git a/src/mint/afl-tests/id:000502,src:000000,op:arith8,pos:192,val:+9,+cov b/src/exchange/afl-tests/id:000502,src:000000,op:arith8,pos:192,val:+9,+cov similarity index 100% rename from src/mint/afl-tests/id:000502,src:000000,op:arith8,pos:192,val:+9,+cov rename to src/exchange/afl-tests/id:000502,src:000000,op:arith8,pos:192,val:+9,+cov diff --git a/src/mint/afl-tests/id:000503,src:000000,op:arith16,pos:65,val:be:-27,+cov b/src/exchange/afl-tests/id:000503,src:000000,op:arith16,pos:65,val:be:-27,+cov similarity index 100% rename from src/mint/afl-tests/id:000503,src:000000,op:arith16,pos:65,val:be:-27,+cov rename to src/exchange/afl-tests/id:000503,src:000000,op:arith16,pos:65,val:be:-27,+cov diff --git a/src/mint/afl-tests/id:000503,src:000000,op:arith8,pos:237,val:-26,+cov b/src/exchange/afl-tests/id:000503,src:000000,op:arith8,pos:237,val:-26,+cov similarity index 100% rename from src/mint/afl-tests/id:000503,src:000000,op:arith8,pos:237,val:-26,+cov rename to src/exchange/afl-tests/id:000503,src:000000,op:arith8,pos:237,val:-26,+cov diff --git a/src/mint/afl-tests/id:000504,src:000000,op:arith8,pos:238,val:+5,+cov b/src/exchange/afl-tests/id:000504,src:000000,op:arith8,pos:238,val:+5,+cov similarity index 100% rename from src/mint/afl-tests/id:000504,src:000000,op:arith8,pos:238,val:+5,+cov rename to src/exchange/afl-tests/id:000504,src:000000,op:arith8,pos:238,val:+5,+cov diff --git a/src/mint/afl-tests/id:000504,src:000000,op:int8,pos:6,val:+0 b/src/exchange/afl-tests/id:000504,src:000000,op:int8,pos:6,val:+0 similarity index 100% rename from src/mint/afl-tests/id:000504,src:000000,op:int8,pos:6,val:+0 rename to src/exchange/afl-tests/id:000504,src:000000,op:int8,pos:6,val:+0 diff --git a/src/mint/afl-tests/id:000505,src:000000,op:arith8,pos:241,val:+7,+cov b/src/exchange/afl-tests/id:000505,src:000000,op:arith8,pos:241,val:+7,+cov similarity index 100% rename from src/mint/afl-tests/id:000505,src:000000,op:arith8,pos:241,val:+7,+cov rename to src/exchange/afl-tests/id:000505,src:000000,op:arith8,pos:241,val:+7,+cov diff --git a/src/mint/afl-tests/id:000505,src:000000,op:int8,pos:7,val:+0 b/src/exchange/afl-tests/id:000505,src:000000,op:int8,pos:7,val:+0 similarity index 100% rename from src/mint/afl-tests/id:000505,src:000000,op:int8,pos:7,val:+0 rename to src/exchange/afl-tests/id:000505,src:000000,op:int8,pos:7,val:+0 diff --git a/src/mint/afl-tests/id:000506,src:000000,op:arith8,pos:268,val:-4,+cov b/src/exchange/afl-tests/id:000506,src:000000,op:arith8,pos:268,val:-4,+cov similarity index 100% rename from src/mint/afl-tests/id:000506,src:000000,op:arith8,pos:268,val:-4,+cov rename to src/exchange/afl-tests/id:000506,src:000000,op:arith8,pos:268,val:-4,+cov diff --git a/src/mint/afl-tests/id:000506,src:000000,op:int8,pos:9,val:+0 b/src/exchange/afl-tests/id:000506,src:000000,op:int8,pos:9,val:+0 similarity index 100% rename from src/mint/afl-tests/id:000506,src:000000,op:int8,pos:9,val:+0 rename to src/exchange/afl-tests/id:000506,src:000000,op:int8,pos:9,val:+0 diff --git a/src/mint/afl-tests/id:000507,src:000000,op:arith8,pos:269,val:+19,+cov b/src/exchange/afl-tests/id:000507,src:000000,op:arith8,pos:269,val:+19,+cov similarity index 100% rename from src/mint/afl-tests/id:000507,src:000000,op:arith8,pos:269,val:+19,+cov rename to src/exchange/afl-tests/id:000507,src:000000,op:arith8,pos:269,val:+19,+cov diff --git a/src/mint/afl-tests/id:000507,src:000000,op:int8,pos:26,val:+32,+cov b/src/exchange/afl-tests/id:000507,src:000000,op:int8,pos:26,val:+32,+cov similarity index 100% rename from src/mint/afl-tests/id:000507,src:000000,op:int8,pos:26,val:+32,+cov rename to src/exchange/afl-tests/id:000507,src:000000,op:int8,pos:26,val:+32,+cov diff --git a/src/mint/afl-tests/id:000508,src:000000,op:arith8,pos:271,val:-12,+cov b/src/exchange/afl-tests/id:000508,src:000000,op:arith8,pos:271,val:-12,+cov similarity index 100% rename from src/mint/afl-tests/id:000508,src:000000,op:arith8,pos:271,val:-12,+cov rename to src/exchange/afl-tests/id:000508,src:000000,op:arith8,pos:271,val:-12,+cov diff --git a/src/mint/afl-tests/id:000508,src:000000,op:int8,pos:27,val:+127,+cov b/src/exchange/afl-tests/id:000508,src:000000,op:int8,pos:27,val:+127,+cov similarity index 100% rename from src/mint/afl-tests/id:000508,src:000000,op:int8,pos:27,val:+127,+cov rename to src/exchange/afl-tests/id:000508,src:000000,op:int8,pos:27,val:+127,+cov diff --git a/src/mint/afl-tests/id:000509,src:000000,op:arith8,pos:272,val:+7,+cov b/src/exchange/afl-tests/id:000509,src:000000,op:arith8,pos:272,val:+7,+cov similarity index 100% rename from src/mint/afl-tests/id:000509,src:000000,op:arith8,pos:272,val:+7,+cov rename to src/exchange/afl-tests/id:000509,src:000000,op:arith8,pos:272,val:+7,+cov diff --git a/src/mint/afl-tests/id:000509,src:000000,op:int8,pos:34,val:+0,+cov b/src/exchange/afl-tests/id:000509,src:000000,op:int8,pos:34,val:+0,+cov similarity index 100% rename from src/mint/afl-tests/id:000509,src:000000,op:int8,pos:34,val:+0,+cov rename to src/exchange/afl-tests/id:000509,src:000000,op:int8,pos:34,val:+0,+cov diff --git a/src/mint/afl-tests/id:000510,src:000000,op:arith8,pos:274,val:+11,+cov b/src/exchange/afl-tests/id:000510,src:000000,op:arith8,pos:274,val:+11,+cov similarity index 100% rename from src/mint/afl-tests/id:000510,src:000000,op:arith8,pos:274,val:+11,+cov rename to src/exchange/afl-tests/id:000510,src:000000,op:arith8,pos:274,val:+11,+cov diff --git a/src/mint/afl-tests/id:000510,src:000000,op:int8,pos:40,val:+0,+cov b/src/exchange/afl-tests/id:000510,src:000000,op:int8,pos:40,val:+0,+cov similarity index 100% rename from src/mint/afl-tests/id:000510,src:000000,op:int8,pos:40,val:+0,+cov rename to src/exchange/afl-tests/id:000510,src:000000,op:int8,pos:40,val:+0,+cov diff --git a/src/mint/afl-tests/id:000511,src:000000,op:arith8,pos:274,val:+25,+cov b/src/exchange/afl-tests/id:000511,src:000000,op:arith8,pos:274,val:+25,+cov similarity index 100% rename from src/mint/afl-tests/id:000511,src:000000,op:arith8,pos:274,val:+25,+cov rename to src/exchange/afl-tests/id:000511,src:000000,op:arith8,pos:274,val:+25,+cov diff --git a/src/mint/afl-tests/id:000511,src:000000,op:int8,pos:40,val:+32 b/src/exchange/afl-tests/id:000511,src:000000,op:int8,pos:40,val:+32 similarity index 100% rename from src/mint/afl-tests/id:000511,src:000000,op:int8,pos:40,val:+32 rename to src/exchange/afl-tests/id:000511,src:000000,op:int8,pos:40,val:+32 diff --git a/src/mint/afl-tests/id:000512,src:000000,op:arith8,pos:275,val:-11,+cov b/src/exchange/afl-tests/id:000512,src:000000,op:arith8,pos:275,val:-11,+cov similarity index 100% rename from src/mint/afl-tests/id:000512,src:000000,op:arith8,pos:275,val:-11,+cov rename to src/exchange/afl-tests/id:000512,src:000000,op:arith8,pos:275,val:-11,+cov diff --git a/src/mint/afl-tests/id:000512,src:000000,op:int8,pos:46,val:+1,+cov b/src/exchange/afl-tests/id:000512,src:000000,op:int8,pos:46,val:+1,+cov similarity index 100% rename from src/mint/afl-tests/id:000512,src:000000,op:int8,pos:46,val:+1,+cov rename to src/exchange/afl-tests/id:000512,src:000000,op:int8,pos:46,val:+1,+cov diff --git a/src/mint/afl-tests/id:000513,src:000000,op:arith8,pos:275,val:-12,+cov b/src/exchange/afl-tests/id:000513,src:000000,op:arith8,pos:275,val:-12,+cov similarity index 100% rename from src/mint/afl-tests/id:000513,src:000000,op:arith8,pos:275,val:-12,+cov rename to src/exchange/afl-tests/id:000513,src:000000,op:arith8,pos:275,val:-12,+cov diff --git a/src/mint/afl-tests/id:000513,src:000000,op:int8,pos:51,val:+1 b/src/exchange/afl-tests/id:000513,src:000000,op:int8,pos:51,val:+1 similarity index 100% rename from src/mint/afl-tests/id:000513,src:000000,op:int8,pos:51,val:+1 rename to src/exchange/afl-tests/id:000513,src:000000,op:int8,pos:51,val:+1 diff --git a/src/mint/afl-tests/id:000514,src:000000,op:arith8,pos:275,val:+27,+cov b/src/exchange/afl-tests/id:000514,src:000000,op:arith8,pos:275,val:+27,+cov similarity index 100% rename from src/mint/afl-tests/id:000514,src:000000,op:arith8,pos:275,val:+27,+cov rename to src/exchange/afl-tests/id:000514,src:000000,op:arith8,pos:275,val:+27,+cov diff --git a/src/mint/afl-tests/id:000514,src:000000,op:int8,pos:52,val:-128,+cov b/src/exchange/afl-tests/id:000514,src:000000,op:int8,pos:52,val:-128,+cov similarity index 100% rename from src/mint/afl-tests/id:000514,src:000000,op:int8,pos:52,val:-128,+cov rename to src/exchange/afl-tests/id:000514,src:000000,op:int8,pos:52,val:-128,+cov diff --git a/src/mint/afl-tests/id:000515,src:000000,op:arith8,pos:277,val:-10,+cov b/src/exchange/afl-tests/id:000515,src:000000,op:arith8,pos:277,val:-10,+cov similarity index 100% rename from src/mint/afl-tests/id:000515,src:000000,op:arith8,pos:277,val:-10,+cov rename to src/exchange/afl-tests/id:000515,src:000000,op:arith8,pos:277,val:-10,+cov diff --git a/src/mint/afl-tests/id:000515,src:000000,op:int8,pos:53,val:-1,+cov b/src/exchange/afl-tests/id:000515,src:000000,op:int8,pos:53,val:-1,+cov similarity index 100% rename from src/mint/afl-tests/id:000515,src:000000,op:int8,pos:53,val:-1,+cov rename to src/exchange/afl-tests/id:000515,src:000000,op:int8,pos:53,val:-1,+cov diff --git a/src/mint/afl-tests/id:000516,src:000000,op:arith8,pos:277,val:+35,+cov b/src/exchange/afl-tests/id:000516,src:000000,op:arith8,pos:277,val:+35,+cov similarity index 100% rename from src/mint/afl-tests/id:000516,src:000000,op:arith8,pos:277,val:+35,+cov rename to src/exchange/afl-tests/id:000516,src:000000,op:arith8,pos:277,val:+35,+cov diff --git a/src/mint/afl-tests/id:000516,src:000000,op:int8,pos:69,val:+32,+cov b/src/exchange/afl-tests/id:000516,src:000000,op:int8,pos:69,val:+32,+cov similarity index 100% rename from src/mint/afl-tests/id:000516,src:000000,op:int8,pos:69,val:+32,+cov rename to src/exchange/afl-tests/id:000516,src:000000,op:int8,pos:69,val:+32,+cov diff --git a/src/mint/afl-tests/id:000517,src:000000,op:arith8,pos:279,val:+28,+cov b/src/exchange/afl-tests/id:000517,src:000000,op:arith8,pos:279,val:+28,+cov similarity index 100% rename from src/mint/afl-tests/id:000517,src:000000,op:arith8,pos:279,val:+28,+cov rename to src/exchange/afl-tests/id:000517,src:000000,op:arith8,pos:279,val:+28,+cov diff --git a/src/mint/afl-tests/id:000517,src:000000,op:int8,pos:70,val:+32,+cov b/src/exchange/afl-tests/id:000517,src:000000,op:int8,pos:70,val:+32,+cov similarity index 100% rename from src/mint/afl-tests/id:000517,src:000000,op:int8,pos:70,val:+32,+cov rename to src/exchange/afl-tests/id:000517,src:000000,op:int8,pos:70,val:+32,+cov diff --git a/src/mint/afl-tests/id:000518,src:000000,op:arith8,pos:290,val:-28,+cov b/src/exchange/afl-tests/id:000518,src:000000,op:arith8,pos:290,val:-28,+cov similarity index 100% rename from src/mint/afl-tests/id:000518,src:000000,op:arith8,pos:290,val:-28,+cov rename to src/exchange/afl-tests/id:000518,src:000000,op:arith8,pos:290,val:-28,+cov diff --git a/src/mint/afl-tests/id:000518,src:000000,op:int8,pos:71,val:+64,+cov b/src/exchange/afl-tests/id:000518,src:000000,op:int8,pos:71,val:+64,+cov similarity index 100% rename from src/mint/afl-tests/id:000518,src:000000,op:int8,pos:71,val:+64,+cov rename to src/exchange/afl-tests/id:000518,src:000000,op:int8,pos:71,val:+64,+cov diff --git a/src/mint/afl-tests/id:000519,src:000000,op:arith8,pos:305,val:-3,+cov b/src/exchange/afl-tests/id:000519,src:000000,op:arith8,pos:305,val:-3,+cov similarity index 100% rename from src/mint/afl-tests/id:000519,src:000000,op:arith8,pos:305,val:-3,+cov rename to src/exchange/afl-tests/id:000519,src:000000,op:arith8,pos:305,val:-3,+cov diff --git a/src/mint/afl-tests/id:000519,src:000000,op:int8,pos:74,val:-1,+cov b/src/exchange/afl-tests/id:000519,src:000000,op:int8,pos:74,val:-1,+cov similarity index 100% rename from src/mint/afl-tests/id:000519,src:000000,op:int8,pos:74,val:-1,+cov rename to src/exchange/afl-tests/id:000519,src:000000,op:int8,pos:74,val:-1,+cov diff --git a/src/mint/afl-tests/id:000520,src:000000,op:arith8,pos:306,val:+7,+cov b/src/exchange/afl-tests/id:000520,src:000000,op:arith8,pos:306,val:+7,+cov similarity index 100% rename from src/mint/afl-tests/id:000520,src:000000,op:arith8,pos:306,val:+7,+cov rename to src/exchange/afl-tests/id:000520,src:000000,op:arith8,pos:306,val:+7,+cov diff --git a/src/mint/afl-tests/id:000520,src:000000,op:int8,pos:115,val:+0,+cov b/src/exchange/afl-tests/id:000520,src:000000,op:int8,pos:115,val:+0,+cov similarity index 100% rename from src/mint/afl-tests/id:000520,src:000000,op:int8,pos:115,val:+0,+cov rename to src/exchange/afl-tests/id:000520,src:000000,op:int8,pos:115,val:+0,+cov diff --git a/src/mint/afl-tests/id:000521,src:000000,op:arith8,pos:306,val:-12,+cov b/src/exchange/afl-tests/id:000521,src:000000,op:arith8,pos:306,val:-12,+cov similarity index 100% rename from src/mint/afl-tests/id:000521,src:000000,op:arith8,pos:306,val:-12,+cov rename to src/exchange/afl-tests/id:000521,src:000000,op:arith8,pos:306,val:-12,+cov diff --git a/src/mint/afl-tests/id:000521,src:000000,op:int8,pos:188,val:+1,+cov b/src/exchange/afl-tests/id:000521,src:000000,op:int8,pos:188,val:+1,+cov similarity index 100% rename from src/mint/afl-tests/id:000521,src:000000,op:int8,pos:188,val:+1,+cov rename to src/exchange/afl-tests/id:000521,src:000000,op:int8,pos:188,val:+1,+cov diff --git a/src/mint/afl-tests/id:000522,src:000000,op:arith8,pos:306,val:+20,+cov b/src/exchange/afl-tests/id:000522,src:000000,op:arith8,pos:306,val:+20,+cov similarity index 100% rename from src/mint/afl-tests/id:000522,src:000000,op:arith8,pos:306,val:+20,+cov rename to src/exchange/afl-tests/id:000522,src:000000,op:arith8,pos:306,val:+20,+cov diff --git a/src/mint/afl-tests/id:000522,src:000000,op:int8,pos:276,val:+100,+cov b/src/exchange/afl-tests/id:000522,src:000000,op:int8,pos:276,val:+100,+cov similarity index 100% rename from src/mint/afl-tests/id:000522,src:000000,op:int8,pos:276,val:+100,+cov rename to src/exchange/afl-tests/id:000522,src:000000,op:int8,pos:276,val:+100,+cov diff --git a/src/mint/afl-tests/id:000523,src:000000,op:arith8,pos:307,val:+13,+cov b/src/exchange/afl-tests/id:000523,src:000000,op:arith8,pos:307,val:+13,+cov similarity index 100% rename from src/mint/afl-tests/id:000523,src:000000,op:arith8,pos:307,val:+13,+cov rename to src/exchange/afl-tests/id:000523,src:000000,op:arith8,pos:307,val:+13,+cov diff --git a/src/mint/afl-tests/id:000523,src:000000,op:int8,pos:307,val:+32,+cov b/src/exchange/afl-tests/id:000523,src:000000,op:int8,pos:307,val:+32,+cov similarity index 100% rename from src/mint/afl-tests/id:000523,src:000000,op:int8,pos:307,val:+32,+cov rename to src/exchange/afl-tests/id:000523,src:000000,op:int8,pos:307,val:+32,+cov diff --git a/src/mint/afl-tests/id:000524,src:000000,op:arith8,pos:308,val:+19,+cov b/src/exchange/afl-tests/id:000524,src:000000,op:arith8,pos:308,val:+19,+cov similarity index 100% rename from src/mint/afl-tests/id:000524,src:000000,op:arith8,pos:308,val:+19,+cov rename to src/exchange/afl-tests/id:000524,src:000000,op:arith8,pos:308,val:+19,+cov diff --git a/src/mint/afl-tests/id:000524,src:000000,op:int8,pos:313,val:+64,+cov b/src/exchange/afl-tests/id:000524,src:000000,op:int8,pos:313,val:+64,+cov similarity index 100% rename from src/mint/afl-tests/id:000524,src:000000,op:int8,pos:313,val:+64,+cov rename to src/exchange/afl-tests/id:000524,src:000000,op:int8,pos:313,val:+64,+cov diff --git a/src/mint/afl-tests/id:000525,src:000000,op:arith8,pos:308,val:-27,+cov b/src/exchange/afl-tests/id:000525,src:000000,op:arith8,pos:308,val:-27,+cov similarity index 100% rename from src/mint/afl-tests/id:000525,src:000000,op:arith8,pos:308,val:-27,+cov rename to src/exchange/afl-tests/id:000525,src:000000,op:arith8,pos:308,val:-27,+cov diff --git a/src/mint/afl-tests/id:000525,src:000000,op:int8,pos:314,val:-1,+cov b/src/exchange/afl-tests/id:000525,src:000000,op:int8,pos:314,val:-1,+cov similarity index 100% rename from src/mint/afl-tests/id:000525,src:000000,op:int8,pos:314,val:-1,+cov rename to src/exchange/afl-tests/id:000525,src:000000,op:int8,pos:314,val:-1,+cov diff --git a/src/mint/afl-tests/id:000526,src:000000,op:arith8,pos:312,val:+3,+cov b/src/exchange/afl-tests/id:000526,src:000000,op:arith8,pos:312,val:+3,+cov similarity index 100% rename from src/mint/afl-tests/id:000526,src:000000,op:arith8,pos:312,val:+3,+cov rename to src/exchange/afl-tests/id:000526,src:000000,op:arith8,pos:312,val:+3,+cov diff --git a/src/mint/afl-tests/id:000526,src:000000,op:int8,pos:322,val:+32,+cov b/src/exchange/afl-tests/id:000526,src:000000,op:int8,pos:322,val:+32,+cov similarity index 100% rename from src/mint/afl-tests/id:000526,src:000000,op:int8,pos:322,val:+32,+cov rename to src/exchange/afl-tests/id:000526,src:000000,op:int8,pos:322,val:+32,+cov diff --git a/src/mint/afl-tests/id:000527,src:000000,op:arith8,pos:312,val:+5,+cov b/src/exchange/afl-tests/id:000527,src:000000,op:arith8,pos:312,val:+5,+cov similarity index 100% rename from src/mint/afl-tests/id:000527,src:000000,op:arith8,pos:312,val:+5,+cov rename to src/exchange/afl-tests/id:000527,src:000000,op:arith8,pos:312,val:+5,+cov diff --git a/src/mint/afl-tests/id:000527,src:000000,op:int16,pos:25,val:be:+100,+cov b/src/exchange/afl-tests/id:000527,src:000000,op:int16,pos:25,val:be:+100,+cov similarity index 100% rename from src/mint/afl-tests/id:000527,src:000000,op:int16,pos:25,val:be:+100,+cov rename to src/exchange/afl-tests/id:000527,src:000000,op:int16,pos:25,val:be:+100,+cov diff --git a/src/mint/afl-tests/id:000528,src:000000,op:arith8,pos:312,val:-11,+cov b/src/exchange/afl-tests/id:000528,src:000000,op:arith8,pos:312,val:-11,+cov similarity index 100% rename from src/mint/afl-tests/id:000528,src:000000,op:arith8,pos:312,val:-11,+cov rename to src/exchange/afl-tests/id:000528,src:000000,op:arith8,pos:312,val:-11,+cov diff --git a/src/mint/afl-tests/id:000528,src:000000,op:int16,pos:29,val:-1,+cov b/src/exchange/afl-tests/id:000528,src:000000,op:int16,pos:29,val:-1,+cov similarity index 100% rename from src/mint/afl-tests/id:000528,src:000000,op:int16,pos:29,val:-1,+cov rename to src/exchange/afl-tests/id:000528,src:000000,op:int16,pos:29,val:-1,+cov diff --git a/src/mint/afl-tests/id:000529,src:000000,op:arith8,pos:313,val:-33,+cov b/src/exchange/afl-tests/id:000529,src:000000,op:arith8,pos:313,val:-33,+cov similarity index 100% rename from src/mint/afl-tests/id:000529,src:000000,op:arith8,pos:313,val:-33,+cov rename to src/exchange/afl-tests/id:000529,src:000000,op:arith8,pos:313,val:-33,+cov diff --git a/src/mint/afl-tests/id:000529,src:000000,op:int16,pos:32,val:+32767,+cov b/src/exchange/afl-tests/id:000529,src:000000,op:int16,pos:32,val:+32767,+cov similarity index 100% rename from src/mint/afl-tests/id:000529,src:000000,op:int16,pos:32,val:+32767,+cov rename to src/exchange/afl-tests/id:000529,src:000000,op:int16,pos:32,val:+32767,+cov diff --git a/src/mint/afl-tests/id:000530,src:000000,op:arith8,pos:314,val:-3,+cov b/src/exchange/afl-tests/id:000530,src:000000,op:arith8,pos:314,val:-3,+cov similarity index 100% rename from src/mint/afl-tests/id:000530,src:000000,op:arith8,pos:314,val:-3,+cov rename to src/exchange/afl-tests/id:000530,src:000000,op:arith8,pos:314,val:-3,+cov diff --git a/src/mint/afl-tests/id:000530,src:000000,op:int16,pos:41,val:-128,+cov b/src/exchange/afl-tests/id:000530,src:000000,op:int16,pos:41,val:-128,+cov similarity index 100% rename from src/mint/afl-tests/id:000530,src:000000,op:int16,pos:41,val:-128,+cov rename to src/exchange/afl-tests/id:000530,src:000000,op:int16,pos:41,val:-128,+cov diff --git a/src/mint/afl-tests/id:000531,src:000000,op:arith8,pos:314,val:-25,+cov b/src/exchange/afl-tests/id:000531,src:000000,op:arith8,pos:314,val:-25,+cov similarity index 100% rename from src/mint/afl-tests/id:000531,src:000000,op:arith8,pos:314,val:-25,+cov rename to src/exchange/afl-tests/id:000531,src:000000,op:arith8,pos:314,val:-25,+cov diff --git a/src/mint/afl-tests/id:000531,src:000000,op:int16,pos:41,val:+32,+cov b/src/exchange/afl-tests/id:000531,src:000000,op:int16,pos:41,val:+32,+cov similarity index 100% rename from src/mint/afl-tests/id:000531,src:000000,op:int16,pos:41,val:+32,+cov rename to src/exchange/afl-tests/id:000531,src:000000,op:int16,pos:41,val:+32,+cov diff --git a/src/mint/afl-tests/id:000532,src:000000,op:arith8,pos:316,val:+20,+cov b/src/exchange/afl-tests/id:000532,src:000000,op:arith8,pos:316,val:+20,+cov similarity index 100% rename from src/mint/afl-tests/id:000532,src:000000,op:arith8,pos:316,val:+20,+cov rename to src/exchange/afl-tests/id:000532,src:000000,op:arith8,pos:316,val:+20,+cov diff --git a/src/mint/afl-tests/id:000532,src:000000,op:int16,pos:42,val:+64,+cov b/src/exchange/afl-tests/id:000532,src:000000,op:int16,pos:42,val:+64,+cov similarity index 100% rename from src/mint/afl-tests/id:000532,src:000000,op:int16,pos:42,val:+64,+cov rename to src/exchange/afl-tests/id:000532,src:000000,op:int16,pos:42,val:+64,+cov diff --git a/src/mint/afl-tests/id:000533,src:000000,op:arith8,pos:316,val:-23,+cov b/src/exchange/afl-tests/id:000533,src:000000,op:arith8,pos:316,val:-23,+cov similarity index 100% rename from src/mint/afl-tests/id:000533,src:000000,op:arith8,pos:316,val:-23,+cov rename to src/exchange/afl-tests/id:000533,src:000000,op:arith8,pos:316,val:-23,+cov diff --git a/src/mint/afl-tests/id:000533,src:000000,op:int16,pos:47,val:+128,+cov b/src/exchange/afl-tests/id:000533,src:000000,op:int16,pos:47,val:+128,+cov similarity index 100% rename from src/mint/afl-tests/id:000533,src:000000,op:int16,pos:47,val:+128,+cov rename to src/exchange/afl-tests/id:000533,src:000000,op:int16,pos:47,val:+128,+cov diff --git a/src/mint/afl-tests/id:000534,src:000000,op:arith8,pos:316,val:-28,+cov b/src/exchange/afl-tests/id:000534,src:000000,op:arith8,pos:316,val:-28,+cov similarity index 100% rename from src/mint/afl-tests/id:000534,src:000000,op:arith8,pos:316,val:-28,+cov rename to src/exchange/afl-tests/id:000534,src:000000,op:arith8,pos:316,val:-28,+cov diff --git a/src/mint/afl-tests/id:000534,src:000000,op:int16,pos:48,val:be:+1000,+cov b/src/exchange/afl-tests/id:000534,src:000000,op:int16,pos:48,val:be:+1000,+cov similarity index 100% rename from src/mint/afl-tests/id:000534,src:000000,op:int16,pos:48,val:be:+1000,+cov rename to src/exchange/afl-tests/id:000534,src:000000,op:int16,pos:48,val:be:+1000,+cov diff --git a/src/mint/afl-tests/id:000535,src:000000,op:arith8,pos:317,val:-31,+cov b/src/exchange/afl-tests/id:000535,src:000000,op:arith8,pos:317,val:-31,+cov similarity index 100% rename from src/mint/afl-tests/id:000535,src:000000,op:arith8,pos:317,val:-31,+cov rename to src/exchange/afl-tests/id:000535,src:000000,op:arith8,pos:317,val:-31,+cov diff --git a/src/mint/afl-tests/id:000535,src:000000,op:int16,pos:50,val:+16,+cov b/src/exchange/afl-tests/id:000535,src:000000,op:int16,pos:50,val:+16,+cov similarity index 100% rename from src/mint/afl-tests/id:000535,src:000000,op:int16,pos:50,val:+16,+cov rename to src/exchange/afl-tests/id:000535,src:000000,op:int16,pos:50,val:+16,+cov diff --git a/src/mint/afl-tests/id:000536,src:000000,op:arith8,pos:318,val:+23,+cov b/src/exchange/afl-tests/id:000536,src:000000,op:arith8,pos:318,val:+23,+cov similarity index 100% rename from src/mint/afl-tests/id:000536,src:000000,op:arith8,pos:318,val:+23,+cov rename to src/exchange/afl-tests/id:000536,src:000000,op:arith8,pos:318,val:+23,+cov diff --git a/src/mint/afl-tests/id:000536,src:000000,op:int16,pos:50,val:be:+1024,+cov b/src/exchange/afl-tests/id:000536,src:000000,op:int16,pos:50,val:be:+1024,+cov similarity index 100% rename from src/mint/afl-tests/id:000536,src:000000,op:int16,pos:50,val:be:+1024,+cov rename to src/exchange/afl-tests/id:000536,src:000000,op:int16,pos:50,val:be:+1024,+cov diff --git a/src/mint/afl-tests/id:000537,src:000000,op:arith8,pos:319,val:-12,+cov b/src/exchange/afl-tests/id:000537,src:000000,op:arith8,pos:319,val:-12,+cov similarity index 100% rename from src/mint/afl-tests/id:000537,src:000000,op:arith8,pos:319,val:-12,+cov rename to src/exchange/afl-tests/id:000537,src:000000,op:arith8,pos:319,val:-12,+cov diff --git a/src/mint/afl-tests/id:000537,src:000000,op:int16,pos:52,val:-129,+cov b/src/exchange/afl-tests/id:000537,src:000000,op:int16,pos:52,val:-129,+cov similarity index 100% rename from src/mint/afl-tests/id:000537,src:000000,op:int16,pos:52,val:-129,+cov rename to src/exchange/afl-tests/id:000537,src:000000,op:int16,pos:52,val:-129,+cov diff --git a/src/mint/afl-tests/id:000538,src:000000,op:arith8,pos:320,val:+17,+cov b/src/exchange/afl-tests/id:000538,src:000000,op:arith8,pos:320,val:+17,+cov similarity index 100% rename from src/mint/afl-tests/id:000538,src:000000,op:arith8,pos:320,val:+17,+cov rename to src/exchange/afl-tests/id:000538,src:000000,op:arith8,pos:320,val:+17,+cov diff --git a/src/mint/afl-tests/id:000538,src:000000,op:int16,pos:52,val:+128,+cov b/src/exchange/afl-tests/id:000538,src:000000,op:int16,pos:52,val:+128,+cov similarity index 100% rename from src/mint/afl-tests/id:000538,src:000000,op:int16,pos:52,val:+128,+cov rename to src/exchange/afl-tests/id:000538,src:000000,op:int16,pos:52,val:+128,+cov diff --git a/src/mint/afl-tests/id:000539,src:000000,op:arith8,pos:320,val:-31,+cov b/src/exchange/afl-tests/id:000539,src:000000,op:arith8,pos:320,val:-31,+cov similarity index 100% rename from src/mint/afl-tests/id:000539,src:000000,op:arith8,pos:320,val:-31,+cov rename to src/exchange/afl-tests/id:000539,src:000000,op:arith8,pos:320,val:-31,+cov diff --git a/src/mint/afl-tests/id:000539,src:000000,op:int16,pos:52,val:be:+255,+cov b/src/exchange/afl-tests/id:000539,src:000000,op:int16,pos:52,val:be:+255,+cov similarity index 100% rename from src/mint/afl-tests/id:000539,src:000000,op:int16,pos:52,val:be:+255,+cov rename to src/exchange/afl-tests/id:000539,src:000000,op:int16,pos:52,val:be:+255,+cov diff --git a/src/mint/afl-tests/id:000540,src:000000,op:arith8,pos:321,val:-34,+cov b/src/exchange/afl-tests/id:000540,src:000000,op:arith8,pos:321,val:-34,+cov similarity index 100% rename from src/mint/afl-tests/id:000540,src:000000,op:arith8,pos:321,val:-34,+cov rename to src/exchange/afl-tests/id:000540,src:000000,op:arith8,pos:321,val:-34,+cov diff --git a/src/mint/afl-tests/id:000540,src:000000,op:int16,pos:53,val:+0,+cov b/src/exchange/afl-tests/id:000540,src:000000,op:int16,pos:53,val:+0,+cov similarity index 100% rename from src/mint/afl-tests/id:000540,src:000000,op:int16,pos:53,val:+0,+cov rename to src/exchange/afl-tests/id:000540,src:000000,op:int16,pos:53,val:+0,+cov diff --git a/src/mint/afl-tests/id:000541,src:000000,op:arith8,pos:322,val:+3,+cov b/src/exchange/afl-tests/id:000541,src:000000,op:arith8,pos:322,val:+3,+cov similarity index 100% rename from src/mint/afl-tests/id:000541,src:000000,op:arith8,pos:322,val:+3,+cov rename to src/exchange/afl-tests/id:000541,src:000000,op:arith8,pos:322,val:+3,+cov diff --git a/src/mint/afl-tests/id:000541,src:000000,op:int16,pos:54,val:+1,+cov b/src/exchange/afl-tests/id:000541,src:000000,op:int16,pos:54,val:+1,+cov similarity index 100% rename from src/mint/afl-tests/id:000541,src:000000,op:int16,pos:54,val:+1,+cov rename to src/exchange/afl-tests/id:000541,src:000000,op:int16,pos:54,val:+1,+cov diff --git a/src/mint/afl-tests/id:000542,src:000000,op:arith8,pos:322,val:+7,+cov b/src/exchange/afl-tests/id:000542,src:000000,op:arith8,pos:322,val:+7,+cov similarity index 100% rename from src/mint/afl-tests/id:000542,src:000000,op:arith8,pos:322,val:+7,+cov rename to src/exchange/afl-tests/id:000542,src:000000,op:arith8,pos:322,val:+7,+cov diff --git a/src/mint/afl-tests/id:000542,src:000000,op:int16,pos:69,val:-129,+cov b/src/exchange/afl-tests/id:000542,src:000000,op:int16,pos:69,val:-129,+cov similarity index 100% rename from src/mint/afl-tests/id:000542,src:000000,op:int16,pos:69,val:-129,+cov rename to src/exchange/afl-tests/id:000542,src:000000,op:int16,pos:69,val:-129,+cov diff --git a/src/mint/afl-tests/id:000543,src:000000,op:arith8,pos:326,val:-9,+cov b/src/exchange/afl-tests/id:000543,src:000000,op:arith8,pos:326,val:-9,+cov similarity index 100% rename from src/mint/afl-tests/id:000543,src:000000,op:arith8,pos:326,val:-9,+cov rename to src/exchange/afl-tests/id:000543,src:000000,op:arith8,pos:326,val:-9,+cov diff --git a/src/mint/afl-tests/id:000543,src:000000,op:int16,pos:74,val:be:-128,+cov b/src/exchange/afl-tests/id:000543,src:000000,op:int16,pos:74,val:be:-128,+cov similarity index 100% rename from src/mint/afl-tests/id:000543,src:000000,op:int16,pos:74,val:be:-128,+cov rename to src/exchange/afl-tests/id:000543,src:000000,op:int16,pos:74,val:be:-128,+cov diff --git a/src/mint/afl-tests/id:000544,src:000000,op:arith8,pos:326,val:-31,+cov b/src/exchange/afl-tests/id:000544,src:000000,op:arith8,pos:326,val:-31,+cov similarity index 100% rename from src/mint/afl-tests/id:000544,src:000000,op:arith8,pos:326,val:-31,+cov rename to src/exchange/afl-tests/id:000544,src:000000,op:arith8,pos:326,val:-31,+cov diff --git a/src/mint/afl-tests/id:000544,src:000000,op:int16,pos:78,val:be:+127,+cov b/src/exchange/afl-tests/id:000544,src:000000,op:int16,pos:78,val:be:+127,+cov similarity index 100% rename from src/mint/afl-tests/id:000544,src:000000,op:int16,pos:78,val:be:+127,+cov rename to src/exchange/afl-tests/id:000544,src:000000,op:int16,pos:78,val:be:+127,+cov diff --git a/src/mint/afl-tests/id:000545,src:000000,op:arith8,pos:326,val:-35,+cov b/src/exchange/afl-tests/id:000545,src:000000,op:arith8,pos:326,val:-35,+cov similarity index 100% rename from src/mint/afl-tests/id:000545,src:000000,op:arith8,pos:326,val:-35,+cov rename to src/exchange/afl-tests/id:000545,src:000000,op:arith8,pos:326,val:-35,+cov diff --git a/src/mint/afl-tests/id:000545,src:000000,op:int16,pos:81,val:+32767,+cov b/src/exchange/afl-tests/id:000545,src:000000,op:int16,pos:81,val:+32767,+cov similarity index 100% rename from src/mint/afl-tests/id:000545,src:000000,op:int16,pos:81,val:+32767,+cov rename to src/exchange/afl-tests/id:000545,src:000000,op:int16,pos:81,val:+32767,+cov diff --git a/src/mint/afl-tests/id:000546,src:000000,op:arith8,pos:327,val:+5 b/src/exchange/afl-tests/id:000546,src:000000,op:arith8,pos:327,val:+5 similarity index 100% rename from src/mint/afl-tests/id:000546,src:000000,op:arith8,pos:327,val:+5 rename to src/exchange/afl-tests/id:000546,src:000000,op:arith8,pos:327,val:+5 diff --git a/src/mint/afl-tests/id:000546,src:000000,op:int16,pos:83,val:+127,+cov b/src/exchange/afl-tests/id:000546,src:000000,op:int16,pos:83,val:+127,+cov similarity index 100% rename from src/mint/afl-tests/id:000546,src:000000,op:int16,pos:83,val:+127,+cov rename to src/exchange/afl-tests/id:000546,src:000000,op:int16,pos:83,val:+127,+cov diff --git a/src/mint/afl-tests/id:000547,src:000000,op:arith8,pos:327,val:+7,+cov b/src/exchange/afl-tests/id:000547,src:000000,op:arith8,pos:327,val:+7,+cov similarity index 100% rename from src/mint/afl-tests/id:000547,src:000000,op:arith8,pos:327,val:+7,+cov rename to src/exchange/afl-tests/id:000547,src:000000,op:arith8,pos:327,val:+7,+cov diff --git a/src/mint/afl-tests/id:000547,src:000000,op:int16,pos:86,val:+4096,+cov b/src/exchange/afl-tests/id:000547,src:000000,op:int16,pos:86,val:+4096,+cov similarity index 100% rename from src/mint/afl-tests/id:000547,src:000000,op:int16,pos:86,val:+4096,+cov rename to src/exchange/afl-tests/id:000547,src:000000,op:int16,pos:86,val:+4096,+cov diff --git a/src/mint/afl-tests/id:000548,src:000000,op:arith8,pos:327,val:+11,+cov b/src/exchange/afl-tests/id:000548,src:000000,op:arith8,pos:327,val:+11,+cov similarity index 100% rename from src/mint/afl-tests/id:000548,src:000000,op:arith8,pos:327,val:+11,+cov rename to src/exchange/afl-tests/id:000548,src:000000,op:arith8,pos:327,val:+11,+cov diff --git a/src/mint/afl-tests/id:000548,src:000000,op:int16,pos:87,val:+16,+cov b/src/exchange/afl-tests/id:000548,src:000000,op:int16,pos:87,val:+16,+cov similarity index 100% rename from src/mint/afl-tests/id:000548,src:000000,op:int16,pos:87,val:+16,+cov rename to src/exchange/afl-tests/id:000548,src:000000,op:int16,pos:87,val:+16,+cov diff --git a/src/mint/afl-tests/id:000549,src:000000,op:arith8,pos:327,val:-24,+cov b/src/exchange/afl-tests/id:000549,src:000000,op:arith8,pos:327,val:-24,+cov similarity index 100% rename from src/mint/afl-tests/id:000549,src:000000,op:arith8,pos:327,val:-24,+cov rename to src/exchange/afl-tests/id:000549,src:000000,op:arith8,pos:327,val:-24,+cov diff --git a/src/mint/afl-tests/id:000549,src:000000,op:int16,pos:87,val:-32768,+cov b/src/exchange/afl-tests/id:000549,src:000000,op:int16,pos:87,val:-32768,+cov similarity index 100% rename from src/mint/afl-tests/id:000549,src:000000,op:int16,pos:87,val:-32768,+cov rename to src/exchange/afl-tests/id:000549,src:000000,op:int16,pos:87,val:-32768,+cov diff --git a/src/mint/afl-tests/id:000550,src:000000,op:arith8,pos:328,val:+14,+cov b/src/exchange/afl-tests/id:000550,src:000000,op:arith8,pos:328,val:+14,+cov similarity index 100% rename from src/mint/afl-tests/id:000550,src:000000,op:arith8,pos:328,val:+14,+cov rename to src/exchange/afl-tests/id:000550,src:000000,op:arith8,pos:328,val:+14,+cov diff --git a/src/mint/afl-tests/id:000550,src:000000,op:int16,pos:90,val:+256,+cov b/src/exchange/afl-tests/id:000550,src:000000,op:int16,pos:90,val:+256,+cov similarity index 100% rename from src/mint/afl-tests/id:000550,src:000000,op:int16,pos:90,val:+256,+cov rename to src/exchange/afl-tests/id:000550,src:000000,op:int16,pos:90,val:+256,+cov diff --git a/src/mint/afl-tests/id:000551,src:000000,op:arith8,pos:329,val:+1,+cov b/src/exchange/afl-tests/id:000551,src:000000,op:arith8,pos:329,val:+1,+cov similarity index 100% rename from src/mint/afl-tests/id:000551,src:000000,op:arith8,pos:329,val:+1,+cov rename to src/exchange/afl-tests/id:000551,src:000000,op:arith8,pos:329,val:+1,+cov diff --git a/src/mint/afl-tests/id:000551,src:000000,op:int16,pos:91,val:+32,+cov b/src/exchange/afl-tests/id:000551,src:000000,op:int16,pos:91,val:+32,+cov similarity index 100% rename from src/mint/afl-tests/id:000551,src:000000,op:int16,pos:91,val:+32,+cov rename to src/exchange/afl-tests/id:000551,src:000000,op:int16,pos:91,val:+32,+cov diff --git a/src/mint/afl-tests/id:000552,src:000000,op:arith8,pos:330,val:+9,+cov b/src/exchange/afl-tests/id:000552,src:000000,op:arith8,pos:330,val:+9,+cov similarity index 100% rename from src/mint/afl-tests/id:000552,src:000000,op:arith8,pos:330,val:+9,+cov rename to src/exchange/afl-tests/id:000552,src:000000,op:arith8,pos:330,val:+9,+cov diff --git a/src/mint/afl-tests/id:000552,src:000000,op:int16,pos:91,val:-129,+cov b/src/exchange/afl-tests/id:000552,src:000000,op:int16,pos:91,val:-129,+cov similarity index 100% rename from src/mint/afl-tests/id:000552,src:000000,op:int16,pos:91,val:-129,+cov rename to src/exchange/afl-tests/id:000552,src:000000,op:int16,pos:91,val:-129,+cov diff --git a/src/mint/afl-tests/id:000553,src:000000,op:arith8,pos:330,val:-24,+cov b/src/exchange/afl-tests/id:000553,src:000000,op:arith8,pos:330,val:-24,+cov similarity index 100% rename from src/mint/afl-tests/id:000553,src:000000,op:arith8,pos:330,val:-24,+cov rename to src/exchange/afl-tests/id:000553,src:000000,op:arith8,pos:330,val:-24,+cov diff --git a/src/mint/afl-tests/id:000553,src:000000,op:int16,pos:93,val:+0,+cov b/src/exchange/afl-tests/id:000553,src:000000,op:int16,pos:93,val:+0,+cov similarity index 100% rename from src/mint/afl-tests/id:000553,src:000000,op:int16,pos:93,val:+0,+cov rename to src/exchange/afl-tests/id:000553,src:000000,op:int16,pos:93,val:+0,+cov diff --git a/src/mint/afl-tests/id:000554,src:000000,op:int16,pos:94,val:be:+64,+cov b/src/exchange/afl-tests/id:000554,src:000000,op:int16,pos:94,val:be:+64,+cov similarity index 100% rename from src/mint/afl-tests/id:000554,src:000000,op:int16,pos:94,val:be:+64,+cov rename to src/exchange/afl-tests/id:000554,src:000000,op:int16,pos:94,val:be:+64,+cov diff --git a/src/mint/afl-tests/id:000554,src:000000,op:int8,pos:6,val:+0 b/src/exchange/afl-tests/id:000554,src:000000,op:int8,pos:6,val:+0 similarity index 100% rename from src/mint/afl-tests/id:000554,src:000000,op:int8,pos:6,val:+0 rename to src/exchange/afl-tests/id:000554,src:000000,op:int8,pos:6,val:+0 diff --git a/src/mint/afl-tests/id:000555,src:000000,op:int16,pos:94,val:be:+100,+cov b/src/exchange/afl-tests/id:000555,src:000000,op:int16,pos:94,val:be:+100,+cov similarity index 100% rename from src/mint/afl-tests/id:000555,src:000000,op:int16,pos:94,val:be:+100,+cov rename to src/exchange/afl-tests/id:000555,src:000000,op:int16,pos:94,val:be:+100,+cov diff --git a/src/mint/afl-tests/id:000555,src:000000,op:int8,pos:7,val:+0 b/src/exchange/afl-tests/id:000555,src:000000,op:int8,pos:7,val:+0 similarity index 100% rename from src/mint/afl-tests/id:000555,src:000000,op:int8,pos:7,val:+0 rename to src/exchange/afl-tests/id:000555,src:000000,op:int8,pos:7,val:+0 diff --git a/src/mint/afl-tests/id:000556,src:000000,op:int16,pos:232,val:+1,+cov b/src/exchange/afl-tests/id:000556,src:000000,op:int16,pos:232,val:+1,+cov similarity index 100% rename from src/mint/afl-tests/id:000556,src:000000,op:int16,pos:232,val:+1,+cov rename to src/exchange/afl-tests/id:000556,src:000000,op:int16,pos:232,val:+1,+cov diff --git a/src/mint/afl-tests/id:000556,src:000000,op:int8,pos:9,val:+0 b/src/exchange/afl-tests/id:000556,src:000000,op:int8,pos:9,val:+0 similarity index 100% rename from src/mint/afl-tests/id:000556,src:000000,op:int8,pos:9,val:+0 rename to src/exchange/afl-tests/id:000556,src:000000,op:int8,pos:9,val:+0 diff --git a/src/mint/afl-tests/id:000557,src:000000,op:int16,pos:254,val:+256,+cov b/src/exchange/afl-tests/id:000557,src:000000,op:int16,pos:254,val:+256,+cov similarity index 100% rename from src/mint/afl-tests/id:000557,src:000000,op:int16,pos:254,val:+256,+cov rename to src/exchange/afl-tests/id:000557,src:000000,op:int16,pos:254,val:+256,+cov diff --git a/src/mint/afl-tests/id:000557,src:000000,op:int8,pos:34,val:+0,+cov b/src/exchange/afl-tests/id:000557,src:000000,op:int8,pos:34,val:+0,+cov similarity index 100% rename from src/mint/afl-tests/id:000557,src:000000,op:int8,pos:34,val:+0,+cov rename to src/exchange/afl-tests/id:000557,src:000000,op:int8,pos:34,val:+0,+cov diff --git a/src/mint/afl-tests/id:000558,src:000000,op:int16,pos:262,val:+1000,+cov b/src/exchange/afl-tests/id:000558,src:000000,op:int16,pos:262,val:+1000,+cov similarity index 100% rename from src/mint/afl-tests/id:000558,src:000000,op:int16,pos:262,val:+1000,+cov rename to src/exchange/afl-tests/id:000558,src:000000,op:int16,pos:262,val:+1000,+cov diff --git a/src/mint/afl-tests/id:000558,src:000000,op:int8,pos:40,val:+0,+cov b/src/exchange/afl-tests/id:000558,src:000000,op:int8,pos:40,val:+0,+cov similarity index 100% rename from src/mint/afl-tests/id:000558,src:000000,op:int8,pos:40,val:+0,+cov rename to src/exchange/afl-tests/id:000558,src:000000,op:int8,pos:40,val:+0,+cov diff --git a/src/mint/afl-tests/id:000559,src:000000,op:int16,pos:303,val:+128,+cov b/src/exchange/afl-tests/id:000559,src:000000,op:int16,pos:303,val:+128,+cov similarity index 100% rename from src/mint/afl-tests/id:000559,src:000000,op:int16,pos:303,val:+128,+cov rename to src/exchange/afl-tests/id:000559,src:000000,op:int16,pos:303,val:+128,+cov diff --git a/src/mint/afl-tests/id:000559,src:000000,op:int8,pos:40,val:+32 b/src/exchange/afl-tests/id:000559,src:000000,op:int8,pos:40,val:+32 similarity index 100% rename from src/mint/afl-tests/id:000559,src:000000,op:int8,pos:40,val:+32 rename to src/exchange/afl-tests/id:000559,src:000000,op:int8,pos:40,val:+32 diff --git a/src/mint/afl-tests/id:000560,src:000000,op:int32,pos:3,val:be:+1000 b/src/exchange/afl-tests/id:000560,src:000000,op:int32,pos:3,val:be:+1000 similarity index 100% rename from src/mint/afl-tests/id:000560,src:000000,op:int32,pos:3,val:be:+1000 rename to src/exchange/afl-tests/id:000560,src:000000,op:int32,pos:3,val:be:+1000 diff --git a/src/mint/afl-tests/id:000560,src:000000,op:int8,pos:44,val:-1,+cov b/src/exchange/afl-tests/id:000560,src:000000,op:int8,pos:44,val:-1,+cov similarity index 100% rename from src/mint/afl-tests/id:000560,src:000000,op:int8,pos:44,val:-1,+cov rename to src/exchange/afl-tests/id:000560,src:000000,op:int8,pos:44,val:-1,+cov diff --git a/src/mint/afl-tests/id:000561,src:000000,op:int32,pos:28,val:+32768,+cov b/src/exchange/afl-tests/id:000561,src:000000,op:int32,pos:28,val:+32768,+cov similarity index 100% rename from src/mint/afl-tests/id:000561,src:000000,op:int32,pos:28,val:+32768,+cov rename to src/exchange/afl-tests/id:000561,src:000000,op:int32,pos:28,val:+32768,+cov diff --git a/src/mint/afl-tests/id:000561,src:000000,op:int8,pos:51,val:-1,+cov b/src/exchange/afl-tests/id:000561,src:000000,op:int8,pos:51,val:-1,+cov similarity index 100% rename from src/mint/afl-tests/id:000561,src:000000,op:int8,pos:51,val:-1,+cov rename to src/exchange/afl-tests/id:000561,src:000000,op:int8,pos:51,val:-1,+cov diff --git a/src/mint/afl-tests/id:000562,src:000000,op:int32,pos:29,val:-128,+cov b/src/exchange/afl-tests/id:000562,src:000000,op:int32,pos:29,val:-128,+cov similarity index 100% rename from src/mint/afl-tests/id:000562,src:000000,op:int32,pos:29,val:-128,+cov rename to src/exchange/afl-tests/id:000562,src:000000,op:int32,pos:29,val:-128,+cov diff --git a/src/mint/afl-tests/id:000562,src:000000,op:int8,pos:62,val:-128,+cov b/src/exchange/afl-tests/id:000562,src:000000,op:int8,pos:62,val:-128,+cov similarity index 100% rename from src/mint/afl-tests/id:000562,src:000000,op:int8,pos:62,val:-128,+cov rename to src/exchange/afl-tests/id:000562,src:000000,op:int8,pos:62,val:-128,+cov diff --git a/src/mint/afl-tests/id:000563,src:000000,op:int32,pos:33,val:-128,+cov b/src/exchange/afl-tests/id:000563,src:000000,op:int32,pos:33,val:-128,+cov similarity index 100% rename from src/mint/afl-tests/id:000563,src:000000,op:int32,pos:33,val:-128,+cov rename to src/exchange/afl-tests/id:000563,src:000000,op:int32,pos:33,val:-128,+cov diff --git a/src/mint/afl-tests/id:000563,src:000000,op:int8,pos:135,val:+127,+cov b/src/exchange/afl-tests/id:000563,src:000000,op:int8,pos:135,val:+127,+cov similarity index 100% rename from src/mint/afl-tests/id:000563,src:000000,op:int8,pos:135,val:+127,+cov rename to src/exchange/afl-tests/id:000563,src:000000,op:int8,pos:135,val:+127,+cov diff --git a/src/mint/afl-tests/id:000564,src:000000,op:int32,pos:33,val:+1024,+cov b/src/exchange/afl-tests/id:000564,src:000000,op:int32,pos:33,val:+1024,+cov similarity index 100% rename from src/mint/afl-tests/id:000564,src:000000,op:int32,pos:33,val:+1024,+cov rename to src/exchange/afl-tests/id:000564,src:000000,op:int32,pos:33,val:+1024,+cov diff --git a/src/mint/afl-tests/id:000564,src:000000,op:int8,pos:140,val:+100,+cov b/src/exchange/afl-tests/id:000564,src:000000,op:int8,pos:140,val:+100,+cov similarity index 100% rename from src/mint/afl-tests/id:000564,src:000000,op:int8,pos:140,val:+100,+cov rename to src/exchange/afl-tests/id:000564,src:000000,op:int8,pos:140,val:+100,+cov diff --git a/src/mint/afl-tests/id:000565,src:000000,op:int32,pos:33,val:be:-32769,+cov b/src/exchange/afl-tests/id:000565,src:000000,op:int32,pos:33,val:be:-32769,+cov similarity index 100% rename from src/mint/afl-tests/id:000565,src:000000,op:int32,pos:33,val:be:-32769,+cov rename to src/exchange/afl-tests/id:000565,src:000000,op:int32,pos:33,val:be:-32769,+cov diff --git a/src/mint/afl-tests/id:000565,src:000000,op:int8,pos:178,val:+100,+cov b/src/exchange/afl-tests/id:000565,src:000000,op:int8,pos:178,val:+100,+cov similarity index 100% rename from src/mint/afl-tests/id:000565,src:000000,op:int8,pos:178,val:+100,+cov rename to src/exchange/afl-tests/id:000565,src:000000,op:int8,pos:178,val:+100,+cov diff --git a/src/mint/afl-tests/id:000566,src:000000,op:int16,pos:27,val:-128,+cov b/src/exchange/afl-tests/id:000566,src:000000,op:int16,pos:27,val:-128,+cov similarity index 100% rename from src/mint/afl-tests/id:000566,src:000000,op:int16,pos:27,val:-128,+cov rename to src/exchange/afl-tests/id:000566,src:000000,op:int16,pos:27,val:-128,+cov diff --git a/src/mint/afl-tests/id:000566,src:000000,op:int32,pos:39,val:be:+255,+cov b/src/exchange/afl-tests/id:000566,src:000000,op:int32,pos:39,val:be:+255,+cov similarity index 100% rename from src/mint/afl-tests/id:000566,src:000000,op:int32,pos:39,val:be:+255,+cov rename to src/exchange/afl-tests/id:000566,src:000000,op:int32,pos:39,val:be:+255,+cov diff --git a/src/mint/afl-tests/id:000567,src:000000,op:int16,pos:28,val:be:+32,+cov b/src/exchange/afl-tests/id:000567,src:000000,op:int16,pos:28,val:be:+32,+cov similarity index 100% rename from src/mint/afl-tests/id:000567,src:000000,op:int16,pos:28,val:be:+32,+cov rename to src/exchange/afl-tests/id:000567,src:000000,op:int16,pos:28,val:be:+32,+cov diff --git a/src/mint/afl-tests/id:000567,src:000000,op:int32,pos:40,val:+32767,+cov b/src/exchange/afl-tests/id:000567,src:000000,op:int32,pos:40,val:+32767,+cov similarity index 100% rename from src/mint/afl-tests/id:000567,src:000000,op:int32,pos:40,val:+32767,+cov rename to src/exchange/afl-tests/id:000567,src:000000,op:int32,pos:40,val:+32767,+cov diff --git a/src/mint/afl-tests/id:000568,src:000000,op:int16,pos:28,val:be:+127,+cov b/src/exchange/afl-tests/id:000568,src:000000,op:int16,pos:28,val:be:+127,+cov similarity index 100% rename from src/mint/afl-tests/id:000568,src:000000,op:int16,pos:28,val:be:+127,+cov rename to src/exchange/afl-tests/id:000568,src:000000,op:int16,pos:28,val:be:+127,+cov diff --git a/src/mint/afl-tests/id:000568,src:000000,op:int32,pos:41,val:+16,+cov b/src/exchange/afl-tests/id:000568,src:000000,op:int32,pos:41,val:+16,+cov similarity index 100% rename from src/mint/afl-tests/id:000568,src:000000,op:int32,pos:41,val:+16,+cov rename to src/exchange/afl-tests/id:000568,src:000000,op:int32,pos:41,val:+16,+cov diff --git a/src/mint/afl-tests/id:000569,src:000000,op:int16,pos:33,val:be:+512,+cov b/src/exchange/afl-tests/id:000569,src:000000,op:int16,pos:33,val:be:+512,+cov similarity index 100% rename from src/mint/afl-tests/id:000569,src:000000,op:int16,pos:33,val:be:+512,+cov rename to src/exchange/afl-tests/id:000569,src:000000,op:int16,pos:33,val:be:+512,+cov diff --git a/src/mint/afl-tests/id:000569,src:000000,op:int32,pos:41,val:+1024,+cov b/src/exchange/afl-tests/id:000569,src:000000,op:int32,pos:41,val:+1024,+cov similarity index 100% rename from src/mint/afl-tests/id:000569,src:000000,op:int32,pos:41,val:+1024,+cov rename to src/exchange/afl-tests/id:000569,src:000000,op:int32,pos:41,val:+1024,+cov diff --git a/src/mint/afl-tests/id:000570,src:000000,op:int16,pos:34,val:+1000,+cov b/src/exchange/afl-tests/id:000570,src:000000,op:int16,pos:34,val:+1000,+cov similarity index 100% rename from src/mint/afl-tests/id:000570,src:000000,op:int16,pos:34,val:+1000,+cov rename to src/exchange/afl-tests/id:000570,src:000000,op:int16,pos:34,val:+1000,+cov diff --git a/src/mint/afl-tests/id:000570,src:000000,op:int32,pos:44,val:-32769,+cov b/src/exchange/afl-tests/id:000570,src:000000,op:int32,pos:44,val:-32769,+cov similarity index 100% rename from src/mint/afl-tests/id:000570,src:000000,op:int32,pos:44,val:-32769,+cov rename to src/exchange/afl-tests/id:000570,src:000000,op:int32,pos:44,val:-32769,+cov diff --git a/src/mint/afl-tests/id:000571,src:000000,op:int16,pos:44,val:+512,+cov b/src/exchange/afl-tests/id:000571,src:000000,op:int16,pos:44,val:+512,+cov similarity index 100% rename from src/mint/afl-tests/id:000571,src:000000,op:int16,pos:44,val:+512,+cov rename to src/exchange/afl-tests/id:000571,src:000000,op:int16,pos:44,val:+512,+cov diff --git a/src/mint/afl-tests/id:000571,src:000000,op:int32,pos:45,val:be:+1024,+cov b/src/exchange/afl-tests/id:000571,src:000000,op:int32,pos:45,val:be:+1024,+cov similarity index 100% rename from src/mint/afl-tests/id:000571,src:000000,op:int32,pos:45,val:be:+1024,+cov rename to src/exchange/afl-tests/id:000571,src:000000,op:int32,pos:45,val:be:+1024,+cov diff --git a/src/mint/afl-tests/id:000572,src:000000,op:int16,pos:46,val:+100,+cov b/src/exchange/afl-tests/id:000572,src:000000,op:int16,pos:46,val:+100,+cov similarity index 100% rename from src/mint/afl-tests/id:000572,src:000000,op:int16,pos:46,val:+100,+cov rename to src/exchange/afl-tests/id:000572,src:000000,op:int16,pos:46,val:+100,+cov diff --git a/src/mint/afl-tests/id:000572,src:000000,op:int32,pos:48,val:+256,+cov b/src/exchange/afl-tests/id:000572,src:000000,op:int32,pos:48,val:+256,+cov similarity index 100% rename from src/mint/afl-tests/id:000572,src:000000,op:int32,pos:48,val:+256,+cov rename to src/exchange/afl-tests/id:000572,src:000000,op:int32,pos:48,val:+256,+cov diff --git a/src/mint/afl-tests/id:000573,src:000000,op:int16,pos:46,val:be:+512,+cov b/src/exchange/afl-tests/id:000573,src:000000,op:int16,pos:46,val:be:+512,+cov similarity index 100% rename from src/mint/afl-tests/id:000573,src:000000,op:int16,pos:46,val:be:+512,+cov rename to src/exchange/afl-tests/id:000573,src:000000,op:int16,pos:46,val:be:+512,+cov diff --git a/src/mint/afl-tests/id:000573,src:000000,op:int32,pos:53,val:+32768,+cov b/src/exchange/afl-tests/id:000573,src:000000,op:int32,pos:53,val:+32768,+cov similarity index 100% rename from src/mint/afl-tests/id:000573,src:000000,op:int32,pos:53,val:+32768,+cov rename to src/exchange/afl-tests/id:000573,src:000000,op:int32,pos:53,val:+32768,+cov diff --git a/src/mint/afl-tests/id:000574,src:000000,op:int16,pos:52,val:-128,+cov b/src/exchange/afl-tests/id:000574,src:000000,op:int16,pos:52,val:-128,+cov similarity index 100% rename from src/mint/afl-tests/id:000574,src:000000,op:int16,pos:52,val:-128,+cov rename to src/exchange/afl-tests/id:000574,src:000000,op:int16,pos:52,val:-128,+cov diff --git a/src/mint/afl-tests/id:000574,src:000000,op:int32,pos:54,val:be:-32768,+cov b/src/exchange/afl-tests/id:000574,src:000000,op:int32,pos:54,val:be:-32768,+cov similarity index 100% rename from src/mint/afl-tests/id:000574,src:000000,op:int32,pos:54,val:be:-32768,+cov rename to src/exchange/afl-tests/id:000574,src:000000,op:int32,pos:54,val:be:-32768,+cov diff --git a/src/mint/afl-tests/id:000575,src:000000,op:int16,pos:54,val:-128,+cov b/src/exchange/afl-tests/id:000575,src:000000,op:int16,pos:54,val:-128,+cov similarity index 100% rename from src/mint/afl-tests/id:000575,src:000000,op:int16,pos:54,val:-128,+cov rename to src/exchange/afl-tests/id:000575,src:000000,op:int16,pos:54,val:-128,+cov diff --git a/src/mint/afl-tests/id:000575,src:000000,op:int32,pos:54,val:-32769,+cov b/src/exchange/afl-tests/id:000575,src:000000,op:int32,pos:54,val:-32769,+cov similarity index 100% rename from src/mint/afl-tests/id:000575,src:000000,op:int32,pos:54,val:-32769,+cov rename to src/exchange/afl-tests/id:000575,src:000000,op:int32,pos:54,val:-32769,+cov diff --git a/src/mint/afl-tests/id:000576,src:000000,op:int16,pos:54,val:+100,+cov b/src/exchange/afl-tests/id:000576,src:000000,op:int16,pos:54,val:+100,+cov similarity index 100% rename from src/mint/afl-tests/id:000576,src:000000,op:int16,pos:54,val:+100,+cov rename to src/exchange/afl-tests/id:000576,src:000000,op:int16,pos:54,val:+100,+cov diff --git a/src/mint/afl-tests/id:000576,src:000000,op:int32,pos:54,val:+2147483647,+cov b/src/exchange/afl-tests/id:000576,src:000000,op:int32,pos:54,val:+2147483647,+cov similarity index 100% rename from src/mint/afl-tests/id:000576,src:000000,op:int32,pos:54,val:+2147483647,+cov rename to src/exchange/afl-tests/id:000576,src:000000,op:int32,pos:54,val:+2147483647,+cov diff --git a/src/mint/afl-tests/id:000577,src:000000,op:int16,pos:54,val:+255,+cov b/src/exchange/afl-tests/id:000577,src:000000,op:int16,pos:54,val:+255,+cov similarity index 100% rename from src/mint/afl-tests/id:000577,src:000000,op:int16,pos:54,val:+255,+cov rename to src/exchange/afl-tests/id:000577,src:000000,op:int16,pos:54,val:+255,+cov diff --git a/src/mint/afl-tests/id:000577,src:000000,op:int32,pos:63,val:-1,+cov b/src/exchange/afl-tests/id:000577,src:000000,op:int32,pos:63,val:-1,+cov similarity index 100% rename from src/mint/afl-tests/id:000577,src:000000,op:int32,pos:63,val:-1,+cov rename to src/exchange/afl-tests/id:000577,src:000000,op:int32,pos:63,val:-1,+cov diff --git a/src/mint/afl-tests/id:000578,src:000000,op:int16,pos:62,val:+255,+cov b/src/exchange/afl-tests/id:000578,src:000000,op:int16,pos:62,val:+255,+cov similarity index 100% rename from src/mint/afl-tests/id:000578,src:000000,op:int16,pos:62,val:+255,+cov rename to src/exchange/afl-tests/id:000578,src:000000,op:int16,pos:62,val:+255,+cov diff --git a/src/mint/afl-tests/id:000578,src:000000,op:int32,pos:64,val:-128,+cov b/src/exchange/afl-tests/id:000578,src:000000,op:int32,pos:64,val:-128,+cov similarity index 100% rename from src/mint/afl-tests/id:000578,src:000000,op:int32,pos:64,val:-128,+cov rename to src/exchange/afl-tests/id:000578,src:000000,op:int32,pos:64,val:-128,+cov diff --git a/src/mint/afl-tests/id:000579,src:000000,op:int16,pos:63,val:+32,+cov b/src/exchange/afl-tests/id:000579,src:000000,op:int16,pos:63,val:+32,+cov similarity index 100% rename from src/mint/afl-tests/id:000579,src:000000,op:int16,pos:63,val:+32,+cov rename to src/exchange/afl-tests/id:000579,src:000000,op:int16,pos:63,val:+32,+cov diff --git a/src/mint/afl-tests/id:000579,src:000000,op:int32,pos:69,val:+128,+cov b/src/exchange/afl-tests/id:000579,src:000000,op:int32,pos:69,val:+128,+cov similarity index 100% rename from src/mint/afl-tests/id:000579,src:000000,op:int32,pos:69,val:+128,+cov rename to src/exchange/afl-tests/id:000579,src:000000,op:int32,pos:69,val:+128,+cov diff --git a/src/mint/afl-tests/id:000580,src:000000,op:int16,pos:65,val:be:+100,+cov b/src/exchange/afl-tests/id:000580,src:000000,op:int16,pos:65,val:be:+100,+cov similarity index 100% rename from src/mint/afl-tests/id:000580,src:000000,op:int16,pos:65,val:be:+100,+cov rename to src/exchange/afl-tests/id:000580,src:000000,op:int16,pos:65,val:be:+100,+cov diff --git a/src/mint/afl-tests/id:000580,src:000000,op:int32,pos:80,val:+1024,+cov b/src/exchange/afl-tests/id:000580,src:000000,op:int32,pos:80,val:+1024,+cov similarity index 100% rename from src/mint/afl-tests/id:000580,src:000000,op:int32,pos:80,val:+1024,+cov rename to src/exchange/afl-tests/id:000580,src:000000,op:int32,pos:80,val:+1024,+cov diff --git a/src/mint/afl-tests/id:000581,src:000000,op:int16,pos:66,val:+0,+cov b/src/exchange/afl-tests/id:000581,src:000000,op:int16,pos:66,val:+0,+cov similarity index 100% rename from src/mint/afl-tests/id:000581,src:000000,op:int16,pos:66,val:+0,+cov rename to src/exchange/afl-tests/id:000581,src:000000,op:int16,pos:66,val:+0,+cov diff --git a/src/mint/afl-tests/id:000581,src:000000,op:int32,pos:80,val:+65535,+cov b/src/exchange/afl-tests/id:000581,src:000000,op:int32,pos:80,val:+65535,+cov similarity index 100% rename from src/mint/afl-tests/id:000581,src:000000,op:int32,pos:80,val:+65535,+cov rename to src/exchange/afl-tests/id:000581,src:000000,op:int32,pos:80,val:+65535,+cov diff --git a/src/mint/afl-tests/id:000582,src:000000,op:int16,pos:80,val:+1000,+cov b/src/exchange/afl-tests/id:000582,src:000000,op:int16,pos:80,val:+1000,+cov similarity index 100% rename from src/mint/afl-tests/id:000582,src:000000,op:int16,pos:80,val:+1000,+cov rename to src/exchange/afl-tests/id:000582,src:000000,op:int16,pos:80,val:+1000,+cov diff --git a/src/mint/afl-tests/id:000582,src:000000,op:int32,pos:82,val:be:+16,+cov b/src/exchange/afl-tests/id:000582,src:000000,op:int32,pos:82,val:be:+16,+cov similarity index 100% rename from src/mint/afl-tests/id:000582,src:000000,op:int32,pos:82,val:be:+16,+cov rename to src/exchange/afl-tests/id:000582,src:000000,op:int32,pos:82,val:be:+16,+cov diff --git a/src/mint/afl-tests/id:000583,src:000000,op:int16,pos:82,val:+256,+cov b/src/exchange/afl-tests/id:000583,src:000000,op:int16,pos:82,val:+256,+cov similarity index 100% rename from src/mint/afl-tests/id:000583,src:000000,op:int16,pos:82,val:+256,+cov rename to src/exchange/afl-tests/id:000583,src:000000,op:int16,pos:82,val:+256,+cov diff --git a/src/mint/afl-tests/id:000583,src:000000,op:int32,pos:83,val:+100,+cov b/src/exchange/afl-tests/id:000583,src:000000,op:int32,pos:83,val:+100,+cov similarity index 100% rename from src/mint/afl-tests/id:000583,src:000000,op:int32,pos:83,val:+100,+cov rename to src/exchange/afl-tests/id:000583,src:000000,op:int32,pos:83,val:+100,+cov diff --git a/src/mint/afl-tests/id:000584,src:000000,op:int16,pos:83,val:be:+1024,+cov b/src/exchange/afl-tests/id:000584,src:000000,op:int16,pos:83,val:be:+1024,+cov similarity index 100% rename from src/mint/afl-tests/id:000584,src:000000,op:int16,pos:83,val:be:+1024,+cov rename to src/exchange/afl-tests/id:000584,src:000000,op:int16,pos:83,val:be:+1024,+cov diff --git a/src/mint/afl-tests/id:000584,src:000000,op:int32,pos:84,val:+32,+cov b/src/exchange/afl-tests/id:000584,src:000000,op:int32,pos:84,val:+32,+cov similarity index 100% rename from src/mint/afl-tests/id:000584,src:000000,op:int32,pos:84,val:+32,+cov rename to src/exchange/afl-tests/id:000584,src:000000,op:int32,pos:84,val:+32,+cov diff --git a/src/mint/afl-tests/id:000585,src:000000,op:int16,pos:87,val:-128,+cov b/src/exchange/afl-tests/id:000585,src:000000,op:int16,pos:87,val:-128,+cov similarity index 100% rename from src/mint/afl-tests/id:000585,src:000000,op:int16,pos:87,val:-128,+cov rename to src/exchange/afl-tests/id:000585,src:000000,op:int16,pos:87,val:-128,+cov diff --git a/src/mint/afl-tests/id:000585,src:000000,op:int32,pos:84,val:+128,+cov b/src/exchange/afl-tests/id:000585,src:000000,op:int32,pos:84,val:+128,+cov similarity index 100% rename from src/mint/afl-tests/id:000585,src:000000,op:int32,pos:84,val:+128,+cov rename to src/exchange/afl-tests/id:000585,src:000000,op:int32,pos:84,val:+128,+cov diff --git a/src/mint/afl-tests/id:000586,src:000000,op:int16,pos:87,val:-32768,+cov b/src/exchange/afl-tests/id:000586,src:000000,op:int16,pos:87,val:-32768,+cov similarity index 100% rename from src/mint/afl-tests/id:000586,src:000000,op:int16,pos:87,val:-32768,+cov rename to src/exchange/afl-tests/id:000586,src:000000,op:int16,pos:87,val:-32768,+cov diff --git a/src/mint/afl-tests/id:000586,src:000000,op:int32,pos:87,val:be:-32768,+cov b/src/exchange/afl-tests/id:000586,src:000000,op:int32,pos:87,val:be:-32768,+cov similarity index 100% rename from src/mint/afl-tests/id:000586,src:000000,op:int32,pos:87,val:be:-32768,+cov rename to src/exchange/afl-tests/id:000586,src:000000,op:int32,pos:87,val:be:-32768,+cov diff --git a/src/mint/afl-tests/id:000587,src:000000,op:int16,pos:94,val:-129,+cov b/src/exchange/afl-tests/id:000587,src:000000,op:int16,pos:94,val:-129,+cov similarity index 100% rename from src/mint/afl-tests/id:000587,src:000000,op:int16,pos:94,val:-129,+cov rename to src/exchange/afl-tests/id:000587,src:000000,op:int16,pos:94,val:-129,+cov diff --git a/src/mint/afl-tests/id:000587,src:000000,op:int32,pos:88,val:be:-32769,+cov b/src/exchange/afl-tests/id:000587,src:000000,op:int32,pos:88,val:be:-32769,+cov similarity index 100% rename from src/mint/afl-tests/id:000587,src:000000,op:int32,pos:88,val:be:-32769,+cov rename to src/exchange/afl-tests/id:000587,src:000000,op:int32,pos:88,val:be:-32769,+cov diff --git a/src/mint/afl-tests/id:000588,src:000000,op:int16,pos:193,val:+16 b/src/exchange/afl-tests/id:000588,src:000000,op:int16,pos:193,val:+16 similarity index 100% rename from src/mint/afl-tests/id:000588,src:000000,op:int16,pos:193,val:+16 rename to src/exchange/afl-tests/id:000588,src:000000,op:int16,pos:193,val:+16 diff --git a/src/mint/afl-tests/id:000588,src:000000,op:int32,pos:89,val:-128,+cov b/src/exchange/afl-tests/id:000588,src:000000,op:int32,pos:89,val:-128,+cov similarity index 100% rename from src/mint/afl-tests/id:000588,src:000000,op:int32,pos:89,val:-128,+cov rename to src/exchange/afl-tests/id:000588,src:000000,op:int32,pos:89,val:-128,+cov diff --git a/src/mint/afl-tests/id:000589,src:000000,op:int32,pos:0,val:be:+32767 b/src/exchange/afl-tests/id:000589,src:000000,op:int32,pos:0,val:be:+32767 similarity index 100% rename from src/mint/afl-tests/id:000589,src:000000,op:int32,pos:0,val:be:+32767 rename to src/exchange/afl-tests/id:000589,src:000000,op:int32,pos:0,val:be:+32767 diff --git a/src/mint/afl-tests/id:000589,src:000000,op:int32,pos:92,val:+32767,+cov b/src/exchange/afl-tests/id:000589,src:000000,op:int32,pos:92,val:+32767,+cov similarity index 100% rename from src/mint/afl-tests/id:000589,src:000000,op:int32,pos:92,val:+32767,+cov rename to src/exchange/afl-tests/id:000589,src:000000,op:int32,pos:92,val:+32767,+cov diff --git a/src/mint/afl-tests/id:000590,src:000000,op:int32,pos:164,val:+256,+cov b/src/exchange/afl-tests/id:000590,src:000000,op:int32,pos:164,val:+256,+cov similarity index 100% rename from src/mint/afl-tests/id:000590,src:000000,op:int32,pos:164,val:+256,+cov rename to src/exchange/afl-tests/id:000590,src:000000,op:int32,pos:164,val:+256,+cov diff --git a/src/mint/afl-tests/id:000590,src:000000,op:int32,pos:2,val:+65535 b/src/exchange/afl-tests/id:000590,src:000000,op:int32,pos:2,val:+65535 similarity index 100% rename from src/mint/afl-tests/id:000590,src:000000,op:int32,pos:2,val:+65535 rename to src/exchange/afl-tests/id:000590,src:000000,op:int32,pos:2,val:+65535 diff --git a/src/mint/afl-tests/id:000591,src:000000,op:int32,pos:178,val:be:-32769,+cov b/src/exchange/afl-tests/id:000591,src:000000,op:int32,pos:178,val:be:-32769,+cov similarity index 100% rename from src/mint/afl-tests/id:000591,src:000000,op:int32,pos:178,val:be:-32769,+cov rename to src/exchange/afl-tests/id:000591,src:000000,op:int32,pos:178,val:be:-32769,+cov diff --git a/src/mint/afl-tests/id:000591,src:000000,op:int32,pos:7,val:-2147483648,+cov b/src/exchange/afl-tests/id:000591,src:000000,op:int32,pos:7,val:-2147483648,+cov similarity index 100% rename from src/mint/afl-tests/id:000591,src:000000,op:int32,pos:7,val:-2147483648,+cov rename to src/exchange/afl-tests/id:000591,src:000000,op:int32,pos:7,val:-2147483648,+cov diff --git a/src/mint/afl-tests/id:000592,src:000000,op:int32,pos:232,val:be:+65535,+cov b/src/exchange/afl-tests/id:000592,src:000000,op:int32,pos:232,val:be:+65535,+cov similarity index 100% rename from src/mint/afl-tests/id:000592,src:000000,op:int32,pos:232,val:be:+65535,+cov rename to src/exchange/afl-tests/id:000592,src:000000,op:int32,pos:232,val:be:+65535,+cov diff --git a/src/mint/afl-tests/id:000592,src:000000,op:int32,pos:24,val:be:+32,+cov b/src/exchange/afl-tests/id:000592,src:000000,op:int32,pos:24,val:be:+32,+cov similarity index 100% rename from src/mint/afl-tests/id:000592,src:000000,op:int32,pos:24,val:be:+32,+cov rename to src/exchange/afl-tests/id:000592,src:000000,op:int32,pos:24,val:be:+32,+cov diff --git a/src/mint/afl-tests/id:000593,src:000000,op:int32,pos:26,val:+255,+cov b/src/exchange/afl-tests/id:000593,src:000000,op:int32,pos:26,val:+255,+cov similarity index 100% rename from src/mint/afl-tests/id:000593,src:000000,op:int32,pos:26,val:+255,+cov rename to src/exchange/afl-tests/id:000593,src:000000,op:int32,pos:26,val:+255,+cov diff --git a/src/mint/afl-tests/id:000593,src:000000,op:int32,pos:313,val:+1,+cov b/src/exchange/afl-tests/id:000593,src:000000,op:int32,pos:313,val:+1,+cov similarity index 100% rename from src/mint/afl-tests/id:000593,src:000000,op:int32,pos:313,val:+1,+cov rename to src/exchange/afl-tests/id:000593,src:000000,op:int32,pos:313,val:+1,+cov diff --git a/src/mint/afl-tests/id:000594,src:000000,op:int32,pos:27,val:be:+1,+cov b/src/exchange/afl-tests/id:000594,src:000000,op:int32,pos:27,val:be:+1,+cov similarity index 100% rename from src/mint/afl-tests/id:000594,src:000000,op:int32,pos:27,val:be:+1,+cov rename to src/exchange/afl-tests/id:000594,src:000000,op:int32,pos:27,val:be:+1,+cov diff --git a/src/mint/afl-tests/id:000594,src:000000,op:int32,pos:333,val:be:+255,+cov b/src/exchange/afl-tests/id:000594,src:000000,op:int32,pos:333,val:be:+255,+cov similarity index 100% rename from src/mint/afl-tests/id:000594,src:000000,op:int32,pos:333,val:be:+255,+cov rename to src/exchange/afl-tests/id:000594,src:000000,op:int32,pos:333,val:be:+255,+cov diff --git a/src/mint/afl-tests/id:000595,src:000000,op:ext_AO,pos:26,+cov b/src/exchange/afl-tests/id:000595,src:000000,op:ext_AO,pos:26,+cov similarity index 100% rename from src/mint/afl-tests/id:000595,src:000000,op:ext_AO,pos:26,+cov rename to src/exchange/afl-tests/id:000595,src:000000,op:ext_AO,pos:26,+cov diff --git a/src/mint/afl-tests/id:000595,src:000000,op:int32,pos:29,val:+1000,+cov b/src/exchange/afl-tests/id:000595,src:000000,op:int32,pos:29,val:+1000,+cov similarity index 100% rename from src/mint/afl-tests/id:000595,src:000000,op:int32,pos:29,val:+1000,+cov rename to src/exchange/afl-tests/id:000595,src:000000,op:int32,pos:29,val:+1000,+cov diff --git a/src/mint/afl-tests/id:000596,src:000000,op:ext_AO,pos:43,+cov b/src/exchange/afl-tests/id:000596,src:000000,op:ext_AO,pos:43,+cov similarity index 100% rename from src/mint/afl-tests/id:000596,src:000000,op:ext_AO,pos:43,+cov rename to src/exchange/afl-tests/id:000596,src:000000,op:ext_AO,pos:43,+cov diff --git a/src/mint/afl-tests/id:000596,src:000000,op:int32,pos:30,val:be:+32 b/src/exchange/afl-tests/id:000596,src:000000,op:int32,pos:30,val:be:+32 similarity index 100% rename from src/mint/afl-tests/id:000596,src:000000,op:int32,pos:30,val:be:+32 rename to src/exchange/afl-tests/id:000596,src:000000,op:int32,pos:30,val:be:+32 diff --git a/src/mint/afl-tests/id:000597,src:000000,op:ext_AO,pos:49,+cov b/src/exchange/afl-tests/id:000597,src:000000,op:ext_AO,pos:49,+cov similarity index 100% rename from src/mint/afl-tests/id:000597,src:000000,op:ext_AO,pos:49,+cov rename to src/exchange/afl-tests/id:000597,src:000000,op:ext_AO,pos:49,+cov diff --git a/src/mint/afl-tests/id:000597,src:000000,op:int32,pos:30,val:be:+512,+cov b/src/exchange/afl-tests/id:000597,src:000000,op:int32,pos:30,val:be:+512,+cov similarity index 100% rename from src/mint/afl-tests/id:000597,src:000000,op:int32,pos:30,val:be:+512,+cov rename to src/exchange/afl-tests/id:000597,src:000000,op:int32,pos:30,val:be:+512,+cov diff --git a/src/mint/afl-tests/id:000598,src:000000,op:ext_AO,pos:52,+cov b/src/exchange/afl-tests/id:000598,src:000000,op:ext_AO,pos:52,+cov similarity index 100% rename from src/mint/afl-tests/id:000598,src:000000,op:ext_AO,pos:52,+cov rename to src/exchange/afl-tests/id:000598,src:000000,op:ext_AO,pos:52,+cov diff --git a/src/mint/afl-tests/id:000598,src:000000,op:int32,pos:39,val:be:+1,+cov b/src/exchange/afl-tests/id:000598,src:000000,op:int32,pos:39,val:be:+1,+cov similarity index 100% rename from src/mint/afl-tests/id:000598,src:000000,op:int32,pos:39,val:be:+1,+cov rename to src/exchange/afl-tests/id:000598,src:000000,op:int32,pos:39,val:be:+1,+cov diff --git a/src/mint/afl-tests/id:000599,src:000000,op:ext_AO,pos:56,+cov b/src/exchange/afl-tests/id:000599,src:000000,op:ext_AO,pos:56,+cov similarity index 100% rename from src/mint/afl-tests/id:000599,src:000000,op:ext_AO,pos:56,+cov rename to src/exchange/afl-tests/id:000599,src:000000,op:ext_AO,pos:56,+cov diff --git a/src/mint/afl-tests/id:000599,src:000000,op:int32,pos:40,val:+1024,+cov b/src/exchange/afl-tests/id:000599,src:000000,op:int32,pos:40,val:+1024,+cov similarity index 100% rename from src/mint/afl-tests/id:000599,src:000000,op:int32,pos:40,val:+1024,+cov rename to src/exchange/afl-tests/id:000599,src:000000,op:int32,pos:40,val:+1024,+cov diff --git a/src/mint/afl-tests/id:000600,src:000000,op:ext_AO,pos:64,+cov b/src/exchange/afl-tests/id:000600,src:000000,op:ext_AO,pos:64,+cov similarity index 100% rename from src/mint/afl-tests/id:000600,src:000000,op:ext_AO,pos:64,+cov rename to src/exchange/afl-tests/id:000600,src:000000,op:ext_AO,pos:64,+cov diff --git a/src/mint/afl-tests/id:000600,src:000000,op:int32,pos:42,val:be:+16,+cov b/src/exchange/afl-tests/id:000600,src:000000,op:int32,pos:42,val:be:+16,+cov similarity index 100% rename from src/mint/afl-tests/id:000600,src:000000,op:int32,pos:42,val:be:+16,+cov rename to src/exchange/afl-tests/id:000600,src:000000,op:int32,pos:42,val:be:+16,+cov diff --git a/src/mint/afl-tests/id:000601,src:000000,op:ext_AO,pos:65,+cov b/src/exchange/afl-tests/id:000601,src:000000,op:ext_AO,pos:65,+cov similarity index 100% rename from src/mint/afl-tests/id:000601,src:000000,op:ext_AO,pos:65,+cov rename to src/exchange/afl-tests/id:000601,src:000000,op:ext_AO,pos:65,+cov diff --git a/src/mint/afl-tests/id:000601,src:000000,op:int32,pos:48,val:+100663045,+cov b/src/exchange/afl-tests/id:000601,src:000000,op:int32,pos:48,val:+100663045,+cov similarity index 100% rename from src/mint/afl-tests/id:000601,src:000000,op:int32,pos:48,val:+100663045,+cov rename to src/exchange/afl-tests/id:000601,src:000000,op:int32,pos:48,val:+100663045,+cov diff --git a/src/mint/afl-tests/id:000602,src:000000,op:ext_AO,pos:65,+cov b/src/exchange/afl-tests/id:000602,src:000000,op:ext_AO,pos:65,+cov similarity index 100% rename from src/mint/afl-tests/id:000602,src:000000,op:ext_AO,pos:65,+cov rename to src/exchange/afl-tests/id:000602,src:000000,op:ext_AO,pos:65,+cov diff --git a/src/mint/afl-tests/id:000602,src:000000,op:int32,pos:49,val:be:+4096,+cov b/src/exchange/afl-tests/id:000602,src:000000,op:int32,pos:49,val:be:+4096,+cov similarity index 100% rename from src/mint/afl-tests/id:000602,src:000000,op:int32,pos:49,val:be:+4096,+cov rename to src/exchange/afl-tests/id:000602,src:000000,op:int32,pos:49,val:be:+4096,+cov diff --git a/src/mint/afl-tests/id:000603,src:000000,op:ext_AO,pos:69,+cov b/src/exchange/afl-tests/id:000603,src:000000,op:ext_AO,pos:69,+cov similarity index 100% rename from src/mint/afl-tests/id:000603,src:000000,op:ext_AO,pos:69,+cov rename to src/exchange/afl-tests/id:000603,src:000000,op:ext_AO,pos:69,+cov diff --git a/src/mint/afl-tests/id:000603,src:000000,op:int32,pos:51,val:+128,+cov b/src/exchange/afl-tests/id:000603,src:000000,op:int32,pos:51,val:+128,+cov similarity index 100% rename from src/mint/afl-tests/id:000603,src:000000,op:int32,pos:51,val:+128,+cov rename to src/exchange/afl-tests/id:000603,src:000000,op:int32,pos:51,val:+128,+cov diff --git a/src/mint/afl-tests/id:000604,src:000000,op:ext_AO,pos:69,+cov b/src/exchange/afl-tests/id:000604,src:000000,op:ext_AO,pos:69,+cov similarity index 100% rename from src/mint/afl-tests/id:000604,src:000000,op:ext_AO,pos:69,+cov rename to src/exchange/afl-tests/id:000604,src:000000,op:ext_AO,pos:69,+cov diff --git a/src/mint/afl-tests/id:000604,src:000000,op:int32,pos:53,val:-128,+cov b/src/exchange/afl-tests/id:000604,src:000000,op:int32,pos:53,val:-128,+cov similarity index 100% rename from src/mint/afl-tests/id:000604,src:000000,op:int32,pos:53,val:-128,+cov rename to src/exchange/afl-tests/id:000604,src:000000,op:int32,pos:53,val:-128,+cov diff --git a/src/mint/afl-tests/id:000605,src:000000,op:ext_AO,pos:72,+cov b/src/exchange/afl-tests/id:000605,src:000000,op:ext_AO,pos:72,+cov similarity index 100% rename from src/mint/afl-tests/id:000605,src:000000,op:ext_AO,pos:72,+cov rename to src/exchange/afl-tests/id:000605,src:000000,op:ext_AO,pos:72,+cov diff --git a/src/mint/afl-tests/id:000605,src:000000,op:int32,pos:53,val:+128,+cov b/src/exchange/afl-tests/id:000605,src:000000,op:int32,pos:53,val:+128,+cov similarity index 100% rename from src/mint/afl-tests/id:000605,src:000000,op:int32,pos:53,val:+128,+cov rename to src/exchange/afl-tests/id:000605,src:000000,op:int32,pos:53,val:+128,+cov diff --git a/src/mint/afl-tests/id:000606,src:000000,op:ext_AO,pos:72,+cov b/src/exchange/afl-tests/id:000606,src:000000,op:ext_AO,pos:72,+cov similarity index 100% rename from src/mint/afl-tests/id:000606,src:000000,op:ext_AO,pos:72,+cov rename to src/exchange/afl-tests/id:000606,src:000000,op:ext_AO,pos:72,+cov diff --git a/src/mint/afl-tests/id:000606,src:000000,op:int32,pos:53,val:+1024,+cov b/src/exchange/afl-tests/id:000606,src:000000,op:int32,pos:53,val:+1024,+cov similarity index 100% rename from src/mint/afl-tests/id:000606,src:000000,op:int32,pos:53,val:+1024,+cov rename to src/exchange/afl-tests/id:000606,src:000000,op:int32,pos:53,val:+1024,+cov diff --git a/src/mint/afl-tests/id:000607,src:000000,op:ext_AO,pos:76,+cov b/src/exchange/afl-tests/id:000607,src:000000,op:ext_AO,pos:76,+cov similarity index 100% rename from src/mint/afl-tests/id:000607,src:000000,op:ext_AO,pos:76,+cov rename to src/exchange/afl-tests/id:000607,src:000000,op:ext_AO,pos:76,+cov diff --git a/src/mint/afl-tests/id:000607,src:000000,op:int32,pos:64,val:+256,+cov b/src/exchange/afl-tests/id:000607,src:000000,op:int32,pos:64,val:+256,+cov similarity index 100% rename from src/mint/afl-tests/id:000607,src:000000,op:int32,pos:64,val:+256,+cov rename to src/exchange/afl-tests/id:000607,src:000000,op:int32,pos:64,val:+256,+cov diff --git a/src/mint/afl-tests/id:000608,src:000000,op:ext_AO,pos:81,+cov b/src/exchange/afl-tests/id:000608,src:000000,op:ext_AO,pos:81,+cov similarity index 100% rename from src/mint/afl-tests/id:000608,src:000000,op:ext_AO,pos:81,+cov rename to src/exchange/afl-tests/id:000608,src:000000,op:ext_AO,pos:81,+cov diff --git a/src/mint/afl-tests/id:000608,src:000000,op:int32,pos:65,val:+1,+cov b/src/exchange/afl-tests/id:000608,src:000000,op:int32,pos:65,val:+1,+cov similarity index 100% rename from src/mint/afl-tests/id:000608,src:000000,op:int32,pos:65,val:+1,+cov rename to src/exchange/afl-tests/id:000608,src:000000,op:int32,pos:65,val:+1,+cov diff --git a/src/mint/afl-tests/id:000609,src:000000,op:ext_AO,pos:90,+cov b/src/exchange/afl-tests/id:000609,src:000000,op:ext_AO,pos:90,+cov similarity index 100% rename from src/mint/afl-tests/id:000609,src:000000,op:ext_AO,pos:90,+cov rename to src/exchange/afl-tests/id:000609,src:000000,op:ext_AO,pos:90,+cov diff --git a/src/mint/afl-tests/id:000609,src:000000,op:int32,pos:65,val:be:+64,+cov b/src/exchange/afl-tests/id:000609,src:000000,op:int32,pos:65,val:be:+64,+cov similarity index 100% rename from src/mint/afl-tests/id:000609,src:000000,op:int32,pos:65,val:be:+64,+cov rename to src/exchange/afl-tests/id:000609,src:000000,op:int32,pos:65,val:be:+64,+cov diff --git a/src/mint/afl-tests/id:000610,src:000000,op:ext_AO,pos:111,+cov b/src/exchange/afl-tests/id:000610,src:000000,op:ext_AO,pos:111,+cov similarity index 100% rename from src/mint/afl-tests/id:000610,src:000000,op:ext_AO,pos:111,+cov rename to src/exchange/afl-tests/id:000610,src:000000,op:ext_AO,pos:111,+cov diff --git a/src/mint/afl-tests/id:000610,src:000000,op:int32,pos:66,val:+16,+cov b/src/exchange/afl-tests/id:000610,src:000000,op:int32,pos:66,val:+16,+cov similarity index 100% rename from src/mint/afl-tests/id:000610,src:000000,op:int32,pos:66,val:+16,+cov rename to src/exchange/afl-tests/id:000610,src:000000,op:int32,pos:66,val:+16,+cov diff --git a/src/mint/afl-tests/id:000611,src:000000,op:ext_AO,pos:135,+cov b/src/exchange/afl-tests/id:000611,src:000000,op:ext_AO,pos:135,+cov similarity index 100% rename from src/mint/afl-tests/id:000611,src:000000,op:ext_AO,pos:135,+cov rename to src/exchange/afl-tests/id:000611,src:000000,op:ext_AO,pos:135,+cov diff --git a/src/mint/afl-tests/id:000611,src:000000,op:int32,pos:73,val:+100663045,+cov b/src/exchange/afl-tests/id:000611,src:000000,op:int32,pos:73,val:+100663045,+cov similarity index 100% rename from src/mint/afl-tests/id:000611,src:000000,op:int32,pos:73,val:+100663045,+cov rename to src/exchange/afl-tests/id:000611,src:000000,op:int32,pos:73,val:+100663045,+cov diff --git a/src/mint/afl-tests/id:000612,src:000000,op:ext_AO,pos:135,+cov b/src/exchange/afl-tests/id:000612,src:000000,op:ext_AO,pos:135,+cov similarity index 100% rename from src/mint/afl-tests/id:000612,src:000000,op:ext_AO,pos:135,+cov rename to src/exchange/afl-tests/id:000612,src:000000,op:ext_AO,pos:135,+cov diff --git a/src/mint/afl-tests/id:000612,src:000000,op:int32,pos:81,val:+0,+cov b/src/exchange/afl-tests/id:000612,src:000000,op:int32,pos:81,val:+0,+cov similarity index 100% rename from src/mint/afl-tests/id:000612,src:000000,op:int32,pos:81,val:+0,+cov rename to src/exchange/afl-tests/id:000612,src:000000,op:int32,pos:81,val:+0,+cov diff --git a/src/mint/afl-tests/id:000613,src:000000,op:ext_AO,pos:135,+cov b/src/exchange/afl-tests/id:000613,src:000000,op:ext_AO,pos:135,+cov similarity index 100% rename from src/mint/afl-tests/id:000613,src:000000,op:ext_AO,pos:135,+cov rename to src/exchange/afl-tests/id:000613,src:000000,op:ext_AO,pos:135,+cov diff --git a/src/mint/afl-tests/id:000613,src:000000,op:int32,pos:82,val:+32767,+cov b/src/exchange/afl-tests/id:000613,src:000000,op:int32,pos:82,val:+32767,+cov similarity index 100% rename from src/mint/afl-tests/id:000613,src:000000,op:int32,pos:82,val:+32767,+cov rename to src/exchange/afl-tests/id:000613,src:000000,op:int32,pos:82,val:+32767,+cov diff --git a/src/mint/afl-tests/id:000614,src:000000,op:ext_AO,pos:135,+cov b/src/exchange/afl-tests/id:000614,src:000000,op:ext_AO,pos:135,+cov similarity index 100% rename from src/mint/afl-tests/id:000614,src:000000,op:ext_AO,pos:135,+cov rename to src/exchange/afl-tests/id:000614,src:000000,op:ext_AO,pos:135,+cov diff --git a/src/mint/afl-tests/id:000614,src:000000,op:int32,pos:83,val:be:+1000,+cov b/src/exchange/afl-tests/id:000614,src:000000,op:int32,pos:83,val:be:+1000,+cov similarity index 100% rename from src/mint/afl-tests/id:000614,src:000000,op:int32,pos:83,val:be:+1000,+cov rename to src/exchange/afl-tests/id:000614,src:000000,op:int32,pos:83,val:be:+1000,+cov diff --git a/src/mint/afl-tests/id:000615,src:000000,op:ext_AO,pos:135,+cov b/src/exchange/afl-tests/id:000615,src:000000,op:ext_AO,pos:135,+cov similarity index 100% rename from src/mint/afl-tests/id:000615,src:000000,op:ext_AO,pos:135,+cov rename to src/exchange/afl-tests/id:000615,src:000000,op:ext_AO,pos:135,+cov diff --git a/src/mint/afl-tests/id:000615,src:000000,op:int32,pos:84,val:-129,+cov b/src/exchange/afl-tests/id:000615,src:000000,op:int32,pos:84,val:-129,+cov similarity index 100% rename from src/mint/afl-tests/id:000615,src:000000,op:int32,pos:84,val:-129,+cov rename to src/exchange/afl-tests/id:000615,src:000000,op:int32,pos:84,val:-129,+cov diff --git a/src/mint/afl-tests/id:000616,src:000000,op:ext_AO,pos:136,+cov b/src/exchange/afl-tests/id:000616,src:000000,op:ext_AO,pos:136,+cov similarity index 100% rename from src/mint/afl-tests/id:000616,src:000000,op:ext_AO,pos:136,+cov rename to src/exchange/afl-tests/id:000616,src:000000,op:ext_AO,pos:136,+cov diff --git a/src/mint/afl-tests/id:000616,src:000000,op:int32,pos:84,val:+65536,+cov b/src/exchange/afl-tests/id:000616,src:000000,op:int32,pos:84,val:+65536,+cov similarity index 100% rename from src/mint/afl-tests/id:000616,src:000000,op:int32,pos:84,val:+65536,+cov rename to src/exchange/afl-tests/id:000616,src:000000,op:int32,pos:84,val:+65536,+cov diff --git a/src/mint/afl-tests/id:000617,src:000000,op:ext_AO,pos:136,+cov b/src/exchange/afl-tests/id:000617,src:000000,op:ext_AO,pos:136,+cov similarity index 100% rename from src/mint/afl-tests/id:000617,src:000000,op:ext_AO,pos:136,+cov rename to src/exchange/afl-tests/id:000617,src:000000,op:ext_AO,pos:136,+cov diff --git a/src/mint/afl-tests/id:000617,src:000000,op:int32,pos:85,val:be:+255,+cov b/src/exchange/afl-tests/id:000617,src:000000,op:int32,pos:85,val:be:+255,+cov similarity index 100% rename from src/mint/afl-tests/id:000617,src:000000,op:int32,pos:85,val:be:+255,+cov rename to src/exchange/afl-tests/id:000617,src:000000,op:int32,pos:85,val:be:+255,+cov diff --git a/src/mint/afl-tests/id:000618,src:000000,op:ext_AO,pos:137,+cov b/src/exchange/afl-tests/id:000618,src:000000,op:ext_AO,pos:137,+cov similarity index 100% rename from src/mint/afl-tests/id:000618,src:000000,op:ext_AO,pos:137,+cov rename to src/exchange/afl-tests/id:000618,src:000000,op:ext_AO,pos:137,+cov diff --git a/src/mint/afl-tests/id:000618,src:000000,op:int32,pos:85,val:-32769,+cov b/src/exchange/afl-tests/id:000618,src:000000,op:int32,pos:85,val:-32769,+cov similarity index 100% rename from src/mint/afl-tests/id:000618,src:000000,op:int32,pos:85,val:-32769,+cov rename to src/exchange/afl-tests/id:000618,src:000000,op:int32,pos:85,val:-32769,+cov diff --git a/src/mint/afl-tests/id:000619,src:000000,op:ext_AO,pos:137,+cov b/src/exchange/afl-tests/id:000619,src:000000,op:ext_AO,pos:137,+cov similarity index 100% rename from src/mint/afl-tests/id:000619,src:000000,op:ext_AO,pos:137,+cov rename to src/exchange/afl-tests/id:000619,src:000000,op:ext_AO,pos:137,+cov diff --git a/src/mint/afl-tests/id:000619,src:000000,op:int32,pos:88,val:be:-32768,+cov b/src/exchange/afl-tests/id:000619,src:000000,op:int32,pos:88,val:be:-32768,+cov similarity index 100% rename from src/mint/afl-tests/id:000619,src:000000,op:int32,pos:88,val:be:-32768,+cov rename to src/exchange/afl-tests/id:000619,src:000000,op:int32,pos:88,val:be:-32768,+cov diff --git a/src/mint/afl-tests/id:000620,src:000000,op:ext_AO,pos:138,+cov b/src/exchange/afl-tests/id:000620,src:000000,op:ext_AO,pos:138,+cov similarity index 100% rename from src/mint/afl-tests/id:000620,src:000000,op:ext_AO,pos:138,+cov rename to src/exchange/afl-tests/id:000620,src:000000,op:ext_AO,pos:138,+cov diff --git a/src/mint/afl-tests/id:000620,src:000000,op:int32,pos:91,val:+127,+cov b/src/exchange/afl-tests/id:000620,src:000000,op:int32,pos:91,val:+127,+cov similarity index 100% rename from src/mint/afl-tests/id:000620,src:000000,op:int32,pos:91,val:+127,+cov rename to src/exchange/afl-tests/id:000620,src:000000,op:int32,pos:91,val:+127,+cov diff --git a/src/mint/afl-tests/id:000621,src:000000,op:ext_AO,pos:142,+cov b/src/exchange/afl-tests/id:000621,src:000000,op:ext_AO,pos:142,+cov similarity index 100% rename from src/mint/afl-tests/id:000621,src:000000,op:ext_AO,pos:142,+cov rename to src/exchange/afl-tests/id:000621,src:000000,op:ext_AO,pos:142,+cov diff --git a/src/mint/afl-tests/id:000621,src:000000,op:int32,pos:92,val:-32768,+cov b/src/exchange/afl-tests/id:000621,src:000000,op:int32,pos:92,val:-32768,+cov similarity index 100% rename from src/mint/afl-tests/id:000621,src:000000,op:int32,pos:92,val:-32768,+cov rename to src/exchange/afl-tests/id:000621,src:000000,op:int32,pos:92,val:-32768,+cov diff --git a/src/mint/afl-tests/id:000622,src:000000,op:ext_AO,pos:143,+cov b/src/exchange/afl-tests/id:000622,src:000000,op:ext_AO,pos:143,+cov similarity index 100% rename from src/mint/afl-tests/id:000622,src:000000,op:ext_AO,pos:143,+cov rename to src/exchange/afl-tests/id:000622,src:000000,op:ext_AO,pos:143,+cov diff --git a/src/mint/afl-tests/id:000622,src:000000,op:int32,pos:98,val:-129,+cov b/src/exchange/afl-tests/id:000622,src:000000,op:int32,pos:98,val:-129,+cov similarity index 100% rename from src/mint/afl-tests/id:000622,src:000000,op:int32,pos:98,val:-129,+cov rename to src/exchange/afl-tests/id:000622,src:000000,op:int32,pos:98,val:-129,+cov diff --git a/src/mint/afl-tests/id:000623,src:000000,op:ext_AO,pos:144,+cov b/src/exchange/afl-tests/id:000623,src:000000,op:ext_AO,pos:144,+cov similarity index 100% rename from src/mint/afl-tests/id:000623,src:000000,op:ext_AO,pos:144,+cov rename to src/exchange/afl-tests/id:000623,src:000000,op:ext_AO,pos:144,+cov diff --git a/src/mint/afl-tests/id:000623,src:000000,op:int32,pos:128,val:-32769,+cov b/src/exchange/afl-tests/id:000623,src:000000,op:int32,pos:128,val:-32769,+cov similarity index 100% rename from src/mint/afl-tests/id:000623,src:000000,op:int32,pos:128,val:-32769,+cov rename to src/exchange/afl-tests/id:000623,src:000000,op:int32,pos:128,val:-32769,+cov diff --git a/src/mint/afl-tests/id:000624,src:000000,op:ext_AO,pos:144,+cov b/src/exchange/afl-tests/id:000624,src:000000,op:ext_AO,pos:144,+cov similarity index 100% rename from src/mint/afl-tests/id:000624,src:000000,op:ext_AO,pos:144,+cov rename to src/exchange/afl-tests/id:000624,src:000000,op:ext_AO,pos:144,+cov diff --git a/src/mint/afl-tests/id:000624,src:000000,op:int32,pos:160,val:be:+512,+cov b/src/exchange/afl-tests/id:000624,src:000000,op:int32,pos:160,val:be:+512,+cov similarity index 100% rename from src/mint/afl-tests/id:000624,src:000000,op:int32,pos:160,val:be:+512,+cov rename to src/exchange/afl-tests/id:000624,src:000000,op:int32,pos:160,val:be:+512,+cov diff --git a/src/mint/afl-tests/id:000625,src:000000,op:ext_AO,pos:145,+cov b/src/exchange/afl-tests/id:000625,src:000000,op:ext_AO,pos:145,+cov similarity index 100% rename from src/mint/afl-tests/id:000625,src:000000,op:ext_AO,pos:145,+cov rename to src/exchange/afl-tests/id:000625,src:000000,op:ext_AO,pos:145,+cov diff --git a/src/mint/afl-tests/id:000625,src:000000,op:int32,pos:203,val:be:+1,+cov b/src/exchange/afl-tests/id:000625,src:000000,op:int32,pos:203,val:be:+1,+cov similarity index 100% rename from src/mint/afl-tests/id:000625,src:000000,op:int32,pos:203,val:be:+1,+cov rename to src/exchange/afl-tests/id:000625,src:000000,op:int32,pos:203,val:be:+1,+cov diff --git a/src/mint/afl-tests/id:000626,src:000000,op:ext_AO,pos:146,+cov b/src/exchange/afl-tests/id:000626,src:000000,op:ext_AO,pos:146,+cov similarity index 100% rename from src/mint/afl-tests/id:000626,src:000000,op:ext_AO,pos:146,+cov rename to src/exchange/afl-tests/id:000626,src:000000,op:ext_AO,pos:146,+cov diff --git a/src/mint/afl-tests/id:000626,src:000000,op:int32,pos:263,val:+0,+cov b/src/exchange/afl-tests/id:000626,src:000000,op:int32,pos:263,val:+0,+cov similarity index 100% rename from src/mint/afl-tests/id:000626,src:000000,op:int32,pos:263,val:+0,+cov rename to src/exchange/afl-tests/id:000626,src:000000,op:int32,pos:263,val:+0,+cov diff --git a/src/mint/afl-tests/id:000627,src:000000,op:ext_AO,pos:146,+cov b/src/exchange/afl-tests/id:000627,src:000000,op:ext_AO,pos:146,+cov similarity index 100% rename from src/mint/afl-tests/id:000627,src:000000,op:ext_AO,pos:146,+cov rename to src/exchange/afl-tests/id:000627,src:000000,op:ext_AO,pos:146,+cov diff --git a/src/mint/afl-tests/id:000627,src:000000,op:int32,pos:264,val:be:-32769,+cov b/src/exchange/afl-tests/id:000627,src:000000,op:int32,pos:264,val:be:-32769,+cov similarity index 100% rename from src/mint/afl-tests/id:000627,src:000000,op:int32,pos:264,val:be:-32769,+cov rename to src/exchange/afl-tests/id:000627,src:000000,op:int32,pos:264,val:be:-32769,+cov diff --git a/src/mint/afl-tests/id:000628,src:000000,op:ext_AO,pos:147,+cov b/src/exchange/afl-tests/id:000628,src:000000,op:ext_AO,pos:147,+cov similarity index 100% rename from src/mint/afl-tests/id:000628,src:000000,op:ext_AO,pos:147,+cov rename to src/exchange/afl-tests/id:000628,src:000000,op:ext_AO,pos:147,+cov diff --git a/src/mint/afl-tests/id:000628,src:000000,op:int32,pos:285,val:+100663045,+cov b/src/exchange/afl-tests/id:000628,src:000000,op:int32,pos:285,val:+100663045,+cov similarity index 100% rename from src/mint/afl-tests/id:000628,src:000000,op:int32,pos:285,val:+100663045,+cov rename to src/exchange/afl-tests/id:000628,src:000000,op:int32,pos:285,val:+100663045,+cov diff --git a/src/mint/afl-tests/id:000629,src:000000,op:ext_AO,pos:147,+cov b/src/exchange/afl-tests/id:000629,src:000000,op:ext_AO,pos:147,+cov similarity index 100% rename from src/mint/afl-tests/id:000629,src:000000,op:ext_AO,pos:147,+cov rename to src/exchange/afl-tests/id:000629,src:000000,op:ext_AO,pos:147,+cov diff --git a/src/mint/afl-tests/id:000629,src:000000,op:ext_AO,pos:34,+cov b/src/exchange/afl-tests/id:000629,src:000000,op:ext_AO,pos:34,+cov similarity index 100% rename from src/mint/afl-tests/id:000629,src:000000,op:ext_AO,pos:34,+cov rename to src/exchange/afl-tests/id:000629,src:000000,op:ext_AO,pos:34,+cov diff --git a/src/mint/afl-tests/id:000630,src:000000,op:ext_AO,pos:148,+cov b/src/exchange/afl-tests/id:000630,src:000000,op:ext_AO,pos:148,+cov similarity index 100% rename from src/mint/afl-tests/id:000630,src:000000,op:ext_AO,pos:148,+cov rename to src/exchange/afl-tests/id:000630,src:000000,op:ext_AO,pos:148,+cov diff --git a/src/mint/afl-tests/id:000630,src:000000,op:ext_AO,pos:34,+cov b/src/exchange/afl-tests/id:000630,src:000000,op:ext_AO,pos:34,+cov similarity index 100% rename from src/mint/afl-tests/id:000630,src:000000,op:ext_AO,pos:34,+cov rename to src/exchange/afl-tests/id:000630,src:000000,op:ext_AO,pos:34,+cov diff --git a/src/mint/afl-tests/id:000631,src:000000,op:ext_AO,pos:148 b/src/exchange/afl-tests/id:000631,src:000000,op:ext_AO,pos:148 similarity index 100% rename from src/mint/afl-tests/id:000631,src:000000,op:ext_AO,pos:148 rename to src/exchange/afl-tests/id:000631,src:000000,op:ext_AO,pos:148 diff --git a/src/mint/afl-tests/id:000631,src:000000,op:ext_AO,pos:37,+cov b/src/exchange/afl-tests/id:000631,src:000000,op:ext_AO,pos:37,+cov similarity index 100% rename from src/mint/afl-tests/id:000631,src:000000,op:ext_AO,pos:37,+cov rename to src/exchange/afl-tests/id:000631,src:000000,op:ext_AO,pos:37,+cov diff --git a/src/mint/afl-tests/id:000632,src:000000,op:ext_AO,pos:149,+cov b/src/exchange/afl-tests/id:000632,src:000000,op:ext_AO,pos:149,+cov similarity index 100% rename from src/mint/afl-tests/id:000632,src:000000,op:ext_AO,pos:149,+cov rename to src/exchange/afl-tests/id:000632,src:000000,op:ext_AO,pos:149,+cov diff --git a/src/mint/afl-tests/id:000632,src:000000,op:ext_AO,pos:39,+cov b/src/exchange/afl-tests/id:000632,src:000000,op:ext_AO,pos:39,+cov similarity index 100% rename from src/mint/afl-tests/id:000632,src:000000,op:ext_AO,pos:39,+cov rename to src/exchange/afl-tests/id:000632,src:000000,op:ext_AO,pos:39,+cov diff --git a/src/mint/afl-tests/id:000633,src:000000,op:ext_AO,pos:152,+cov b/src/exchange/afl-tests/id:000633,src:000000,op:ext_AO,pos:152,+cov similarity index 100% rename from src/mint/afl-tests/id:000633,src:000000,op:ext_AO,pos:152,+cov rename to src/exchange/afl-tests/id:000633,src:000000,op:ext_AO,pos:152,+cov diff --git a/src/mint/afl-tests/id:000633,src:000000,op:ext_AO,pos:49,+cov b/src/exchange/afl-tests/id:000633,src:000000,op:ext_AO,pos:49,+cov similarity index 100% rename from src/mint/afl-tests/id:000633,src:000000,op:ext_AO,pos:49,+cov rename to src/exchange/afl-tests/id:000633,src:000000,op:ext_AO,pos:49,+cov diff --git a/src/mint/afl-tests/id:000634,src:000000,op:ext_AO,pos:154 b/src/exchange/afl-tests/id:000634,src:000000,op:ext_AO,pos:154 similarity index 100% rename from src/mint/afl-tests/id:000634,src:000000,op:ext_AO,pos:154 rename to src/exchange/afl-tests/id:000634,src:000000,op:ext_AO,pos:154 diff --git a/src/mint/afl-tests/id:000634,src:000000,op:ext_AO,pos:51,+cov b/src/exchange/afl-tests/id:000634,src:000000,op:ext_AO,pos:51,+cov similarity index 100% rename from src/mint/afl-tests/id:000634,src:000000,op:ext_AO,pos:51,+cov rename to src/exchange/afl-tests/id:000634,src:000000,op:ext_AO,pos:51,+cov diff --git a/src/mint/afl-tests/id:000635,src:000000,op:ext_AO,pos:155,+cov b/src/exchange/afl-tests/id:000635,src:000000,op:ext_AO,pos:155,+cov similarity index 100% rename from src/mint/afl-tests/id:000635,src:000000,op:ext_AO,pos:155,+cov rename to src/exchange/afl-tests/id:000635,src:000000,op:ext_AO,pos:155,+cov diff --git a/src/mint/afl-tests/id:000635,src:000000,op:ext_AO,pos:52,+cov b/src/exchange/afl-tests/id:000635,src:000000,op:ext_AO,pos:52,+cov similarity index 100% rename from src/mint/afl-tests/id:000635,src:000000,op:ext_AO,pos:52,+cov rename to src/exchange/afl-tests/id:000635,src:000000,op:ext_AO,pos:52,+cov diff --git a/src/mint/afl-tests/id:000636,src:000000,op:ext_AO,pos:156,+cov b/src/exchange/afl-tests/id:000636,src:000000,op:ext_AO,pos:156,+cov similarity index 100% rename from src/mint/afl-tests/id:000636,src:000000,op:ext_AO,pos:156,+cov rename to src/exchange/afl-tests/id:000636,src:000000,op:ext_AO,pos:156,+cov diff --git a/src/mint/afl-tests/id:000636,src:000000,op:ext_AO,pos:52,+cov b/src/exchange/afl-tests/id:000636,src:000000,op:ext_AO,pos:52,+cov similarity index 100% rename from src/mint/afl-tests/id:000636,src:000000,op:ext_AO,pos:52,+cov rename to src/exchange/afl-tests/id:000636,src:000000,op:ext_AO,pos:52,+cov diff --git a/src/mint/afl-tests/id:000637,src:000000,op:ext_AO,pos:157 b/src/exchange/afl-tests/id:000637,src:000000,op:ext_AO,pos:157 similarity index 100% rename from src/mint/afl-tests/id:000637,src:000000,op:ext_AO,pos:157 rename to src/exchange/afl-tests/id:000637,src:000000,op:ext_AO,pos:157 diff --git a/src/mint/afl-tests/id:000637,src:000000,op:ext_AO,pos:58,+cov b/src/exchange/afl-tests/id:000637,src:000000,op:ext_AO,pos:58,+cov similarity index 100% rename from src/mint/afl-tests/id:000637,src:000000,op:ext_AO,pos:58,+cov rename to src/exchange/afl-tests/id:000637,src:000000,op:ext_AO,pos:58,+cov diff --git a/src/mint/afl-tests/id:000638,src:000000,op:ext_AO,pos:159,+cov b/src/exchange/afl-tests/id:000638,src:000000,op:ext_AO,pos:159,+cov similarity index 100% rename from src/mint/afl-tests/id:000638,src:000000,op:ext_AO,pos:159,+cov rename to src/exchange/afl-tests/id:000638,src:000000,op:ext_AO,pos:159,+cov diff --git a/src/mint/afl-tests/id:000638,src:000000,op:ext_AO,pos:64,+cov b/src/exchange/afl-tests/id:000638,src:000000,op:ext_AO,pos:64,+cov similarity index 100% rename from src/mint/afl-tests/id:000638,src:000000,op:ext_AO,pos:64,+cov rename to src/exchange/afl-tests/id:000638,src:000000,op:ext_AO,pos:64,+cov diff --git a/src/mint/afl-tests/id:000639,src:000000,op:ext_AO,pos:161,+cov b/src/exchange/afl-tests/id:000639,src:000000,op:ext_AO,pos:161,+cov similarity index 100% rename from src/mint/afl-tests/id:000639,src:000000,op:ext_AO,pos:161,+cov rename to src/exchange/afl-tests/id:000639,src:000000,op:ext_AO,pos:161,+cov diff --git a/src/mint/afl-tests/id:000639,src:000000,op:ext_AO,pos:86,+cov b/src/exchange/afl-tests/id:000639,src:000000,op:ext_AO,pos:86,+cov similarity index 100% rename from src/mint/afl-tests/id:000639,src:000000,op:ext_AO,pos:86,+cov rename to src/exchange/afl-tests/id:000639,src:000000,op:ext_AO,pos:86,+cov diff --git a/src/mint/afl-tests/id:000640,src:000000,op:ext_AO,pos:166,+cov b/src/exchange/afl-tests/id:000640,src:000000,op:ext_AO,pos:166,+cov similarity index 100% rename from src/mint/afl-tests/id:000640,src:000000,op:ext_AO,pos:166,+cov rename to src/exchange/afl-tests/id:000640,src:000000,op:ext_AO,pos:166,+cov diff --git a/src/mint/afl-tests/id:000640,src:000000,op:ext_AO,pos:88,+cov b/src/exchange/afl-tests/id:000640,src:000000,op:ext_AO,pos:88,+cov similarity index 100% rename from src/mint/afl-tests/id:000640,src:000000,op:ext_AO,pos:88,+cov rename to src/exchange/afl-tests/id:000640,src:000000,op:ext_AO,pos:88,+cov diff --git a/src/mint/afl-tests/id:000641,src:000000,op:ext_AO,pos:168,+cov b/src/exchange/afl-tests/id:000641,src:000000,op:ext_AO,pos:168,+cov similarity index 100% rename from src/mint/afl-tests/id:000641,src:000000,op:ext_AO,pos:168,+cov rename to src/exchange/afl-tests/id:000641,src:000000,op:ext_AO,pos:168,+cov diff --git a/src/mint/afl-tests/id:000641,src:000000,op:ext_AO,pos:93,+cov b/src/exchange/afl-tests/id:000641,src:000000,op:ext_AO,pos:93,+cov similarity index 100% rename from src/mint/afl-tests/id:000641,src:000000,op:ext_AO,pos:93,+cov rename to src/exchange/afl-tests/id:000641,src:000000,op:ext_AO,pos:93,+cov diff --git a/src/mint/afl-tests/id:000642,src:000000,op:ext_AO,pos:135,+cov b/src/exchange/afl-tests/id:000642,src:000000,op:ext_AO,pos:135,+cov similarity index 100% rename from src/mint/afl-tests/id:000642,src:000000,op:ext_AO,pos:135,+cov rename to src/exchange/afl-tests/id:000642,src:000000,op:ext_AO,pos:135,+cov diff --git a/src/mint/afl-tests/id:000642,src:000000,op:ext_AO,pos:169,+cov b/src/exchange/afl-tests/id:000642,src:000000,op:ext_AO,pos:169,+cov similarity index 100% rename from src/mint/afl-tests/id:000642,src:000000,op:ext_AO,pos:169,+cov rename to src/exchange/afl-tests/id:000642,src:000000,op:ext_AO,pos:169,+cov diff --git a/src/mint/afl-tests/id:000643,src:000000,op:ext_AO,pos:136,+cov b/src/exchange/afl-tests/id:000643,src:000000,op:ext_AO,pos:136,+cov similarity index 100% rename from src/mint/afl-tests/id:000643,src:000000,op:ext_AO,pos:136,+cov rename to src/exchange/afl-tests/id:000643,src:000000,op:ext_AO,pos:136,+cov diff --git a/src/mint/afl-tests/id:000643,src:000000,op:ext_AO,pos:173,+cov b/src/exchange/afl-tests/id:000643,src:000000,op:ext_AO,pos:173,+cov similarity index 100% rename from src/mint/afl-tests/id:000643,src:000000,op:ext_AO,pos:173,+cov rename to src/exchange/afl-tests/id:000643,src:000000,op:ext_AO,pos:173,+cov diff --git a/src/mint/afl-tests/id:000644,src:000000,op:ext_AO,pos:138,+cov b/src/exchange/afl-tests/id:000644,src:000000,op:ext_AO,pos:138,+cov similarity index 100% rename from src/mint/afl-tests/id:000644,src:000000,op:ext_AO,pos:138,+cov rename to src/exchange/afl-tests/id:000644,src:000000,op:ext_AO,pos:138,+cov diff --git a/src/mint/afl-tests/id:000644,src:000000,op:ext_AO,pos:174,+cov b/src/exchange/afl-tests/id:000644,src:000000,op:ext_AO,pos:174,+cov similarity index 100% rename from src/mint/afl-tests/id:000644,src:000000,op:ext_AO,pos:174,+cov rename to src/exchange/afl-tests/id:000644,src:000000,op:ext_AO,pos:174,+cov diff --git a/src/mint/afl-tests/id:000645,src:000000,op:ext_AO,pos:140,+cov b/src/exchange/afl-tests/id:000645,src:000000,op:ext_AO,pos:140,+cov similarity index 100% rename from src/mint/afl-tests/id:000645,src:000000,op:ext_AO,pos:140,+cov rename to src/exchange/afl-tests/id:000645,src:000000,op:ext_AO,pos:140,+cov diff --git a/src/mint/afl-tests/id:000645,src:000000,op:ext_AO,pos:174,+cov b/src/exchange/afl-tests/id:000645,src:000000,op:ext_AO,pos:174,+cov similarity index 100% rename from src/mint/afl-tests/id:000645,src:000000,op:ext_AO,pos:174,+cov rename to src/exchange/afl-tests/id:000645,src:000000,op:ext_AO,pos:174,+cov diff --git a/src/mint/afl-tests/id:000646,src:000000,op:ext_AO,pos:143,+cov b/src/exchange/afl-tests/id:000646,src:000000,op:ext_AO,pos:143,+cov similarity index 100% rename from src/mint/afl-tests/id:000646,src:000000,op:ext_AO,pos:143,+cov rename to src/exchange/afl-tests/id:000646,src:000000,op:ext_AO,pos:143,+cov diff --git a/src/mint/afl-tests/id:000646,src:000000,op:ext_AO,pos:184,+cov b/src/exchange/afl-tests/id:000646,src:000000,op:ext_AO,pos:184,+cov similarity index 100% rename from src/mint/afl-tests/id:000646,src:000000,op:ext_AO,pos:184,+cov rename to src/exchange/afl-tests/id:000646,src:000000,op:ext_AO,pos:184,+cov diff --git a/src/mint/afl-tests/id:000647,src:000000,op:ext_AO,pos:144,+cov b/src/exchange/afl-tests/id:000647,src:000000,op:ext_AO,pos:144,+cov similarity index 100% rename from src/mint/afl-tests/id:000647,src:000000,op:ext_AO,pos:144,+cov rename to src/exchange/afl-tests/id:000647,src:000000,op:ext_AO,pos:144,+cov diff --git a/src/mint/afl-tests/id:000647,src:000000,op:ext_AO,pos:191,+cov b/src/exchange/afl-tests/id:000647,src:000000,op:ext_AO,pos:191,+cov similarity index 100% rename from src/mint/afl-tests/id:000647,src:000000,op:ext_AO,pos:191,+cov rename to src/exchange/afl-tests/id:000647,src:000000,op:ext_AO,pos:191,+cov diff --git a/src/mint/afl-tests/id:000648,src:000000,op:ext_AO,pos:155,+cov b/src/exchange/afl-tests/id:000648,src:000000,op:ext_AO,pos:155,+cov similarity index 100% rename from src/mint/afl-tests/id:000648,src:000000,op:ext_AO,pos:155,+cov rename to src/exchange/afl-tests/id:000648,src:000000,op:ext_AO,pos:155,+cov diff --git a/src/mint/afl-tests/id:000648,src:000000,op:ext_AO,pos:216,+cov b/src/exchange/afl-tests/id:000648,src:000000,op:ext_AO,pos:216,+cov similarity index 100% rename from src/mint/afl-tests/id:000648,src:000000,op:ext_AO,pos:216,+cov rename to src/exchange/afl-tests/id:000648,src:000000,op:ext_AO,pos:216,+cov diff --git a/src/mint/afl-tests/id:000649,src:000000,op:ext_AO,pos:166,+cov b/src/exchange/afl-tests/id:000649,src:000000,op:ext_AO,pos:166,+cov similarity index 100% rename from src/mint/afl-tests/id:000649,src:000000,op:ext_AO,pos:166,+cov rename to src/exchange/afl-tests/id:000649,src:000000,op:ext_AO,pos:166,+cov diff --git a/src/mint/afl-tests/id:000649,src:000000,op:ext_AO,pos:236,+cov b/src/exchange/afl-tests/id:000649,src:000000,op:ext_AO,pos:236,+cov similarity index 100% rename from src/mint/afl-tests/id:000649,src:000000,op:ext_AO,pos:236,+cov rename to src/exchange/afl-tests/id:000649,src:000000,op:ext_AO,pos:236,+cov diff --git a/src/mint/afl-tests/id:000650,src:000000,op:ext_AO,pos:166,+cov b/src/exchange/afl-tests/id:000650,src:000000,op:ext_AO,pos:166,+cov similarity index 100% rename from src/mint/afl-tests/id:000650,src:000000,op:ext_AO,pos:166,+cov rename to src/exchange/afl-tests/id:000650,src:000000,op:ext_AO,pos:166,+cov diff --git a/src/mint/afl-tests/id:000650,src:000000,op:ext_AO,pos:270,+cov b/src/exchange/afl-tests/id:000650,src:000000,op:ext_AO,pos:270,+cov similarity index 100% rename from src/mint/afl-tests/id:000650,src:000000,op:ext_AO,pos:270,+cov rename to src/exchange/afl-tests/id:000650,src:000000,op:ext_AO,pos:270,+cov diff --git a/src/mint/afl-tests/id:000651,src:000000,op:ext_AO,pos:173,+cov b/src/exchange/afl-tests/id:000651,src:000000,op:ext_AO,pos:173,+cov similarity index 100% rename from src/mint/afl-tests/id:000651,src:000000,op:ext_AO,pos:173,+cov rename to src/exchange/afl-tests/id:000651,src:000000,op:ext_AO,pos:173,+cov diff --git a/src/mint/afl-tests/id:000651,src:000000,op:ext_AO,pos:270,+cov b/src/exchange/afl-tests/id:000651,src:000000,op:ext_AO,pos:270,+cov similarity index 100% rename from src/mint/afl-tests/id:000651,src:000000,op:ext_AO,pos:270,+cov rename to src/exchange/afl-tests/id:000651,src:000000,op:ext_AO,pos:270,+cov diff --git a/src/mint/afl-tests/id:000652,src:000000,op:ext_AO,pos:175,+cov b/src/exchange/afl-tests/id:000652,src:000000,op:ext_AO,pos:175,+cov similarity index 100% rename from src/mint/afl-tests/id:000652,src:000000,op:ext_AO,pos:175,+cov rename to src/exchange/afl-tests/id:000652,src:000000,op:ext_AO,pos:175,+cov diff --git a/src/mint/afl-tests/id:000652,src:000000,op:ext_AO,pos:272,+cov b/src/exchange/afl-tests/id:000652,src:000000,op:ext_AO,pos:272,+cov similarity index 100% rename from src/mint/afl-tests/id:000652,src:000000,op:ext_AO,pos:272,+cov rename to src/exchange/afl-tests/id:000652,src:000000,op:ext_AO,pos:272,+cov diff --git a/src/mint/afl-tests/id:000653,src:000000,op:ext_AO,pos:176,+cov b/src/exchange/afl-tests/id:000653,src:000000,op:ext_AO,pos:176,+cov similarity index 100% rename from src/mint/afl-tests/id:000653,src:000000,op:ext_AO,pos:176,+cov rename to src/exchange/afl-tests/id:000653,src:000000,op:ext_AO,pos:176,+cov diff --git a/src/mint/afl-tests/id:000653,src:000000,op:ext_AO,pos:283,+cov b/src/exchange/afl-tests/id:000653,src:000000,op:ext_AO,pos:283,+cov similarity index 100% rename from src/mint/afl-tests/id:000653,src:000000,op:ext_AO,pos:283,+cov rename to src/exchange/afl-tests/id:000653,src:000000,op:ext_AO,pos:283,+cov diff --git a/src/mint/afl-tests/id:000654,src:000000,op:ext_AO,pos:177,+cov b/src/exchange/afl-tests/id:000654,src:000000,op:ext_AO,pos:177,+cov similarity index 100% rename from src/mint/afl-tests/id:000654,src:000000,op:ext_AO,pos:177,+cov rename to src/exchange/afl-tests/id:000654,src:000000,op:ext_AO,pos:177,+cov diff --git a/src/mint/afl-tests/id:000654,src:000000,op:ext_AO,pos:305,+cov b/src/exchange/afl-tests/id:000654,src:000000,op:ext_AO,pos:305,+cov similarity index 100% rename from src/mint/afl-tests/id:000654,src:000000,op:ext_AO,pos:305,+cov rename to src/exchange/afl-tests/id:000654,src:000000,op:ext_AO,pos:305,+cov diff --git a/src/mint/afl-tests/id:000655,src:000000,op:ext_AO,pos:177,+cov b/src/exchange/afl-tests/id:000655,src:000000,op:ext_AO,pos:177,+cov similarity index 100% rename from src/mint/afl-tests/id:000655,src:000000,op:ext_AO,pos:177,+cov rename to src/exchange/afl-tests/id:000655,src:000000,op:ext_AO,pos:177,+cov diff --git a/src/mint/afl-tests/id:000655,src:000000,op:ext_AO,pos:305,+cov b/src/exchange/afl-tests/id:000655,src:000000,op:ext_AO,pos:305,+cov similarity index 100% rename from src/mint/afl-tests/id:000655,src:000000,op:ext_AO,pos:305,+cov rename to src/exchange/afl-tests/id:000655,src:000000,op:ext_AO,pos:305,+cov diff --git a/src/mint/afl-tests/id:000656,src:000000,op:ext_AO,pos:177,+cov b/src/exchange/afl-tests/id:000656,src:000000,op:ext_AO,pos:177,+cov similarity index 100% rename from src/mint/afl-tests/id:000656,src:000000,op:ext_AO,pos:177,+cov rename to src/exchange/afl-tests/id:000656,src:000000,op:ext_AO,pos:177,+cov diff --git a/src/mint/afl-tests/id:000656,src:000000,op:ext_AO,pos:313,+cov b/src/exchange/afl-tests/id:000656,src:000000,op:ext_AO,pos:313,+cov similarity index 100% rename from src/mint/afl-tests/id:000656,src:000000,op:ext_AO,pos:313,+cov rename to src/exchange/afl-tests/id:000656,src:000000,op:ext_AO,pos:313,+cov diff --git a/src/mint/afl-tests/id:000657,src:000000,op:ext_AO,pos:180,+cov b/src/exchange/afl-tests/id:000657,src:000000,op:ext_AO,pos:180,+cov similarity index 100% rename from src/mint/afl-tests/id:000657,src:000000,op:ext_AO,pos:180,+cov rename to src/exchange/afl-tests/id:000657,src:000000,op:ext_AO,pos:180,+cov diff --git a/src/mint/afl-tests/id:000657,src:000000,op:ext_AO,pos:315,+cov b/src/exchange/afl-tests/id:000657,src:000000,op:ext_AO,pos:315,+cov similarity index 100% rename from src/mint/afl-tests/id:000657,src:000000,op:ext_AO,pos:315,+cov rename to src/exchange/afl-tests/id:000657,src:000000,op:ext_AO,pos:315,+cov diff --git a/src/mint/afl-tests/id:000658,src:000000,op:ext_AO,pos:182,+cov b/src/exchange/afl-tests/id:000658,src:000000,op:ext_AO,pos:182,+cov similarity index 100% rename from src/mint/afl-tests/id:000658,src:000000,op:ext_AO,pos:182,+cov rename to src/exchange/afl-tests/id:000658,src:000000,op:ext_AO,pos:182,+cov diff --git a/src/mint/afl-tests/id:000658,src:000000,op:ext_AO,pos:326 b/src/exchange/afl-tests/id:000658,src:000000,op:ext_AO,pos:326 similarity index 100% rename from src/mint/afl-tests/id:000658,src:000000,op:ext_AO,pos:326 rename to src/exchange/afl-tests/id:000658,src:000000,op:ext_AO,pos:326 diff --git a/src/mint/afl-tests/id:000659,src:000000,op:ext_AO,pos:269,+cov b/src/exchange/afl-tests/id:000659,src:000000,op:ext_AO,pos:269,+cov similarity index 100% rename from src/mint/afl-tests/id:000659,src:000000,op:ext_AO,pos:269,+cov rename to src/exchange/afl-tests/id:000659,src:000000,op:ext_AO,pos:269,+cov diff --git a/src/mint/afl-tests/id:000659,src:000000,op:havoc,rep:4 b/src/exchange/afl-tests/id:000659,src:000000,op:havoc,rep:4 similarity index 100% rename from src/mint/afl-tests/id:000659,src:000000,op:havoc,rep:4 rename to src/exchange/afl-tests/id:000659,src:000000,op:havoc,rep:4 diff --git a/src/mint/afl-tests/id:000660,src:000000,op:ext_AO,pos:270,+cov b/src/exchange/afl-tests/id:000660,src:000000,op:ext_AO,pos:270,+cov similarity index 100% rename from src/mint/afl-tests/id:000660,src:000000,op:ext_AO,pos:270,+cov rename to src/exchange/afl-tests/id:000660,src:000000,op:ext_AO,pos:270,+cov diff --git a/src/mint/afl-tests/id:000660,src:000000,op:havoc,rep:32 b/src/exchange/afl-tests/id:000660,src:000000,op:havoc,rep:32 similarity index 100% rename from src/mint/afl-tests/id:000660,src:000000,op:havoc,rep:32 rename to src/exchange/afl-tests/id:000660,src:000000,op:havoc,rep:32 diff --git a/src/mint/afl-tests/id:000661,src:000000,op:ext_AO,pos:271,+cov b/src/exchange/afl-tests/id:000661,src:000000,op:ext_AO,pos:271,+cov similarity index 100% rename from src/mint/afl-tests/id:000661,src:000000,op:ext_AO,pos:271,+cov rename to src/exchange/afl-tests/id:000661,src:000000,op:ext_AO,pos:271,+cov diff --git a/src/mint/afl-tests/id:000661,src:000000,op:havoc,rep:4 b/src/exchange/afl-tests/id:000661,src:000000,op:havoc,rep:4 similarity index 100% rename from src/mint/afl-tests/id:000661,src:000000,op:havoc,rep:4 rename to src/exchange/afl-tests/id:000661,src:000000,op:havoc,rep:4 diff --git a/src/mint/afl-tests/id:000662,src:000000,op:ext_AO,pos:274,+cov b/src/exchange/afl-tests/id:000662,src:000000,op:ext_AO,pos:274,+cov similarity index 100% rename from src/mint/afl-tests/id:000662,src:000000,op:ext_AO,pos:274,+cov rename to src/exchange/afl-tests/id:000662,src:000000,op:ext_AO,pos:274,+cov diff --git a/src/mint/afl-tests/id:000662,src:000000,op:havoc,rep:128 b/src/exchange/afl-tests/id:000662,src:000000,op:havoc,rep:128 similarity index 100% rename from src/mint/afl-tests/id:000662,src:000000,op:havoc,rep:128 rename to src/exchange/afl-tests/id:000662,src:000000,op:havoc,rep:128 diff --git a/src/mint/afl-tests/id:000663,src:000000,op:ext_AO,pos:275,+cov b/src/exchange/afl-tests/id:000663,src:000000,op:ext_AO,pos:275,+cov similarity index 100% rename from src/mint/afl-tests/id:000663,src:000000,op:ext_AO,pos:275,+cov rename to src/exchange/afl-tests/id:000663,src:000000,op:ext_AO,pos:275,+cov diff --git a/src/mint/afl-tests/id:000663,src:000000,op:havoc,rep:32 b/src/exchange/afl-tests/id:000663,src:000000,op:havoc,rep:32 similarity index 100% rename from src/mint/afl-tests/id:000663,src:000000,op:havoc,rep:32 rename to src/exchange/afl-tests/id:000663,src:000000,op:havoc,rep:32 diff --git a/src/mint/afl-tests/id:000664,src:000000,op:ext_AO,pos:305,+cov b/src/exchange/afl-tests/id:000664,src:000000,op:ext_AO,pos:305,+cov similarity index 100% rename from src/mint/afl-tests/id:000664,src:000000,op:ext_AO,pos:305,+cov rename to src/exchange/afl-tests/id:000664,src:000000,op:ext_AO,pos:305,+cov diff --git a/src/mint/afl-tests/id:000664,src:000000,op:havoc,rep:128 b/src/exchange/afl-tests/id:000664,src:000000,op:havoc,rep:128 similarity index 100% rename from src/mint/afl-tests/id:000664,src:000000,op:havoc,rep:128 rename to src/exchange/afl-tests/id:000664,src:000000,op:havoc,rep:128 diff --git a/src/mint/afl-tests/id:000665,src:000000,op:ext_AO,pos:312,+cov b/src/exchange/afl-tests/id:000665,src:000000,op:ext_AO,pos:312,+cov similarity index 100% rename from src/mint/afl-tests/id:000665,src:000000,op:ext_AO,pos:312,+cov rename to src/exchange/afl-tests/id:000665,src:000000,op:ext_AO,pos:312,+cov diff --git a/src/mint/afl-tests/id:000665,src:000000,op:havoc,rep:16,+cov b/src/exchange/afl-tests/id:000665,src:000000,op:havoc,rep:16,+cov similarity index 100% rename from src/mint/afl-tests/id:000665,src:000000,op:havoc,rep:16,+cov rename to src/exchange/afl-tests/id:000665,src:000000,op:havoc,rep:16,+cov diff --git a/src/mint/afl-tests/id:000666,src:000000,op:ext_AO,pos:314,+cov b/src/exchange/afl-tests/id:000666,src:000000,op:ext_AO,pos:314,+cov similarity index 100% rename from src/mint/afl-tests/id:000666,src:000000,op:ext_AO,pos:314,+cov rename to src/exchange/afl-tests/id:000666,src:000000,op:ext_AO,pos:314,+cov diff --git a/src/mint/afl-tests/id:000666,src:000000,op:havoc,rep:64 b/src/exchange/afl-tests/id:000666,src:000000,op:havoc,rep:64 similarity index 100% rename from src/mint/afl-tests/id:000666,src:000000,op:havoc,rep:64 rename to src/exchange/afl-tests/id:000666,src:000000,op:havoc,rep:64 diff --git a/src/mint/afl-tests/id:000667,src:000000,op:ext_AO,pos:319,+cov b/src/exchange/afl-tests/id:000667,src:000000,op:ext_AO,pos:319,+cov similarity index 100% rename from src/mint/afl-tests/id:000667,src:000000,op:ext_AO,pos:319,+cov rename to src/exchange/afl-tests/id:000667,src:000000,op:ext_AO,pos:319,+cov diff --git a/src/mint/afl-tests/id:000667,src:000000,op:havoc,rep:16 b/src/exchange/afl-tests/id:000667,src:000000,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000667,src:000000,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000667,src:000000,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000668,src:000000,op:ext_AO,pos:328,+cov b/src/exchange/afl-tests/id:000668,src:000000,op:ext_AO,pos:328,+cov similarity index 100% rename from src/mint/afl-tests/id:000668,src:000000,op:ext_AO,pos:328,+cov rename to src/exchange/afl-tests/id:000668,src:000000,op:ext_AO,pos:328,+cov diff --git a/src/mint/afl-tests/id:000668,src:000000,op:havoc,rep:128 b/src/exchange/afl-tests/id:000668,src:000000,op:havoc,rep:128 similarity index 100% rename from src/mint/afl-tests/id:000668,src:000000,op:havoc,rep:128 rename to src/exchange/afl-tests/id:000668,src:000000,op:havoc,rep:128 diff --git a/src/mint/afl-tests/id:000669,src:000000,op:havoc,rep:16 b/src/exchange/afl-tests/id:000669,src:000000,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000669,src:000000,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000669,src:000000,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000669,src:000000,op:havoc,rep:64 b/src/exchange/afl-tests/id:000669,src:000000,op:havoc,rep:64 similarity index 100% rename from src/mint/afl-tests/id:000669,src:000000,op:havoc,rep:64 rename to src/exchange/afl-tests/id:000669,src:000000,op:havoc,rep:64 diff --git a/src/mint/afl-tests/id:000670,src:000000,op:havoc,rep:32 b/src/exchange/afl-tests/id:000670,src:000000,op:havoc,rep:32 similarity index 100% rename from src/mint/afl-tests/id:000670,src:000000,op:havoc,rep:32 rename to src/exchange/afl-tests/id:000670,src:000000,op:havoc,rep:32 diff --git a/src/mint/afl-tests/id:000671,src:000000,op:havoc,rep:16 b/src/exchange/afl-tests/id:000671,src:000000,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000671,src:000000,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000671,src:000000,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000671,src:000000,op:havoc,rep:8 b/src/exchange/afl-tests/id:000671,src:000000,op:havoc,rep:8 similarity index 100% rename from src/mint/afl-tests/id:000671,src:000000,op:havoc,rep:8 rename to src/exchange/afl-tests/id:000671,src:000000,op:havoc,rep:8 diff --git a/src/mint/afl-tests/id:000672,src:000000,op:havoc,rep:16 b/src/exchange/afl-tests/id:000672,src:000000,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000672,src:000000,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000672,src:000000,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000672,src:000000,op:havoc,rep:32 b/src/exchange/afl-tests/id:000672,src:000000,op:havoc,rep:32 similarity index 100% rename from src/mint/afl-tests/id:000672,src:000000,op:havoc,rep:32 rename to src/exchange/afl-tests/id:000672,src:000000,op:havoc,rep:32 diff --git a/src/mint/afl-tests/id:000673,src:000000,op:havoc,rep:128 b/src/exchange/afl-tests/id:000673,src:000000,op:havoc,rep:128 similarity index 100% rename from src/mint/afl-tests/id:000673,src:000000,op:havoc,rep:128 rename to src/exchange/afl-tests/id:000673,src:000000,op:havoc,rep:128 diff --git a/src/mint/afl-tests/id:000673,src:000000,op:havoc,rep:16 b/src/exchange/afl-tests/id:000673,src:000000,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000673,src:000000,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000673,src:000000,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000674,src:000000,op:havoc,rep:32 b/src/exchange/afl-tests/id:000674,src:000000,op:havoc,rep:32 similarity index 100% rename from src/mint/afl-tests/id:000674,src:000000,op:havoc,rep:32 rename to src/exchange/afl-tests/id:000674,src:000000,op:havoc,rep:32 diff --git a/src/mint/afl-tests/id:000675,src:000000,op:havoc,rep:128 b/src/exchange/afl-tests/id:000675,src:000000,op:havoc,rep:128 similarity index 100% rename from src/mint/afl-tests/id:000675,src:000000,op:havoc,rep:128 rename to src/exchange/afl-tests/id:000675,src:000000,op:havoc,rep:128 diff --git a/src/mint/afl-tests/id:000675,src:000000,op:havoc,rep:8 b/src/exchange/afl-tests/id:000675,src:000000,op:havoc,rep:8 similarity index 100% rename from src/mint/afl-tests/id:000675,src:000000,op:havoc,rep:8 rename to src/exchange/afl-tests/id:000675,src:000000,op:havoc,rep:8 diff --git a/src/mint/afl-tests/id:000676,src:000000,op:havoc,rep:32 b/src/exchange/afl-tests/id:000676,src:000000,op:havoc,rep:32 similarity index 100% rename from src/mint/afl-tests/id:000676,src:000000,op:havoc,rep:32 rename to src/exchange/afl-tests/id:000676,src:000000,op:havoc,rep:32 diff --git a/src/mint/afl-tests/id:000677,src:000000,op:havoc,rep:64 b/src/exchange/afl-tests/id:000677,src:000000,op:havoc,rep:64 similarity index 100% rename from src/mint/afl-tests/id:000677,src:000000,op:havoc,rep:64 rename to src/exchange/afl-tests/id:000677,src:000000,op:havoc,rep:64 diff --git a/src/mint/afl-tests/id:000677,src:000000,op:havoc,rep:8 b/src/exchange/afl-tests/id:000677,src:000000,op:havoc,rep:8 similarity index 100% rename from src/mint/afl-tests/id:000677,src:000000,op:havoc,rep:8 rename to src/exchange/afl-tests/id:000677,src:000000,op:havoc,rep:8 diff --git a/src/mint/afl-tests/id:000678,src:000000,op:havoc,rep:16 b/src/exchange/afl-tests/id:000678,src:000000,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000678,src:000000,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000678,src:000000,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000678,src:000000,op:havoc,rep:4 b/src/exchange/afl-tests/id:000678,src:000000,op:havoc,rep:4 similarity index 100% rename from src/mint/afl-tests/id:000678,src:000000,op:havoc,rep:4 rename to src/exchange/afl-tests/id:000678,src:000000,op:havoc,rep:4 diff --git a/src/mint/afl-tests/id:000679,src:000000,op:havoc,rep:128 b/src/exchange/afl-tests/id:000679,src:000000,op:havoc,rep:128 similarity index 100% rename from src/mint/afl-tests/id:000679,src:000000,op:havoc,rep:128 rename to src/exchange/afl-tests/id:000679,src:000000,op:havoc,rep:128 diff --git a/src/mint/afl-tests/id:000679,src:000000,op:havoc,rep:16,+cov b/src/exchange/afl-tests/id:000679,src:000000,op:havoc,rep:16,+cov similarity index 100% rename from src/mint/afl-tests/id:000679,src:000000,op:havoc,rep:16,+cov rename to src/exchange/afl-tests/id:000679,src:000000,op:havoc,rep:16,+cov diff --git a/src/mint/afl-tests/id:000680,src:000000,op:havoc,rep:128,+cov b/src/exchange/afl-tests/id:000680,src:000000,op:havoc,rep:128,+cov similarity index 100% rename from src/mint/afl-tests/id:000680,src:000000,op:havoc,rep:128,+cov rename to src/exchange/afl-tests/id:000680,src:000000,op:havoc,rep:128,+cov diff --git a/src/mint/afl-tests/id:000680,src:000000,op:havoc,rep:32 b/src/exchange/afl-tests/id:000680,src:000000,op:havoc,rep:32 similarity index 100% rename from src/mint/afl-tests/id:000680,src:000000,op:havoc,rep:32 rename to src/exchange/afl-tests/id:000680,src:000000,op:havoc,rep:32 diff --git a/src/mint/afl-tests/id:000681,src:000000,op:havoc,rep:16 b/src/exchange/afl-tests/id:000681,src:000000,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000681,src:000000,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000681,src:000000,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000681,src:000000,op:havoc,rep:32 b/src/exchange/afl-tests/id:000681,src:000000,op:havoc,rep:32 similarity index 100% rename from src/mint/afl-tests/id:000681,src:000000,op:havoc,rep:32 rename to src/exchange/afl-tests/id:000681,src:000000,op:havoc,rep:32 diff --git a/src/mint/afl-tests/id:000682,src:000000,op:havoc,rep:16 b/src/exchange/afl-tests/id:000682,src:000000,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000682,src:000000,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000682,src:000000,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000682,src:000000,op:havoc,rep:64,+cov b/src/exchange/afl-tests/id:000682,src:000000,op:havoc,rep:64,+cov similarity index 100% rename from src/mint/afl-tests/id:000682,src:000000,op:havoc,rep:64,+cov rename to src/exchange/afl-tests/id:000682,src:000000,op:havoc,rep:64,+cov diff --git a/src/mint/afl-tests/id:000683,src:000000,op:havoc,rep:16,+cov b/src/exchange/afl-tests/id:000683,src:000000,op:havoc,rep:16,+cov similarity index 100% rename from src/mint/afl-tests/id:000683,src:000000,op:havoc,rep:16,+cov rename to src/exchange/afl-tests/id:000683,src:000000,op:havoc,rep:16,+cov diff --git a/src/mint/afl-tests/id:000683,src:000000,op:havoc,rep:32,+cov b/src/exchange/afl-tests/id:000683,src:000000,op:havoc,rep:32,+cov similarity index 100% rename from src/mint/afl-tests/id:000683,src:000000,op:havoc,rep:32,+cov rename to src/exchange/afl-tests/id:000683,src:000000,op:havoc,rep:32,+cov diff --git a/src/mint/afl-tests/id:000684,src:000000,op:havoc,rep:16,+cov b/src/exchange/afl-tests/id:000684,src:000000,op:havoc,rep:16,+cov similarity index 100% rename from src/mint/afl-tests/id:000684,src:000000,op:havoc,rep:16,+cov rename to src/exchange/afl-tests/id:000684,src:000000,op:havoc,rep:16,+cov diff --git a/src/mint/afl-tests/id:000684,src:000000,op:havoc,rep:8 b/src/exchange/afl-tests/id:000684,src:000000,op:havoc,rep:8 similarity index 100% rename from src/mint/afl-tests/id:000684,src:000000,op:havoc,rep:8 rename to src/exchange/afl-tests/id:000684,src:000000,op:havoc,rep:8 diff --git a/src/mint/afl-tests/id:000685,src:000000,op:havoc,rep:16 b/src/exchange/afl-tests/id:000685,src:000000,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000685,src:000000,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000685,src:000000,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000685,src:000000,op:havoc,rep:16,+cov b/src/exchange/afl-tests/id:000685,src:000000,op:havoc,rep:16,+cov similarity index 100% rename from src/mint/afl-tests/id:000685,src:000000,op:havoc,rep:16,+cov rename to src/exchange/afl-tests/id:000685,src:000000,op:havoc,rep:16,+cov diff --git a/src/mint/afl-tests/id:000686,src:000000,op:havoc,rep:128,+cov b/src/exchange/afl-tests/id:000686,src:000000,op:havoc,rep:128,+cov similarity index 100% rename from src/mint/afl-tests/id:000686,src:000000,op:havoc,rep:128,+cov rename to src/exchange/afl-tests/id:000686,src:000000,op:havoc,rep:128,+cov diff --git a/src/mint/afl-tests/id:000686,src:000000,op:havoc,rep:16,+cov b/src/exchange/afl-tests/id:000686,src:000000,op:havoc,rep:16,+cov similarity index 100% rename from src/mint/afl-tests/id:000686,src:000000,op:havoc,rep:16,+cov rename to src/exchange/afl-tests/id:000686,src:000000,op:havoc,rep:16,+cov diff --git a/src/mint/afl-tests/id:000687,src:000000,op:havoc,rep:16 b/src/exchange/afl-tests/id:000687,src:000000,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000687,src:000000,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000687,src:000000,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000687,src:000000,op:havoc,rep:32,+cov b/src/exchange/afl-tests/id:000687,src:000000,op:havoc,rep:32,+cov similarity index 100% rename from src/mint/afl-tests/id:000687,src:000000,op:havoc,rep:32,+cov rename to src/exchange/afl-tests/id:000687,src:000000,op:havoc,rep:32,+cov diff --git a/src/mint/afl-tests/id:000688,src:000000,op:havoc,rep:128 b/src/exchange/afl-tests/id:000688,src:000000,op:havoc,rep:128 similarity index 100% rename from src/mint/afl-tests/id:000688,src:000000,op:havoc,rep:128 rename to src/exchange/afl-tests/id:000688,src:000000,op:havoc,rep:128 diff --git a/src/mint/afl-tests/id:000689,src:000000,op:havoc,rep:128,+cov b/src/exchange/afl-tests/id:000689,src:000000,op:havoc,rep:128,+cov similarity index 100% rename from src/mint/afl-tests/id:000689,src:000000,op:havoc,rep:128,+cov rename to src/exchange/afl-tests/id:000689,src:000000,op:havoc,rep:128,+cov diff --git a/src/mint/afl-tests/id:000689,src:000000,op:havoc,rep:64,+cov b/src/exchange/afl-tests/id:000689,src:000000,op:havoc,rep:64,+cov similarity index 100% rename from src/mint/afl-tests/id:000689,src:000000,op:havoc,rep:64,+cov rename to src/exchange/afl-tests/id:000689,src:000000,op:havoc,rep:64,+cov diff --git a/src/mint/afl-tests/id:000690,src:000000,op:havoc,rep:32 b/src/exchange/afl-tests/id:000690,src:000000,op:havoc,rep:32 similarity index 100% rename from src/mint/afl-tests/id:000690,src:000000,op:havoc,rep:32 rename to src/exchange/afl-tests/id:000690,src:000000,op:havoc,rep:32 diff --git a/src/mint/afl-tests/id:000690,src:000000,op:havoc,rep:64 b/src/exchange/afl-tests/id:000690,src:000000,op:havoc,rep:64 similarity index 100% rename from src/mint/afl-tests/id:000690,src:000000,op:havoc,rep:64 rename to src/exchange/afl-tests/id:000690,src:000000,op:havoc,rep:64 diff --git a/src/mint/afl-tests/id:000691,src:000000,op:havoc,rep:64 b/src/exchange/afl-tests/id:000691,src:000000,op:havoc,rep:64 similarity index 100% rename from src/mint/afl-tests/id:000691,src:000000,op:havoc,rep:64 rename to src/exchange/afl-tests/id:000691,src:000000,op:havoc,rep:64 diff --git a/src/mint/afl-tests/id:000692,src:000000,op:havoc,rep:4,+cov b/src/exchange/afl-tests/id:000692,src:000000,op:havoc,rep:4,+cov similarity index 100% rename from src/mint/afl-tests/id:000692,src:000000,op:havoc,rep:4,+cov rename to src/exchange/afl-tests/id:000692,src:000000,op:havoc,rep:4,+cov diff --git a/src/mint/afl-tests/id:000693,src:000000,op:havoc,rep:16,+cov b/src/exchange/afl-tests/id:000693,src:000000,op:havoc,rep:16,+cov similarity index 100% rename from src/mint/afl-tests/id:000693,src:000000,op:havoc,rep:16,+cov rename to src/exchange/afl-tests/id:000693,src:000000,op:havoc,rep:16,+cov diff --git a/src/mint/afl-tests/id:000693,src:000000,op:havoc,rep:4,+cov b/src/exchange/afl-tests/id:000693,src:000000,op:havoc,rep:4,+cov similarity index 100% rename from src/mint/afl-tests/id:000693,src:000000,op:havoc,rep:4,+cov rename to src/exchange/afl-tests/id:000693,src:000000,op:havoc,rep:4,+cov diff --git a/src/mint/afl-tests/id:000694,src:000000,op:havoc,rep:2,+cov b/src/exchange/afl-tests/id:000694,src:000000,op:havoc,rep:2,+cov similarity index 100% rename from src/mint/afl-tests/id:000694,src:000000,op:havoc,rep:2,+cov rename to src/exchange/afl-tests/id:000694,src:000000,op:havoc,rep:2,+cov diff --git a/src/mint/afl-tests/id:000694,src:000000,op:havoc,rep:32 b/src/exchange/afl-tests/id:000694,src:000000,op:havoc,rep:32 similarity index 100% rename from src/mint/afl-tests/id:000694,src:000000,op:havoc,rep:32 rename to src/exchange/afl-tests/id:000694,src:000000,op:havoc,rep:32 diff --git a/src/mint/afl-tests/id:000695,src:000000,op:havoc,rep:128,+cov b/src/exchange/afl-tests/id:000695,src:000000,op:havoc,rep:128,+cov similarity index 100% rename from src/mint/afl-tests/id:000695,src:000000,op:havoc,rep:128,+cov rename to src/exchange/afl-tests/id:000695,src:000000,op:havoc,rep:128,+cov diff --git a/src/mint/afl-tests/id:000695,src:000000,op:havoc,rep:64 b/src/exchange/afl-tests/id:000695,src:000000,op:havoc,rep:64 similarity index 100% rename from src/mint/afl-tests/id:000695,src:000000,op:havoc,rep:64 rename to src/exchange/afl-tests/id:000695,src:000000,op:havoc,rep:64 diff --git a/src/mint/afl-tests/id:000696,src:000000,op:havoc,rep:16 b/src/exchange/afl-tests/id:000696,src:000000,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000696,src:000000,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000696,src:000000,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000696,src:000000,op:havoc,rep:2,+cov b/src/exchange/afl-tests/id:000696,src:000000,op:havoc,rep:2,+cov similarity index 100% rename from src/mint/afl-tests/id:000696,src:000000,op:havoc,rep:2,+cov rename to src/exchange/afl-tests/id:000696,src:000000,op:havoc,rep:2,+cov diff --git a/src/mint/afl-tests/id:000697,src:000000,op:havoc,rep:64,+cov b/src/exchange/afl-tests/id:000697,src:000000,op:havoc,rep:64,+cov similarity index 100% rename from src/mint/afl-tests/id:000697,src:000000,op:havoc,rep:64,+cov rename to src/exchange/afl-tests/id:000697,src:000000,op:havoc,rep:64,+cov diff --git a/src/mint/afl-tests/id:000697,src:000000,op:havoc,rep:8 b/src/exchange/afl-tests/id:000697,src:000000,op:havoc,rep:8 similarity index 100% rename from src/mint/afl-tests/id:000697,src:000000,op:havoc,rep:8 rename to src/exchange/afl-tests/id:000697,src:000000,op:havoc,rep:8 diff --git a/src/mint/afl-tests/id:000698,src:000000,op:havoc,rep:128 b/src/exchange/afl-tests/id:000698,src:000000,op:havoc,rep:128 similarity index 100% rename from src/mint/afl-tests/id:000698,src:000000,op:havoc,rep:128 rename to src/exchange/afl-tests/id:000698,src:000000,op:havoc,rep:128 diff --git a/src/mint/afl-tests/id:000699,src:000000,op:havoc,rep:2,+cov b/src/exchange/afl-tests/id:000699,src:000000,op:havoc,rep:2,+cov similarity index 100% rename from src/mint/afl-tests/id:000699,src:000000,op:havoc,rep:2,+cov rename to src/exchange/afl-tests/id:000699,src:000000,op:havoc,rep:2,+cov diff --git a/src/mint/afl-tests/id:000699,src:000000,op:havoc,rep:32 b/src/exchange/afl-tests/id:000699,src:000000,op:havoc,rep:32 similarity index 100% rename from src/mint/afl-tests/id:000699,src:000000,op:havoc,rep:32 rename to src/exchange/afl-tests/id:000699,src:000000,op:havoc,rep:32 diff --git a/src/mint/afl-tests/id:000700,src:000000,op:havoc,rep:128,+cov b/src/exchange/afl-tests/id:000700,src:000000,op:havoc,rep:128,+cov similarity index 100% rename from src/mint/afl-tests/id:000700,src:000000,op:havoc,rep:128,+cov rename to src/exchange/afl-tests/id:000700,src:000000,op:havoc,rep:128,+cov diff --git a/src/mint/afl-tests/id:000700,src:000000,op:havoc,rep:32,+cov b/src/exchange/afl-tests/id:000700,src:000000,op:havoc,rep:32,+cov similarity index 100% rename from src/mint/afl-tests/id:000700,src:000000,op:havoc,rep:32,+cov rename to src/exchange/afl-tests/id:000700,src:000000,op:havoc,rep:32,+cov diff --git a/src/mint/afl-tests/id:000701,src:000000,op:havoc,rep:16,+cov b/src/exchange/afl-tests/id:000701,src:000000,op:havoc,rep:16,+cov similarity index 100% rename from src/mint/afl-tests/id:000701,src:000000,op:havoc,rep:16,+cov rename to src/exchange/afl-tests/id:000701,src:000000,op:havoc,rep:16,+cov diff --git a/src/mint/afl-tests/id:000701,src:000000,op:havoc,rep:2 b/src/exchange/afl-tests/id:000701,src:000000,op:havoc,rep:2 similarity index 100% rename from src/mint/afl-tests/id:000701,src:000000,op:havoc,rep:2 rename to src/exchange/afl-tests/id:000701,src:000000,op:havoc,rep:2 diff --git a/src/mint/afl-tests/id:000702,src:000000,op:havoc,rep:128 b/src/exchange/afl-tests/id:000702,src:000000,op:havoc,rep:128 similarity index 100% rename from src/mint/afl-tests/id:000702,src:000000,op:havoc,rep:128 rename to src/exchange/afl-tests/id:000702,src:000000,op:havoc,rep:128 diff --git a/src/mint/afl-tests/id:000702,src:000000,op:havoc,rep:8 b/src/exchange/afl-tests/id:000702,src:000000,op:havoc,rep:8 similarity index 100% rename from src/mint/afl-tests/id:000702,src:000000,op:havoc,rep:8 rename to src/exchange/afl-tests/id:000702,src:000000,op:havoc,rep:8 diff --git a/src/mint/afl-tests/id:000703,src:000000,op:havoc,rep:32,+cov b/src/exchange/afl-tests/id:000703,src:000000,op:havoc,rep:32,+cov similarity index 100% rename from src/mint/afl-tests/id:000703,src:000000,op:havoc,rep:32,+cov rename to src/exchange/afl-tests/id:000703,src:000000,op:havoc,rep:32,+cov diff --git a/src/mint/afl-tests/id:000703,src:000001,op:flip1,pos:34,+cov b/src/exchange/afl-tests/id:000703,src:000001,op:flip1,pos:34,+cov similarity index 100% rename from src/mint/afl-tests/id:000703,src:000001,op:flip1,pos:34,+cov rename to src/exchange/afl-tests/id:000703,src:000001,op:flip1,pos:34,+cov diff --git a/src/mint/afl-tests/id:000704,src:000000,op:havoc,rep:64,+cov b/src/exchange/afl-tests/id:000704,src:000000,op:havoc,rep:64,+cov similarity index 100% rename from src/mint/afl-tests/id:000704,src:000000,op:havoc,rep:64,+cov rename to src/exchange/afl-tests/id:000704,src:000000,op:havoc,rep:64,+cov diff --git a/src/mint/afl-tests/id:000704,src:000001,op:flip1,pos:50,+cov b/src/exchange/afl-tests/id:000704,src:000001,op:flip1,pos:50,+cov similarity index 100% rename from src/mint/afl-tests/id:000704,src:000001,op:flip1,pos:50,+cov rename to src/exchange/afl-tests/id:000704,src:000001,op:flip1,pos:50,+cov diff --git a/src/mint/afl-tests/id:000705,src:000000,op:havoc,rep:2,+cov b/src/exchange/afl-tests/id:000705,src:000000,op:havoc,rep:2,+cov similarity index 100% rename from src/mint/afl-tests/id:000705,src:000000,op:havoc,rep:2,+cov rename to src/exchange/afl-tests/id:000705,src:000000,op:havoc,rep:2,+cov diff --git a/src/mint/afl-tests/id:000705,src:000001,op:flip1,pos:61,+cov b/src/exchange/afl-tests/id:000705,src:000001,op:flip1,pos:61,+cov similarity index 100% rename from src/mint/afl-tests/id:000705,src:000001,op:flip1,pos:61,+cov rename to src/exchange/afl-tests/id:000705,src:000001,op:flip1,pos:61,+cov diff --git a/src/mint/afl-tests/id:000706,src:000000,op:havoc,rep:32 b/src/exchange/afl-tests/id:000706,src:000000,op:havoc,rep:32 similarity index 100% rename from src/mint/afl-tests/id:000706,src:000000,op:havoc,rep:32 rename to src/exchange/afl-tests/id:000706,src:000000,op:havoc,rep:32 diff --git a/src/mint/afl-tests/id:000706,src:000001,op:flip1,pos:91 b/src/exchange/afl-tests/id:000706,src:000001,op:flip1,pos:91 similarity index 100% rename from src/mint/afl-tests/id:000706,src:000001,op:flip1,pos:91 rename to src/exchange/afl-tests/id:000706,src:000001,op:flip1,pos:91 diff --git a/src/mint/afl-tests/id:000707,src:000000,op:havoc,rep:128,+cov b/src/exchange/afl-tests/id:000707,src:000000,op:havoc,rep:128,+cov similarity index 100% rename from src/mint/afl-tests/id:000707,src:000000,op:havoc,rep:128,+cov rename to src/exchange/afl-tests/id:000707,src:000000,op:havoc,rep:128,+cov diff --git a/src/mint/afl-tests/id:000707,src:000001,op:flip1,pos:103,+cov b/src/exchange/afl-tests/id:000707,src:000001,op:flip1,pos:103,+cov similarity index 100% rename from src/mint/afl-tests/id:000707,src:000001,op:flip1,pos:103,+cov rename to src/exchange/afl-tests/id:000707,src:000001,op:flip1,pos:103,+cov diff --git a/src/mint/afl-tests/id:000708,src:000000,op:havoc,rep:2 b/src/exchange/afl-tests/id:000708,src:000000,op:havoc,rep:2 similarity index 100% rename from src/mint/afl-tests/id:000708,src:000000,op:havoc,rep:2 rename to src/exchange/afl-tests/id:000708,src:000000,op:havoc,rep:2 diff --git a/src/mint/afl-tests/id:000708,src:000001,op:flip1,pos:120,+cov b/src/exchange/afl-tests/id:000708,src:000001,op:flip1,pos:120,+cov similarity index 100% rename from src/mint/afl-tests/id:000708,src:000001,op:flip1,pos:120,+cov rename to src/exchange/afl-tests/id:000708,src:000001,op:flip1,pos:120,+cov diff --git a/src/mint/afl-tests/id:000709,src:000000,op:havoc,rep:64 b/src/exchange/afl-tests/id:000709,src:000000,op:havoc,rep:64 similarity index 100% rename from src/mint/afl-tests/id:000709,src:000000,op:havoc,rep:64 rename to src/exchange/afl-tests/id:000709,src:000000,op:havoc,rep:64 diff --git a/src/mint/afl-tests/id:000709,src:000001,op:flip1,pos:129,+cov b/src/exchange/afl-tests/id:000709,src:000001,op:flip1,pos:129,+cov similarity index 100% rename from src/mint/afl-tests/id:000709,src:000001,op:flip1,pos:129,+cov rename to src/exchange/afl-tests/id:000709,src:000001,op:flip1,pos:129,+cov diff --git a/src/mint/afl-tests/id:000710,src:000000,op:havoc,rep:8,+cov b/src/exchange/afl-tests/id:000710,src:000000,op:havoc,rep:8,+cov similarity index 100% rename from src/mint/afl-tests/id:000710,src:000000,op:havoc,rep:8,+cov rename to src/exchange/afl-tests/id:000710,src:000000,op:havoc,rep:8,+cov diff --git a/src/mint/afl-tests/id:000710,src:000001,op:flip1,pos:129,+cov b/src/exchange/afl-tests/id:000710,src:000001,op:flip1,pos:129,+cov similarity index 100% rename from src/mint/afl-tests/id:000710,src:000001,op:flip1,pos:129,+cov rename to src/exchange/afl-tests/id:000710,src:000001,op:flip1,pos:129,+cov diff --git a/src/mint/afl-tests/id:000711,src:000000,op:havoc,rep:2,+cov b/src/exchange/afl-tests/id:000711,src:000000,op:havoc,rep:2,+cov similarity index 100% rename from src/mint/afl-tests/id:000711,src:000000,op:havoc,rep:2,+cov rename to src/exchange/afl-tests/id:000711,src:000000,op:havoc,rep:2,+cov diff --git a/src/mint/afl-tests/id:000711,src:000001,op:flip1,pos:131,+cov b/src/exchange/afl-tests/id:000711,src:000001,op:flip1,pos:131,+cov similarity index 100% rename from src/mint/afl-tests/id:000711,src:000001,op:flip1,pos:131,+cov rename to src/exchange/afl-tests/id:000711,src:000001,op:flip1,pos:131,+cov diff --git a/src/mint/afl-tests/id:000712,src:000000,op:havoc,rep:2,+cov b/src/exchange/afl-tests/id:000712,src:000000,op:havoc,rep:2,+cov similarity index 100% rename from src/mint/afl-tests/id:000712,src:000000,op:havoc,rep:2,+cov rename to src/exchange/afl-tests/id:000712,src:000000,op:havoc,rep:2,+cov diff --git a/src/mint/afl-tests/id:000712,src:000001,op:flip1,pos:139,+cov b/src/exchange/afl-tests/id:000712,src:000001,op:flip1,pos:139,+cov similarity index 100% rename from src/mint/afl-tests/id:000712,src:000001,op:flip1,pos:139,+cov rename to src/exchange/afl-tests/id:000712,src:000001,op:flip1,pos:139,+cov diff --git a/src/mint/afl-tests/id:000713,src:000000,op:havoc,rep:64,+cov b/src/exchange/afl-tests/id:000713,src:000000,op:havoc,rep:64,+cov similarity index 100% rename from src/mint/afl-tests/id:000713,src:000000,op:havoc,rep:64,+cov rename to src/exchange/afl-tests/id:000713,src:000000,op:havoc,rep:64,+cov diff --git a/src/mint/afl-tests/id:000713,src:000001,op:flip1,pos:197,+cov b/src/exchange/afl-tests/id:000713,src:000001,op:flip1,pos:197,+cov similarity index 100% rename from src/mint/afl-tests/id:000713,src:000001,op:flip1,pos:197,+cov rename to src/exchange/afl-tests/id:000713,src:000001,op:flip1,pos:197,+cov diff --git a/src/mint/afl-tests/id:000714,src:000000,op:havoc,rep:8,+cov b/src/exchange/afl-tests/id:000714,src:000000,op:havoc,rep:8,+cov similarity index 100% rename from src/mint/afl-tests/id:000714,src:000000,op:havoc,rep:8,+cov rename to src/exchange/afl-tests/id:000714,src:000000,op:havoc,rep:8,+cov diff --git a/src/mint/afl-tests/id:000714,src:000001,op:flip1,pos:243,+cov b/src/exchange/afl-tests/id:000714,src:000001,op:flip1,pos:243,+cov similarity index 100% rename from src/mint/afl-tests/id:000714,src:000001,op:flip1,pos:243,+cov rename to src/exchange/afl-tests/id:000714,src:000001,op:flip1,pos:243,+cov diff --git a/src/mint/afl-tests/id:000715,src:000000,op:havoc,rep:8,+cov b/src/exchange/afl-tests/id:000715,src:000000,op:havoc,rep:8,+cov similarity index 100% rename from src/mint/afl-tests/id:000715,src:000000,op:havoc,rep:8,+cov rename to src/exchange/afl-tests/id:000715,src:000000,op:havoc,rep:8,+cov diff --git a/src/mint/afl-tests/id:000715,src:000001,op:flip1,pos:365,+cov b/src/exchange/afl-tests/id:000715,src:000001,op:flip1,pos:365,+cov similarity index 100% rename from src/mint/afl-tests/id:000715,src:000001,op:flip1,pos:365,+cov rename to src/exchange/afl-tests/id:000715,src:000001,op:flip1,pos:365,+cov diff --git a/src/mint/afl-tests/id:000716,src:000001,op:flip1,pos:2 b/src/exchange/afl-tests/id:000716,src:000001,op:flip1,pos:2 similarity index 100% rename from src/mint/afl-tests/id:000716,src:000001,op:flip1,pos:2 rename to src/exchange/afl-tests/id:000716,src:000001,op:flip1,pos:2 diff --git a/src/mint/afl-tests/id:000716,src:000001,op:flip1,pos:456,+cov b/src/exchange/afl-tests/id:000716,src:000001,op:flip1,pos:456,+cov similarity index 100% rename from src/mint/afl-tests/id:000716,src:000001,op:flip1,pos:456,+cov rename to src/exchange/afl-tests/id:000716,src:000001,op:flip1,pos:456,+cov diff --git a/src/mint/afl-tests/id:000717,src:000001,op:flip1,pos:50,+cov b/src/exchange/afl-tests/id:000717,src:000001,op:flip1,pos:50,+cov similarity index 100% rename from src/mint/afl-tests/id:000717,src:000001,op:flip1,pos:50,+cov rename to src/exchange/afl-tests/id:000717,src:000001,op:flip1,pos:50,+cov diff --git a/src/mint/afl-tests/id:000717,src:000001,op:flip1,pos:596 b/src/exchange/afl-tests/id:000717,src:000001,op:flip1,pos:596 similarity index 100% rename from src/mint/afl-tests/id:000717,src:000001,op:flip1,pos:596 rename to src/exchange/afl-tests/id:000717,src:000001,op:flip1,pos:596 diff --git a/src/mint/afl-tests/id:000718,src:000001,op:flip1,pos:55,+cov b/src/exchange/afl-tests/id:000718,src:000001,op:flip1,pos:55,+cov similarity index 100% rename from src/mint/afl-tests/id:000718,src:000001,op:flip1,pos:55,+cov rename to src/exchange/afl-tests/id:000718,src:000001,op:flip1,pos:55,+cov diff --git a/src/mint/afl-tests/id:000718,src:000001,op:flip1,pos:614,+cov b/src/exchange/afl-tests/id:000718,src:000001,op:flip1,pos:614,+cov similarity index 100% rename from src/mint/afl-tests/id:000718,src:000001,op:flip1,pos:614,+cov rename to src/exchange/afl-tests/id:000718,src:000001,op:flip1,pos:614,+cov diff --git a/src/mint/afl-tests/id:000719,src:000001,op:flip1,pos:629,+cov b/src/exchange/afl-tests/id:000719,src:000001,op:flip1,pos:629,+cov similarity index 100% rename from src/mint/afl-tests/id:000719,src:000001,op:flip1,pos:629,+cov rename to src/exchange/afl-tests/id:000719,src:000001,op:flip1,pos:629,+cov diff --git a/src/mint/afl-tests/id:000719,src:000001,op:flip1,pos:95 b/src/exchange/afl-tests/id:000719,src:000001,op:flip1,pos:95 similarity index 100% rename from src/mint/afl-tests/id:000719,src:000001,op:flip1,pos:95 rename to src/exchange/afl-tests/id:000719,src:000001,op:flip1,pos:95 diff --git a/src/mint/afl-tests/id:000720,src:000001,op:flip1,pos:102,+cov b/src/exchange/afl-tests/id:000720,src:000001,op:flip1,pos:102,+cov similarity index 100% rename from src/mint/afl-tests/id:000720,src:000001,op:flip1,pos:102,+cov rename to src/exchange/afl-tests/id:000720,src:000001,op:flip1,pos:102,+cov diff --git a/src/mint/afl-tests/id:000720,src:000001,op:flip1,pos:635,+cov b/src/exchange/afl-tests/id:000720,src:000001,op:flip1,pos:635,+cov similarity index 100% rename from src/mint/afl-tests/id:000720,src:000001,op:flip1,pos:635,+cov rename to src/exchange/afl-tests/id:000720,src:000001,op:flip1,pos:635,+cov diff --git a/src/mint/afl-tests/id:000721,src:000001,op:flip1,pos:107,+cov b/src/exchange/afl-tests/id:000721,src:000001,op:flip1,pos:107,+cov similarity index 100% rename from src/mint/afl-tests/id:000721,src:000001,op:flip1,pos:107,+cov rename to src/exchange/afl-tests/id:000721,src:000001,op:flip1,pos:107,+cov diff --git a/src/mint/afl-tests/id:000721,src:000001,op:flip1,pos:683,+cov b/src/exchange/afl-tests/id:000721,src:000001,op:flip1,pos:683,+cov similarity index 100% rename from src/mint/afl-tests/id:000721,src:000001,op:flip1,pos:683,+cov rename to src/exchange/afl-tests/id:000721,src:000001,op:flip1,pos:683,+cov diff --git a/src/mint/afl-tests/id:000722,src:000001,op:flip1,pos:118,+cov b/src/exchange/afl-tests/id:000722,src:000001,op:flip1,pos:118,+cov similarity index 100% rename from src/mint/afl-tests/id:000722,src:000001,op:flip1,pos:118,+cov rename to src/exchange/afl-tests/id:000722,src:000001,op:flip1,pos:118,+cov diff --git a/src/mint/afl-tests/id:000722,src:000001,op:flip1,pos:730,+cov b/src/exchange/afl-tests/id:000722,src:000001,op:flip1,pos:730,+cov similarity index 100% rename from src/mint/afl-tests/id:000722,src:000001,op:flip1,pos:730,+cov rename to src/exchange/afl-tests/id:000722,src:000001,op:flip1,pos:730,+cov diff --git a/src/mint/afl-tests/id:000723,src:000001,op:flip1,pos:124,+cov b/src/exchange/afl-tests/id:000723,src:000001,op:flip1,pos:124,+cov similarity index 100% rename from src/mint/afl-tests/id:000723,src:000001,op:flip1,pos:124,+cov rename to src/exchange/afl-tests/id:000723,src:000001,op:flip1,pos:124,+cov diff --git a/src/mint/afl-tests/id:000723,src:000001,op:flip1,pos:786,+cov b/src/exchange/afl-tests/id:000723,src:000001,op:flip1,pos:786,+cov similarity index 100% rename from src/mint/afl-tests/id:000723,src:000001,op:flip1,pos:786,+cov rename to src/exchange/afl-tests/id:000723,src:000001,op:flip1,pos:786,+cov diff --git a/src/mint/afl-tests/id:000724,src:000001,op:flip1,pos:133,+cov b/src/exchange/afl-tests/id:000724,src:000001,op:flip1,pos:133,+cov similarity index 100% rename from src/mint/afl-tests/id:000724,src:000001,op:flip1,pos:133,+cov rename to src/exchange/afl-tests/id:000724,src:000001,op:flip1,pos:133,+cov diff --git a/src/mint/afl-tests/id:000724,src:000001,op:flip1,pos:796 b/src/exchange/afl-tests/id:000724,src:000001,op:flip1,pos:796 similarity index 100% rename from src/mint/afl-tests/id:000724,src:000001,op:flip1,pos:796 rename to src/exchange/afl-tests/id:000724,src:000001,op:flip1,pos:796 diff --git a/src/mint/afl-tests/id:000725,src:000001,op:flip1,pos:133,+cov b/src/exchange/afl-tests/id:000725,src:000001,op:flip1,pos:133,+cov similarity index 100% rename from src/mint/afl-tests/id:000725,src:000001,op:flip1,pos:133,+cov rename to src/exchange/afl-tests/id:000725,src:000001,op:flip1,pos:133,+cov diff --git a/src/mint/afl-tests/id:000725,src:000001,op:flip1,pos:915,+cov b/src/exchange/afl-tests/id:000725,src:000001,op:flip1,pos:915,+cov similarity index 100% rename from src/mint/afl-tests/id:000725,src:000001,op:flip1,pos:915,+cov rename to src/exchange/afl-tests/id:000725,src:000001,op:flip1,pos:915,+cov diff --git a/src/mint/afl-tests/id:000726,src:000001,op:flip1,pos:1112,+cov b/src/exchange/afl-tests/id:000726,src:000001,op:flip1,pos:1112,+cov similarity index 100% rename from src/mint/afl-tests/id:000726,src:000001,op:flip1,pos:1112,+cov rename to src/exchange/afl-tests/id:000726,src:000001,op:flip1,pos:1112,+cov diff --git a/src/mint/afl-tests/id:000726,src:000001,op:flip1,pos:135,+cov b/src/exchange/afl-tests/id:000726,src:000001,op:flip1,pos:135,+cov similarity index 100% rename from src/mint/afl-tests/id:000726,src:000001,op:flip1,pos:135,+cov rename to src/exchange/afl-tests/id:000726,src:000001,op:flip1,pos:135,+cov diff --git a/src/mint/afl-tests/id:000727,src:000001,op:flip1,pos:1112,+cov b/src/exchange/afl-tests/id:000727,src:000001,op:flip1,pos:1112,+cov similarity index 100% rename from src/mint/afl-tests/id:000727,src:000001,op:flip1,pos:1112,+cov rename to src/exchange/afl-tests/id:000727,src:000001,op:flip1,pos:1112,+cov diff --git a/src/mint/afl-tests/id:000727,src:000001,op:flip1,pos:457,+cov b/src/exchange/afl-tests/id:000727,src:000001,op:flip1,pos:457,+cov similarity index 100% rename from src/mint/afl-tests/id:000727,src:000001,op:flip1,pos:457,+cov rename to src/exchange/afl-tests/id:000727,src:000001,op:flip1,pos:457,+cov diff --git a/src/mint/afl-tests/id:000728,src:000001,op:flip1,pos:1114,+cov b/src/exchange/afl-tests/id:000728,src:000001,op:flip1,pos:1114,+cov similarity index 100% rename from src/mint/afl-tests/id:000728,src:000001,op:flip1,pos:1114,+cov rename to src/exchange/afl-tests/id:000728,src:000001,op:flip1,pos:1114,+cov diff --git a/src/mint/afl-tests/id:000728,src:000001,op:flip1,pos:469,+cov b/src/exchange/afl-tests/id:000728,src:000001,op:flip1,pos:469,+cov similarity index 100% rename from src/mint/afl-tests/id:000728,src:000001,op:flip1,pos:469,+cov rename to src/exchange/afl-tests/id:000728,src:000001,op:flip1,pos:469,+cov diff --git a/src/mint/afl-tests/id:000729,src:000001,op:flip1,pos:1215,+cov b/src/exchange/afl-tests/id:000729,src:000001,op:flip1,pos:1215,+cov similarity index 100% rename from src/mint/afl-tests/id:000729,src:000001,op:flip1,pos:1215,+cov rename to src/exchange/afl-tests/id:000729,src:000001,op:flip1,pos:1215,+cov diff --git a/src/mint/afl-tests/id:000729,src:000001,op:flip1,pos:508,+cov b/src/exchange/afl-tests/id:000729,src:000001,op:flip1,pos:508,+cov similarity index 100% rename from src/mint/afl-tests/id:000729,src:000001,op:flip1,pos:508,+cov rename to src/exchange/afl-tests/id:000729,src:000001,op:flip1,pos:508,+cov diff --git a/src/mint/afl-tests/id:000730,src:000001,op:flip1,pos:1353,+cov b/src/exchange/afl-tests/id:000730,src:000001,op:flip1,pos:1353,+cov similarity index 100% rename from src/mint/afl-tests/id:000730,src:000001,op:flip1,pos:1353,+cov rename to src/exchange/afl-tests/id:000730,src:000001,op:flip1,pos:1353,+cov diff --git a/src/mint/afl-tests/id:000730,src:000001,op:flip1,pos:600 b/src/exchange/afl-tests/id:000730,src:000001,op:flip1,pos:600 similarity index 100% rename from src/mint/afl-tests/id:000730,src:000001,op:flip1,pos:600 rename to src/exchange/afl-tests/id:000730,src:000001,op:flip1,pos:600 diff --git a/src/mint/afl-tests/id:000731,src:000001,op:flip1,pos:1453,+cov b/src/exchange/afl-tests/id:000731,src:000001,op:flip1,pos:1453,+cov similarity index 100% rename from src/mint/afl-tests/id:000731,src:000001,op:flip1,pos:1453,+cov rename to src/exchange/afl-tests/id:000731,src:000001,op:flip1,pos:1453,+cov diff --git a/src/mint/afl-tests/id:000731,src:000001,op:flip1,pos:618,+cov b/src/exchange/afl-tests/id:000731,src:000001,op:flip1,pos:618,+cov similarity index 100% rename from src/mint/afl-tests/id:000731,src:000001,op:flip1,pos:618,+cov rename to src/exchange/afl-tests/id:000731,src:000001,op:flip1,pos:618,+cov diff --git a/src/mint/afl-tests/id:000732,src:000001,op:flip1,pos:1574,+cov b/src/exchange/afl-tests/id:000732,src:000001,op:flip1,pos:1574,+cov similarity index 100% rename from src/mint/afl-tests/id:000732,src:000001,op:flip1,pos:1574,+cov rename to src/exchange/afl-tests/id:000732,src:000001,op:flip1,pos:1574,+cov diff --git a/src/mint/afl-tests/id:000732,src:000001,op:flip1,pos:633,+cov b/src/exchange/afl-tests/id:000732,src:000001,op:flip1,pos:633,+cov similarity index 100% rename from src/mint/afl-tests/id:000732,src:000001,op:flip1,pos:633,+cov rename to src/exchange/afl-tests/id:000732,src:000001,op:flip1,pos:633,+cov diff --git a/src/mint/afl-tests/id:000733,src:000001,op:flip1,pos:1630 b/src/exchange/afl-tests/id:000733,src:000001,op:flip1,pos:1630 similarity index 100% rename from src/mint/afl-tests/id:000733,src:000001,op:flip1,pos:1630 rename to src/exchange/afl-tests/id:000733,src:000001,op:flip1,pos:1630 diff --git a/src/mint/afl-tests/id:000733,src:000001,op:flip1,pos:687,+cov b/src/exchange/afl-tests/id:000733,src:000001,op:flip1,pos:687,+cov similarity index 100% rename from src/mint/afl-tests/id:000733,src:000001,op:flip1,pos:687,+cov rename to src/exchange/afl-tests/id:000733,src:000001,op:flip1,pos:687,+cov diff --git a/src/mint/afl-tests/id:000734,src:000001,op:flip1,pos:722,+cov b/src/exchange/afl-tests/id:000734,src:000001,op:flip1,pos:722,+cov similarity index 100% rename from src/mint/afl-tests/id:000734,src:000001,op:flip1,pos:722,+cov rename to src/exchange/afl-tests/id:000734,src:000001,op:flip1,pos:722,+cov diff --git a/src/mint/afl-tests/id:000734,src:000001,op:flip2,pos:453,+cov b/src/exchange/afl-tests/id:000734,src:000001,op:flip2,pos:453,+cov similarity index 100% rename from src/mint/afl-tests/id:000734,src:000001,op:flip2,pos:453,+cov rename to src/exchange/afl-tests/id:000734,src:000001,op:flip2,pos:453,+cov diff --git a/src/mint/afl-tests/id:000735,src:000001,op:flip1,pos:734,+cov b/src/exchange/afl-tests/id:000735,src:000001,op:flip1,pos:734,+cov similarity index 100% rename from src/mint/afl-tests/id:000735,src:000001,op:flip1,pos:734,+cov rename to src/exchange/afl-tests/id:000735,src:000001,op:flip1,pos:734,+cov diff --git a/src/mint/afl-tests/id:000735,src:000001,op:flip2,pos:484,+cov b/src/exchange/afl-tests/id:000735,src:000001,op:flip2,pos:484,+cov similarity index 100% rename from src/mint/afl-tests/id:000735,src:000001,op:flip2,pos:484,+cov rename to src/exchange/afl-tests/id:000735,src:000001,op:flip2,pos:484,+cov diff --git a/src/mint/afl-tests/id:000736,src:000001,op:flip1,pos:800 b/src/exchange/afl-tests/id:000736,src:000001,op:flip1,pos:800 similarity index 100% rename from src/mint/afl-tests/id:000736,src:000001,op:flip1,pos:800 rename to src/exchange/afl-tests/id:000736,src:000001,op:flip1,pos:800 diff --git a/src/mint/afl-tests/id:000736,src:000001,op:flip2,pos:696,+cov b/src/exchange/afl-tests/id:000736,src:000001,op:flip2,pos:696,+cov similarity index 100% rename from src/mint/afl-tests/id:000736,src:000001,op:flip2,pos:696,+cov rename to src/exchange/afl-tests/id:000736,src:000001,op:flip2,pos:696,+cov diff --git a/src/mint/afl-tests/id:000737,src:000001,op:flip1,pos:888,+cov b/src/exchange/afl-tests/id:000737,src:000001,op:flip1,pos:888,+cov similarity index 100% rename from src/mint/afl-tests/id:000737,src:000001,op:flip1,pos:888,+cov rename to src/exchange/afl-tests/id:000737,src:000001,op:flip1,pos:888,+cov diff --git a/src/mint/afl-tests/id:000737,src:000001,op:flip2,pos:843,+cov b/src/exchange/afl-tests/id:000737,src:000001,op:flip2,pos:843,+cov similarity index 100% rename from src/mint/afl-tests/id:000737,src:000001,op:flip2,pos:843,+cov rename to src/exchange/afl-tests/id:000737,src:000001,op:flip2,pos:843,+cov diff --git a/src/mint/afl-tests/id:000738,src:000001,op:flip1,pos:893,+cov b/src/exchange/afl-tests/id:000738,src:000001,op:flip1,pos:893,+cov similarity index 100% rename from src/mint/afl-tests/id:000738,src:000001,op:flip1,pos:893,+cov rename to src/exchange/afl-tests/id:000738,src:000001,op:flip1,pos:893,+cov diff --git a/src/mint/afl-tests/id:000738,src:000001,op:flip2,pos:845,+cov b/src/exchange/afl-tests/id:000738,src:000001,op:flip2,pos:845,+cov similarity index 100% rename from src/mint/afl-tests/id:000738,src:000001,op:flip2,pos:845,+cov rename to src/exchange/afl-tests/id:000738,src:000001,op:flip2,pos:845,+cov diff --git a/src/mint/afl-tests/id:000739,src:000001,op:flip1,pos:1116,+cov b/src/exchange/afl-tests/id:000739,src:000001,op:flip1,pos:1116,+cov similarity index 100% rename from src/mint/afl-tests/id:000739,src:000001,op:flip1,pos:1116,+cov rename to src/exchange/afl-tests/id:000739,src:000001,op:flip1,pos:1116,+cov diff --git a/src/mint/afl-tests/id:000739,src:000001,op:flip2,pos:917,+cov b/src/exchange/afl-tests/id:000739,src:000001,op:flip2,pos:917,+cov similarity index 100% rename from src/mint/afl-tests/id:000739,src:000001,op:flip2,pos:917,+cov rename to src/exchange/afl-tests/id:000739,src:000001,op:flip2,pos:917,+cov diff --git a/src/mint/afl-tests/id:000740,src:000001,op:flip1,pos:1116,+cov b/src/exchange/afl-tests/id:000740,src:000001,op:flip1,pos:1116,+cov similarity index 100% rename from src/mint/afl-tests/id:000740,src:000001,op:flip1,pos:1116,+cov rename to src/exchange/afl-tests/id:000740,src:000001,op:flip1,pos:1116,+cov diff --git a/src/mint/afl-tests/id:000740,src:000001,op:flip2,pos:995,+cov b/src/exchange/afl-tests/id:000740,src:000001,op:flip2,pos:995,+cov similarity index 100% rename from src/mint/afl-tests/id:000740,src:000001,op:flip2,pos:995,+cov rename to src/exchange/afl-tests/id:000740,src:000001,op:flip2,pos:995,+cov diff --git a/src/mint/afl-tests/id:000741,src:000001,op:flip1,pos:1118,+cov b/src/exchange/afl-tests/id:000741,src:000001,op:flip1,pos:1118,+cov similarity index 100% rename from src/mint/afl-tests/id:000741,src:000001,op:flip1,pos:1118,+cov rename to src/exchange/afl-tests/id:000741,src:000001,op:flip1,pos:1118,+cov diff --git a/src/mint/afl-tests/id:000741,src:000001,op:flip2,pos:1031,+cov b/src/exchange/afl-tests/id:000741,src:000001,op:flip2,pos:1031,+cov similarity index 100% rename from src/mint/afl-tests/id:000741,src:000001,op:flip2,pos:1031,+cov rename to src/exchange/afl-tests/id:000741,src:000001,op:flip2,pos:1031,+cov diff --git a/src/mint/afl-tests/id:000742,src:000001,op:flip1,pos:1170,+cov b/src/exchange/afl-tests/id:000742,src:000001,op:flip1,pos:1170,+cov similarity index 100% rename from src/mint/afl-tests/id:000742,src:000001,op:flip1,pos:1170,+cov rename to src/exchange/afl-tests/id:000742,src:000001,op:flip1,pos:1170,+cov diff --git a/src/mint/afl-tests/id:000742,src:000001,op:flip2,pos:1135,+cov b/src/exchange/afl-tests/id:000742,src:000001,op:flip2,pos:1135,+cov similarity index 100% rename from src/mint/afl-tests/id:000742,src:000001,op:flip2,pos:1135,+cov rename to src/exchange/afl-tests/id:000742,src:000001,op:flip2,pos:1135,+cov diff --git a/src/mint/afl-tests/id:000743,src:000001,op:flip1,pos:1205,+cov b/src/exchange/afl-tests/id:000743,src:000001,op:flip1,pos:1205,+cov similarity index 100% rename from src/mint/afl-tests/id:000743,src:000001,op:flip1,pos:1205,+cov rename to src/exchange/afl-tests/id:000743,src:000001,op:flip1,pos:1205,+cov diff --git a/src/mint/afl-tests/id:000743,src:000001,op:flip2,pos:1286,+cov b/src/exchange/afl-tests/id:000743,src:000001,op:flip2,pos:1286,+cov similarity index 100% rename from src/mint/afl-tests/id:000743,src:000001,op:flip2,pos:1286,+cov rename to src/exchange/afl-tests/id:000743,src:000001,op:flip2,pos:1286,+cov diff --git a/src/mint/afl-tests/id:000744,src:000001,op:flip1,pos:1301,+cov b/src/exchange/afl-tests/id:000744,src:000001,op:flip1,pos:1301,+cov similarity index 100% rename from src/mint/afl-tests/id:000744,src:000001,op:flip1,pos:1301,+cov rename to src/exchange/afl-tests/id:000744,src:000001,op:flip1,pos:1301,+cov diff --git a/src/mint/afl-tests/id:000744,src:000001,op:flip2,pos:1655,+cov b/src/exchange/afl-tests/id:000744,src:000001,op:flip2,pos:1655,+cov similarity index 100% rename from src/mint/afl-tests/id:000744,src:000001,op:flip2,pos:1655,+cov rename to src/exchange/afl-tests/id:000744,src:000001,op:flip2,pos:1655,+cov diff --git a/src/mint/afl-tests/id:000745,src:000001,op:flip1,pos:1369,+cov b/src/exchange/afl-tests/id:000745,src:000001,op:flip1,pos:1369,+cov similarity index 100% rename from src/mint/afl-tests/id:000745,src:000001,op:flip1,pos:1369,+cov rename to src/exchange/afl-tests/id:000745,src:000001,op:flip1,pos:1369,+cov diff --git a/src/mint/afl-tests/id:000745,src:000001,op:flip4,pos:50,+cov b/src/exchange/afl-tests/id:000745,src:000001,op:flip4,pos:50,+cov similarity index 100% rename from src/mint/afl-tests/id:000745,src:000001,op:flip4,pos:50,+cov rename to src/exchange/afl-tests/id:000745,src:000001,op:flip4,pos:50,+cov diff --git a/src/mint/afl-tests/id:000746,src:000001,op:flip1,pos:1378,+cov b/src/exchange/afl-tests/id:000746,src:000001,op:flip1,pos:1378,+cov similarity index 100% rename from src/mint/afl-tests/id:000746,src:000001,op:flip1,pos:1378,+cov rename to src/exchange/afl-tests/id:000746,src:000001,op:flip1,pos:1378,+cov diff --git a/src/mint/afl-tests/id:000746,src:000001,op:flip4,pos:122,+cov b/src/exchange/afl-tests/id:000746,src:000001,op:flip4,pos:122,+cov similarity index 100% rename from src/mint/afl-tests/id:000746,src:000001,op:flip4,pos:122,+cov rename to src/exchange/afl-tests/id:000746,src:000001,op:flip4,pos:122,+cov diff --git a/src/mint/afl-tests/id:000747,src:000001,op:flip1,pos:1474,+cov b/src/exchange/afl-tests/id:000747,src:000001,op:flip1,pos:1474,+cov similarity index 100% rename from src/mint/afl-tests/id:000747,src:000001,op:flip1,pos:1474,+cov rename to src/exchange/afl-tests/id:000747,src:000001,op:flip1,pos:1474,+cov diff --git a/src/mint/afl-tests/id:000747,src:000001,op:flip4,pos:351,+cov b/src/exchange/afl-tests/id:000747,src:000001,op:flip4,pos:351,+cov similarity index 100% rename from src/mint/afl-tests/id:000747,src:000001,op:flip4,pos:351,+cov rename to src/exchange/afl-tests/id:000747,src:000001,op:flip4,pos:351,+cov diff --git a/src/mint/afl-tests/id:000748,src:000001,op:flip1,pos:1510,+cov b/src/exchange/afl-tests/id:000748,src:000001,op:flip1,pos:1510,+cov similarity index 100% rename from src/mint/afl-tests/id:000748,src:000001,op:flip1,pos:1510,+cov rename to src/exchange/afl-tests/id:000748,src:000001,op:flip1,pos:1510,+cov diff --git a/src/mint/afl-tests/id:000748,src:000001,op:flip4,pos:569,+cov b/src/exchange/afl-tests/id:000748,src:000001,op:flip4,pos:569,+cov similarity index 100% rename from src/mint/afl-tests/id:000748,src:000001,op:flip4,pos:569,+cov rename to src/exchange/afl-tests/id:000748,src:000001,op:flip4,pos:569,+cov diff --git a/src/mint/afl-tests/id:000749,src:000001,op:flip1,pos:1634 b/src/exchange/afl-tests/id:000749,src:000001,op:flip1,pos:1634 similarity index 100% rename from src/mint/afl-tests/id:000749,src:000001,op:flip1,pos:1634 rename to src/exchange/afl-tests/id:000749,src:000001,op:flip1,pos:1634 diff --git a/src/mint/afl-tests/id:000749,src:000001,op:flip4,pos:788,+cov b/src/exchange/afl-tests/id:000749,src:000001,op:flip4,pos:788,+cov similarity index 100% rename from src/mint/afl-tests/id:000749,src:000001,op:flip4,pos:788,+cov rename to src/exchange/afl-tests/id:000749,src:000001,op:flip4,pos:788,+cov diff --git a/src/mint/afl-tests/id:000750,src:000001,op:flip1,pos:1657,+cov b/src/exchange/afl-tests/id:000750,src:000001,op:flip1,pos:1657,+cov similarity index 100% rename from src/mint/afl-tests/id:000750,src:000001,op:flip1,pos:1657,+cov rename to src/exchange/afl-tests/id:000750,src:000001,op:flip1,pos:1657,+cov diff --git a/src/mint/afl-tests/id:000750,src:000001,op:flip4,pos:1198,+cov b/src/exchange/afl-tests/id:000750,src:000001,op:flip4,pos:1198,+cov similarity index 100% rename from src/mint/afl-tests/id:000750,src:000001,op:flip4,pos:1198,+cov rename to src/exchange/afl-tests/id:000750,src:000001,op:flip4,pos:1198,+cov diff --git a/src/mint/afl-tests/id:000751,src:000001,op:flip1,pos:1712,+cov b/src/exchange/afl-tests/id:000751,src:000001,op:flip1,pos:1712,+cov similarity index 100% rename from src/mint/afl-tests/id:000751,src:000001,op:flip1,pos:1712,+cov rename to src/exchange/afl-tests/id:000751,src:000001,op:flip1,pos:1712,+cov diff --git a/src/mint/afl-tests/id:000751,src:000001,op:flip8,pos:67,+cov b/src/exchange/afl-tests/id:000751,src:000001,op:flip8,pos:67,+cov similarity index 100% rename from src/mint/afl-tests/id:000751,src:000001,op:flip8,pos:67,+cov rename to src/exchange/afl-tests/id:000751,src:000001,op:flip8,pos:67,+cov diff --git a/src/mint/afl-tests/id:000752,src:000001,op:flip2,pos:21,+cov b/src/exchange/afl-tests/id:000752,src:000001,op:flip2,pos:21,+cov similarity index 100% rename from src/mint/afl-tests/id:000752,src:000001,op:flip2,pos:21,+cov rename to src/exchange/afl-tests/id:000752,src:000001,op:flip2,pos:21,+cov diff --git a/src/mint/afl-tests/id:000752,src:000001,op:flip8,pos:1661,+cov b/src/exchange/afl-tests/id:000752,src:000001,op:flip8,pos:1661,+cov similarity index 100% rename from src/mint/afl-tests/id:000752,src:000001,op:flip8,pos:1661,+cov rename to src/exchange/afl-tests/id:000752,src:000001,op:flip8,pos:1661,+cov diff --git a/src/mint/afl-tests/id:000753,src:000001,op:flip16,pos:390,+cov b/src/exchange/afl-tests/id:000753,src:000001,op:flip16,pos:390,+cov similarity index 100% rename from src/mint/afl-tests/id:000753,src:000001,op:flip16,pos:390,+cov rename to src/exchange/afl-tests/id:000753,src:000001,op:flip16,pos:390,+cov diff --git a/src/mint/afl-tests/id:000753,src:000001,op:flip2,pos:39,+cov b/src/exchange/afl-tests/id:000753,src:000001,op:flip2,pos:39,+cov similarity index 100% rename from src/mint/afl-tests/id:000753,src:000001,op:flip2,pos:39,+cov rename to src/exchange/afl-tests/id:000753,src:000001,op:flip2,pos:39,+cov diff --git a/src/mint/afl-tests/id:000754,src:000001,op:flip2,pos:105,+cov b/src/exchange/afl-tests/id:000754,src:000001,op:flip2,pos:105,+cov similarity index 100% rename from src/mint/afl-tests/id:000754,src:000001,op:flip2,pos:105,+cov rename to src/exchange/afl-tests/id:000754,src:000001,op:flip2,pos:105,+cov diff --git a/src/mint/afl-tests/id:000754,src:000001,op:flip32,pos:339,+cov b/src/exchange/afl-tests/id:000754,src:000001,op:flip32,pos:339,+cov similarity index 100% rename from src/mint/afl-tests/id:000754,src:000001,op:flip32,pos:339,+cov rename to src/exchange/afl-tests/id:000754,src:000001,op:flip32,pos:339,+cov diff --git a/src/mint/afl-tests/id:000755,src:000001,op:flip2,pos:890,+cov b/src/exchange/afl-tests/id:000755,src:000001,op:flip2,pos:890,+cov similarity index 100% rename from src/mint/afl-tests/id:000755,src:000001,op:flip2,pos:890,+cov rename to src/exchange/afl-tests/id:000755,src:000001,op:flip2,pos:890,+cov diff --git a/src/mint/afl-tests/id:000755,src:000001,op:flip32,pos:975,+cov b/src/exchange/afl-tests/id:000755,src:000001,op:flip32,pos:975,+cov similarity index 100% rename from src/mint/afl-tests/id:000755,src:000001,op:flip32,pos:975,+cov rename to src/exchange/afl-tests/id:000755,src:000001,op:flip32,pos:975,+cov diff --git a/src/mint/afl-tests/id:000756,src:000001,op:arith8,pos:10,val:-30,+cov b/src/exchange/afl-tests/id:000756,src:000001,op:arith8,pos:10,val:-30,+cov similarity index 100% rename from src/mint/afl-tests/id:000756,src:000001,op:arith8,pos:10,val:-30,+cov rename to src/exchange/afl-tests/id:000756,src:000001,op:arith8,pos:10,val:-30,+cov diff --git a/src/mint/afl-tests/id:000756,src:000001,op:flip2,pos:975,+cov b/src/exchange/afl-tests/id:000756,src:000001,op:flip2,pos:975,+cov similarity index 100% rename from src/mint/afl-tests/id:000756,src:000001,op:flip2,pos:975,+cov rename to src/exchange/afl-tests/id:000756,src:000001,op:flip2,pos:975,+cov diff --git a/src/mint/afl-tests/id:000757,src:000001,op:arith8,pos:46,val:+9,+cov b/src/exchange/afl-tests/id:000757,src:000001,op:arith8,pos:46,val:+9,+cov similarity index 100% rename from src/mint/afl-tests/id:000757,src:000001,op:arith8,pos:46,val:+9,+cov rename to src/exchange/afl-tests/id:000757,src:000001,op:arith8,pos:46,val:+9,+cov diff --git a/src/mint/afl-tests/id:000757,src:000001,op:flip2,pos:1509,+cov b/src/exchange/afl-tests/id:000757,src:000001,op:flip2,pos:1509,+cov similarity index 100% rename from src/mint/afl-tests/id:000757,src:000001,op:flip2,pos:1509,+cov rename to src/exchange/afl-tests/id:000757,src:000001,op:flip2,pos:1509,+cov diff --git a/src/mint/afl-tests/id:000758,src:000001,op:arith8,pos:72,val:+5,+cov b/src/exchange/afl-tests/id:000758,src:000001,op:arith8,pos:72,val:+5,+cov similarity index 100% rename from src/mint/afl-tests/id:000758,src:000001,op:arith8,pos:72,val:+5,+cov rename to src/exchange/afl-tests/id:000758,src:000001,op:arith8,pos:72,val:+5,+cov diff --git a/src/mint/afl-tests/id:000758,src:000001,op:flip2,pos:1662,+cov b/src/exchange/afl-tests/id:000758,src:000001,op:flip2,pos:1662,+cov similarity index 100% rename from src/mint/afl-tests/id:000758,src:000001,op:flip2,pos:1662,+cov rename to src/exchange/afl-tests/id:000758,src:000001,op:flip2,pos:1662,+cov diff --git a/src/mint/afl-tests/id:000759,src:000001,op:flip4,pos:32,+cov b/src/exchange/afl-tests/id:000759,src:000001,op:flip4,pos:32,+cov similarity index 100% rename from src/mint/afl-tests/id:000759,src:000001,op:flip4,pos:32,+cov rename to src/exchange/afl-tests/id:000759,src:000001,op:flip4,pos:32,+cov diff --git a/src/mint/afl-tests/id:000759,src:000002,op:flip1,pos:30 b/src/exchange/afl-tests/id:000759,src:000002,op:flip1,pos:30 similarity index 100% rename from src/mint/afl-tests/id:000759,src:000002,op:flip1,pos:30 rename to src/exchange/afl-tests/id:000759,src:000002,op:flip1,pos:30 diff --git a/src/mint/afl-tests/id:000760,src:000001,op:flip4,pos:300,+cov b/src/exchange/afl-tests/id:000760,src:000001,op:flip4,pos:300,+cov similarity index 100% rename from src/mint/afl-tests/id:000760,src:000001,op:flip4,pos:300,+cov rename to src/exchange/afl-tests/id:000760,src:000001,op:flip4,pos:300,+cov diff --git a/src/mint/afl-tests/id:000760,src:000002,op:flip1,pos:50 b/src/exchange/afl-tests/id:000760,src:000002,op:flip1,pos:50 similarity index 100% rename from src/mint/afl-tests/id:000760,src:000002,op:flip1,pos:50 rename to src/exchange/afl-tests/id:000760,src:000002,op:flip1,pos:50 diff --git a/src/mint/afl-tests/id:000761,src:000001,op:flip4,pos:457,+cov b/src/exchange/afl-tests/id:000761,src:000001,op:flip4,pos:457,+cov similarity index 100% rename from src/mint/afl-tests/id:000761,src:000001,op:flip4,pos:457,+cov rename to src/exchange/afl-tests/id:000761,src:000001,op:flip4,pos:457,+cov diff --git a/src/mint/afl-tests/id:000761,src:000002,op:flip1,pos:50,+cov b/src/exchange/afl-tests/id:000761,src:000002,op:flip1,pos:50,+cov similarity index 100% rename from src/mint/afl-tests/id:000761,src:000002,op:flip1,pos:50,+cov rename to src/exchange/afl-tests/id:000761,src:000002,op:flip1,pos:50,+cov diff --git a/src/mint/afl-tests/id:000762,src:000001,op:flip4,pos:1507,+cov b/src/exchange/afl-tests/id:000762,src:000001,op:flip4,pos:1507,+cov similarity index 100% rename from src/mint/afl-tests/id:000762,src:000001,op:flip4,pos:1507,+cov rename to src/exchange/afl-tests/id:000762,src:000001,op:flip4,pos:1507,+cov diff --git a/src/mint/afl-tests/id:000762,src:000002,op:flip1,pos:63 b/src/exchange/afl-tests/id:000762,src:000002,op:flip1,pos:63 similarity index 100% rename from src/mint/afl-tests/id:000762,src:000002,op:flip1,pos:63 rename to src/exchange/afl-tests/id:000762,src:000002,op:flip1,pos:63 diff --git a/src/mint/afl-tests/id:000763,src:000001,op:flip4,pos:1549,+cov b/src/exchange/afl-tests/id:000763,src:000001,op:flip4,pos:1549,+cov similarity index 100% rename from src/mint/afl-tests/id:000763,src:000001,op:flip4,pos:1549,+cov rename to src/exchange/afl-tests/id:000763,src:000001,op:flip4,pos:1549,+cov diff --git a/src/mint/afl-tests/id:000763,src:000002,op:flip1,pos:76 b/src/exchange/afl-tests/id:000763,src:000002,op:flip1,pos:76 similarity index 100% rename from src/mint/afl-tests/id:000763,src:000002,op:flip1,pos:76 rename to src/exchange/afl-tests/id:000763,src:000002,op:flip1,pos:76 diff --git a/src/mint/afl-tests/id:000764,src:000001,op:flip4,pos:1577,+cov b/src/exchange/afl-tests/id:000764,src:000001,op:flip4,pos:1577,+cov similarity index 100% rename from src/mint/afl-tests/id:000764,src:000001,op:flip4,pos:1577,+cov rename to src/exchange/afl-tests/id:000764,src:000001,op:flip4,pos:1577,+cov diff --git a/src/mint/afl-tests/id:000764,src:000002,op:flip1,pos:135 b/src/exchange/afl-tests/id:000764,src:000002,op:flip1,pos:135 similarity index 100% rename from src/mint/afl-tests/id:000764,src:000002,op:flip1,pos:135 rename to src/exchange/afl-tests/id:000764,src:000002,op:flip1,pos:135 diff --git a/src/mint/afl-tests/id:000765,src:000001,op:flip8,pos:899,+cov b/src/exchange/afl-tests/id:000765,src:000001,op:flip8,pos:899,+cov similarity index 100% rename from src/mint/afl-tests/id:000765,src:000001,op:flip8,pos:899,+cov rename to src/exchange/afl-tests/id:000765,src:000001,op:flip8,pos:899,+cov diff --git a/src/mint/afl-tests/id:000765,src:000002,op:flip1,pos:143,+cov b/src/exchange/afl-tests/id:000765,src:000002,op:flip1,pos:143,+cov similarity index 100% rename from src/mint/afl-tests/id:000765,src:000002,op:flip1,pos:143,+cov rename to src/exchange/afl-tests/id:000765,src:000002,op:flip1,pos:143,+cov diff --git a/src/mint/afl-tests/id:000766,src:000001,op:flip8,pos:1457,+cov b/src/exchange/afl-tests/id:000766,src:000001,op:flip8,pos:1457,+cov similarity index 100% rename from src/mint/afl-tests/id:000766,src:000001,op:flip8,pos:1457,+cov rename to src/exchange/afl-tests/id:000766,src:000001,op:flip8,pos:1457,+cov diff --git a/src/mint/afl-tests/id:000766,src:000002,op:flip4,pos:8,+cov b/src/exchange/afl-tests/id:000766,src:000002,op:flip4,pos:8,+cov similarity index 100% rename from src/mint/afl-tests/id:000766,src:000002,op:flip4,pos:8,+cov rename to src/exchange/afl-tests/id:000766,src:000002,op:flip4,pos:8,+cov diff --git a/src/mint/afl-tests/id:000767,src:000001,op:flip32,pos:301,+cov b/src/exchange/afl-tests/id:000767,src:000001,op:flip32,pos:301,+cov similarity index 100% rename from src/mint/afl-tests/id:000767,src:000001,op:flip32,pos:301,+cov rename to src/exchange/afl-tests/id:000767,src:000001,op:flip32,pos:301,+cov diff --git a/src/mint/afl-tests/id:000767,src:000002,op:flip4,pos:117,+cov b/src/exchange/afl-tests/id:000767,src:000002,op:flip4,pos:117,+cov similarity index 100% rename from src/mint/afl-tests/id:000767,src:000002,op:flip4,pos:117,+cov rename to src/exchange/afl-tests/id:000767,src:000002,op:flip4,pos:117,+cov diff --git a/src/mint/afl-tests/id:000768,src:000001,op:arith8,pos:18,val:+11,+cov b/src/exchange/afl-tests/id:000768,src:000001,op:arith8,pos:18,val:+11,+cov similarity index 100% rename from src/mint/afl-tests/id:000768,src:000001,op:arith8,pos:18,val:+11,+cov rename to src/exchange/afl-tests/id:000768,src:000001,op:arith8,pos:18,val:+11,+cov diff --git a/src/mint/afl-tests/id:000768,src:000002,op:arith8,pos:11,val:-1,+cov b/src/exchange/afl-tests/id:000768,src:000002,op:arith8,pos:11,val:-1,+cov similarity index 100% rename from src/mint/afl-tests/id:000768,src:000002,op:arith8,pos:11,val:-1,+cov rename to src/exchange/afl-tests/id:000768,src:000002,op:arith8,pos:11,val:-1,+cov diff --git a/src/mint/afl-tests/id:000769,src:000001,op:arith8,pos:33,val:+17,+cov b/src/exchange/afl-tests/id:000769,src:000001,op:arith8,pos:33,val:+17,+cov similarity index 100% rename from src/mint/afl-tests/id:000769,src:000001,op:arith8,pos:33,val:+17,+cov rename to src/exchange/afl-tests/id:000769,src:000001,op:arith8,pos:33,val:+17,+cov diff --git a/src/mint/afl-tests/id:000769,src:000002,op:arith8,pos:20,val:+13,+cov b/src/exchange/afl-tests/id:000769,src:000002,op:arith8,pos:20,val:+13,+cov similarity index 100% rename from src/mint/afl-tests/id:000769,src:000002,op:arith8,pos:20,val:+13,+cov rename to src/exchange/afl-tests/id:000769,src:000002,op:arith8,pos:20,val:+13,+cov diff --git a/src/mint/afl-tests/id:000770,src:000002,op:arith8,pos:34,val:-6,+cov b/src/exchange/afl-tests/id:000770,src:000002,op:arith8,pos:34,val:-6,+cov similarity index 100% rename from src/mint/afl-tests/id:000770,src:000002,op:arith8,pos:34,val:-6,+cov rename to src/exchange/afl-tests/id:000770,src:000002,op:arith8,pos:34,val:-6,+cov diff --git a/src/mint/afl-tests/id:000770,src:000002,op:flip1,pos:30 b/src/exchange/afl-tests/id:000770,src:000002,op:flip1,pos:30 similarity index 100% rename from src/mint/afl-tests/id:000770,src:000002,op:flip1,pos:30 rename to src/exchange/afl-tests/id:000770,src:000002,op:flip1,pos:30 diff --git a/src/mint/afl-tests/id:000771,src:000002,op:arith8,pos:105,val:+35,+cov b/src/exchange/afl-tests/id:000771,src:000002,op:arith8,pos:105,val:+35,+cov similarity index 100% rename from src/mint/afl-tests/id:000771,src:000002,op:arith8,pos:105,val:+35,+cov rename to src/exchange/afl-tests/id:000771,src:000002,op:arith8,pos:105,val:+35,+cov diff --git a/src/mint/afl-tests/id:000771,src:000002,op:flip1,pos:45,+cov b/src/exchange/afl-tests/id:000771,src:000002,op:flip1,pos:45,+cov similarity index 100% rename from src/mint/afl-tests/id:000771,src:000002,op:flip1,pos:45,+cov rename to src/exchange/afl-tests/id:000771,src:000002,op:flip1,pos:45,+cov diff --git a/src/mint/afl-tests/id:000772,src:000002,op:arith8,pos:109,val:-35 b/src/exchange/afl-tests/id:000772,src:000002,op:arith8,pos:109,val:-35 similarity index 100% rename from src/mint/afl-tests/id:000772,src:000002,op:arith8,pos:109,val:-35 rename to src/exchange/afl-tests/id:000772,src:000002,op:arith8,pos:109,val:-35 diff --git a/src/mint/afl-tests/id:000772,src:000002,op:flip1,pos:50 b/src/exchange/afl-tests/id:000772,src:000002,op:flip1,pos:50 similarity index 100% rename from src/mint/afl-tests/id:000772,src:000002,op:flip1,pos:50 rename to src/exchange/afl-tests/id:000772,src:000002,op:flip1,pos:50 diff --git a/src/mint/afl-tests/id:000773,src:000002,op:arith8,pos:131,val:+5,+cov b/src/exchange/afl-tests/id:000773,src:000002,op:arith8,pos:131,val:+5,+cov similarity index 100% rename from src/mint/afl-tests/id:000773,src:000002,op:arith8,pos:131,val:+5,+cov rename to src/exchange/afl-tests/id:000773,src:000002,op:arith8,pos:131,val:+5,+cov diff --git a/src/mint/afl-tests/id:000773,src:000002,op:flip1,pos:63 b/src/exchange/afl-tests/id:000773,src:000002,op:flip1,pos:63 similarity index 100% rename from src/mint/afl-tests/id:000773,src:000002,op:flip1,pos:63 rename to src/exchange/afl-tests/id:000773,src:000002,op:flip1,pos:63 diff --git a/src/mint/afl-tests/id:000774,src:000002,op:arith8,pos:137,val:+9,+cov b/src/exchange/afl-tests/id:000774,src:000002,op:arith8,pos:137,val:+9,+cov similarity index 100% rename from src/mint/afl-tests/id:000774,src:000002,op:arith8,pos:137,val:+9,+cov rename to src/exchange/afl-tests/id:000774,src:000002,op:arith8,pos:137,val:+9,+cov diff --git a/src/mint/afl-tests/id:000774,src:000002,op:flip1,pos:76 b/src/exchange/afl-tests/id:000774,src:000002,op:flip1,pos:76 similarity index 100% rename from src/mint/afl-tests/id:000774,src:000002,op:flip1,pos:76 rename to src/exchange/afl-tests/id:000774,src:000002,op:flip1,pos:76 diff --git a/src/mint/afl-tests/id:000775,src:000002,op:arith16,pos:55,val:-29,+cov b/src/exchange/afl-tests/id:000775,src:000002,op:arith16,pos:55,val:-29,+cov similarity index 100% rename from src/mint/afl-tests/id:000775,src:000002,op:arith16,pos:55,val:-29,+cov rename to src/exchange/afl-tests/id:000775,src:000002,op:arith16,pos:55,val:-29,+cov diff --git a/src/mint/afl-tests/id:000775,src:000002,op:flip1,pos:107,+cov b/src/exchange/afl-tests/id:000775,src:000002,op:flip1,pos:107,+cov similarity index 100% rename from src/mint/afl-tests/id:000775,src:000002,op:flip1,pos:107,+cov rename to src/exchange/afl-tests/id:000775,src:000002,op:flip1,pos:107,+cov diff --git a/src/mint/afl-tests/id:000776,src:000002,op:flip1,pos:135 b/src/exchange/afl-tests/id:000776,src:000002,op:flip1,pos:135 similarity index 100% rename from src/mint/afl-tests/id:000776,src:000002,op:flip1,pos:135 rename to src/exchange/afl-tests/id:000776,src:000002,op:flip1,pos:135 diff --git a/src/mint/afl-tests/id:000776,src:000002,op:int16,pos:27,val:+16,+cov b/src/exchange/afl-tests/id:000776,src:000002,op:int16,pos:27,val:+16,+cov similarity index 100% rename from src/mint/afl-tests/id:000776,src:000002,op:int16,pos:27,val:+16,+cov rename to src/exchange/afl-tests/id:000776,src:000002,op:int16,pos:27,val:+16,+cov diff --git a/src/mint/afl-tests/id:000777,src:000002,op:flip2,pos:56,+cov b/src/exchange/afl-tests/id:000777,src:000002,op:flip2,pos:56,+cov similarity index 100% rename from src/mint/afl-tests/id:000777,src:000002,op:flip2,pos:56,+cov rename to src/exchange/afl-tests/id:000777,src:000002,op:flip2,pos:56,+cov diff --git a/src/mint/afl-tests/id:000777,src:000002,op:int16,pos:96,val:+32 b/src/exchange/afl-tests/id:000777,src:000002,op:int16,pos:96,val:+32 similarity index 100% rename from src/mint/afl-tests/id:000777,src:000002,op:int16,pos:96,val:+32 rename to src/exchange/afl-tests/id:000777,src:000002,op:int16,pos:96,val:+32 diff --git a/src/mint/afl-tests/id:000778,src:000002,op:flip2,pos:113,+cov b/src/exchange/afl-tests/id:000778,src:000002,op:flip2,pos:113,+cov similarity index 100% rename from src/mint/afl-tests/id:000778,src:000002,op:flip2,pos:113,+cov rename to src/exchange/afl-tests/id:000778,src:000002,op:flip2,pos:113,+cov diff --git a/src/mint/afl-tests/id:000778,src:000002,op:int32,pos:53,val:be:+32767,+cov b/src/exchange/afl-tests/id:000778,src:000002,op:int32,pos:53,val:be:+32767,+cov similarity index 100% rename from src/mint/afl-tests/id:000778,src:000002,op:int32,pos:53,val:be:+32767,+cov rename to src/exchange/afl-tests/id:000778,src:000002,op:int32,pos:53,val:be:+32767,+cov diff --git a/src/mint/afl-tests/id:000779,src:000002,op:ext_AO,pos:22,+cov b/src/exchange/afl-tests/id:000779,src:000002,op:ext_AO,pos:22,+cov similarity index 100% rename from src/mint/afl-tests/id:000779,src:000002,op:ext_AO,pos:22,+cov rename to src/exchange/afl-tests/id:000779,src:000002,op:ext_AO,pos:22,+cov diff --git a/src/mint/afl-tests/id:000779,src:000002,op:flip4,pos:15,+cov b/src/exchange/afl-tests/id:000779,src:000002,op:flip4,pos:15,+cov similarity index 100% rename from src/mint/afl-tests/id:000779,src:000002,op:flip4,pos:15,+cov rename to src/exchange/afl-tests/id:000779,src:000002,op:flip4,pos:15,+cov diff --git a/src/mint/afl-tests/id:000780,src:000002,op:arith8,pos:10,val:-7,+cov b/src/exchange/afl-tests/id:000780,src:000002,op:arith8,pos:10,val:-7,+cov similarity index 100% rename from src/mint/afl-tests/id:000780,src:000002,op:arith8,pos:10,val:-7,+cov rename to src/exchange/afl-tests/id:000780,src:000002,op:arith8,pos:10,val:-7,+cov diff --git a/src/mint/afl-tests/id:000780,src:000002,op:ext_AO,pos:130,+cov b/src/exchange/afl-tests/id:000780,src:000002,op:ext_AO,pos:130,+cov similarity index 100% rename from src/mint/afl-tests/id:000780,src:000002,op:ext_AO,pos:130,+cov rename to src/exchange/afl-tests/id:000780,src:000002,op:ext_AO,pos:130,+cov diff --git a/src/mint/afl-tests/id:000781,src:000002,op:arith8,pos:29,val:+21,+cov b/src/exchange/afl-tests/id:000781,src:000002,op:arith8,pos:29,val:+21,+cov similarity index 100% rename from src/mint/afl-tests/id:000781,src:000002,op:arith8,pos:29,val:+21,+cov rename to src/exchange/afl-tests/id:000781,src:000002,op:arith8,pos:29,val:+21,+cov diff --git a/src/mint/afl-tests/id:000781,src:000002,op:havoc,rep:8 b/src/exchange/afl-tests/id:000781,src:000002,op:havoc,rep:8 similarity index 100% rename from src/mint/afl-tests/id:000781,src:000002,op:havoc,rep:8 rename to src/exchange/afl-tests/id:000781,src:000002,op:havoc,rep:8 diff --git a/src/mint/afl-tests/id:000782,src:000002,op:arith8,pos:109,val:-35 b/src/exchange/afl-tests/id:000782,src:000002,op:arith8,pos:109,val:-35 similarity index 100% rename from src/mint/afl-tests/id:000782,src:000002,op:arith8,pos:109,val:-35 rename to src/exchange/afl-tests/id:000782,src:000002,op:arith8,pos:109,val:-35 diff --git a/src/mint/afl-tests/id:000782,src:000002,op:havoc,rep:2 b/src/exchange/afl-tests/id:000782,src:000002,op:havoc,rep:2 similarity index 100% rename from src/mint/afl-tests/id:000782,src:000002,op:havoc,rep:2 rename to src/exchange/afl-tests/id:000782,src:000002,op:havoc,rep:2 diff --git a/src/mint/afl-tests/id:000783,src:000002,op:arith8,pos:132,val:+34,+cov b/src/exchange/afl-tests/id:000783,src:000002,op:arith8,pos:132,val:+34,+cov similarity index 100% rename from src/mint/afl-tests/id:000783,src:000002,op:arith8,pos:132,val:+34,+cov rename to src/exchange/afl-tests/id:000783,src:000002,op:arith8,pos:132,val:+34,+cov diff --git a/src/mint/afl-tests/id:000783,src:000002,op:havoc,rep:4 b/src/exchange/afl-tests/id:000783,src:000002,op:havoc,rep:4 similarity index 100% rename from src/mint/afl-tests/id:000783,src:000002,op:havoc,rep:4 rename to src/exchange/afl-tests/id:000783,src:000002,op:havoc,rep:4 diff --git a/src/mint/afl-tests/id:000784,src:000002,op:havoc,rep:64,+cov b/src/exchange/afl-tests/id:000784,src:000002,op:havoc,rep:64,+cov similarity index 100% rename from src/mint/afl-tests/id:000784,src:000002,op:havoc,rep:64,+cov rename to src/exchange/afl-tests/id:000784,src:000002,op:havoc,rep:64,+cov diff --git a/src/mint/afl-tests/id:000784,src:000002,op:int16,pos:20,val:-129,+cov b/src/exchange/afl-tests/id:000784,src:000002,op:int16,pos:20,val:-129,+cov similarity index 100% rename from src/mint/afl-tests/id:000784,src:000002,op:int16,pos:20,val:-129,+cov rename to src/exchange/afl-tests/id:000784,src:000002,op:int16,pos:20,val:-129,+cov diff --git a/src/mint/afl-tests/id:000785,src:000002,op:havoc,rep:64 b/src/exchange/afl-tests/id:000785,src:000002,op:havoc,rep:64 similarity index 100% rename from src/mint/afl-tests/id:000785,src:000002,op:havoc,rep:64 rename to src/exchange/afl-tests/id:000785,src:000002,op:havoc,rep:64 diff --git a/src/mint/afl-tests/id:000785,src:000002,op:int16,pos:82,val:+64,+cov b/src/exchange/afl-tests/id:000785,src:000002,op:int16,pos:82,val:+64,+cov similarity index 100% rename from src/mint/afl-tests/id:000785,src:000002,op:int16,pos:82,val:+64,+cov rename to src/exchange/afl-tests/id:000785,src:000002,op:int16,pos:82,val:+64,+cov diff --git a/src/mint/afl-tests/id:000786,src:000002,op:havoc,rep:16 b/src/exchange/afl-tests/id:000786,src:000002,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000786,src:000002,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000786,src:000002,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000786,src:000002,op:int16,pos:96,val:+32 b/src/exchange/afl-tests/id:000786,src:000002,op:int16,pos:96,val:+32 similarity index 100% rename from src/mint/afl-tests/id:000786,src:000002,op:int16,pos:96,val:+32 rename to src/exchange/afl-tests/id:000786,src:000002,op:int16,pos:96,val:+32 diff --git a/src/mint/afl-tests/id:000787,src:000002,op:havoc,rep:64 b/src/exchange/afl-tests/id:000787,src:000002,op:havoc,rep:64 similarity index 100% rename from src/mint/afl-tests/id:000787,src:000002,op:havoc,rep:64 rename to src/exchange/afl-tests/id:000787,src:000002,op:havoc,rep:64 diff --git a/src/mint/afl-tests/id:000787,src:000002,op:int16,pos:112,val:be:-128,+cov b/src/exchange/afl-tests/id:000787,src:000002,op:int16,pos:112,val:be:-128,+cov similarity index 100% rename from src/mint/afl-tests/id:000787,src:000002,op:int16,pos:112,val:be:-128,+cov rename to src/exchange/afl-tests/id:000787,src:000002,op:int16,pos:112,val:be:-128,+cov diff --git a/src/mint/afl-tests/id:000788,src:000002,op:havoc,rep:16 b/src/exchange/afl-tests/id:000788,src:000002,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000788,src:000002,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000788,src:000002,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000788,src:000002,op:int32,pos:26,val:+65536,+cov b/src/exchange/afl-tests/id:000788,src:000002,op:int32,pos:26,val:+65536,+cov similarity index 100% rename from src/mint/afl-tests/id:000788,src:000002,op:int32,pos:26,val:+65536,+cov rename to src/exchange/afl-tests/id:000788,src:000002,op:int32,pos:26,val:+65536,+cov diff --git a/src/mint/afl-tests/id:000789,src:000002,op:havoc,rep:16 b/src/exchange/afl-tests/id:000789,src:000002,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000789,src:000002,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000789,src:000002,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000789,src:000002,op:int32,pos:54,val:+32,+cov b/src/exchange/afl-tests/id:000789,src:000002,op:int32,pos:54,val:+32,+cov similarity index 100% rename from src/mint/afl-tests/id:000789,src:000002,op:int32,pos:54,val:+32,+cov rename to src/exchange/afl-tests/id:000789,src:000002,op:int32,pos:54,val:+32,+cov diff --git a/src/mint/afl-tests/id:000790,src:000002,op:ext_AO,pos:95,+cov b/src/exchange/afl-tests/id:000790,src:000002,op:ext_AO,pos:95,+cov similarity index 100% rename from src/mint/afl-tests/id:000790,src:000002,op:ext_AO,pos:95,+cov rename to src/exchange/afl-tests/id:000790,src:000002,op:ext_AO,pos:95,+cov diff --git a/src/mint/afl-tests/id:000790,src:000002,op:havoc,rep:64 b/src/exchange/afl-tests/id:000790,src:000002,op:havoc,rep:64 similarity index 100% rename from src/mint/afl-tests/id:000790,src:000002,op:havoc,rep:64 rename to src/exchange/afl-tests/id:000790,src:000002,op:havoc,rep:64 diff --git a/src/mint/afl-tests/id:000791,src:000002,op:ext_AO,pos:98,+cov b/src/exchange/afl-tests/id:000791,src:000002,op:ext_AO,pos:98,+cov similarity index 100% rename from src/mint/afl-tests/id:000791,src:000002,op:ext_AO,pos:98,+cov rename to src/exchange/afl-tests/id:000791,src:000002,op:ext_AO,pos:98,+cov diff --git a/src/mint/afl-tests/id:000791,src:000002,op:havoc,rep:4 b/src/exchange/afl-tests/id:000791,src:000002,op:havoc,rep:4 similarity index 100% rename from src/mint/afl-tests/id:000791,src:000002,op:havoc,rep:4 rename to src/exchange/afl-tests/id:000791,src:000002,op:havoc,rep:4 diff --git a/src/mint/afl-tests/id:000792,src:000002,op:ext_AO,pos:130,+cov b/src/exchange/afl-tests/id:000792,src:000002,op:ext_AO,pos:130,+cov similarity index 100% rename from src/mint/afl-tests/id:000792,src:000002,op:ext_AO,pos:130,+cov rename to src/exchange/afl-tests/id:000792,src:000002,op:ext_AO,pos:130,+cov diff --git a/src/mint/afl-tests/id:000792,src:000002,op:havoc,rep:8 b/src/exchange/afl-tests/id:000792,src:000002,op:havoc,rep:8 similarity index 100% rename from src/mint/afl-tests/id:000792,src:000002,op:havoc,rep:8 rename to src/exchange/afl-tests/id:000792,src:000002,op:havoc,rep:8 diff --git a/src/mint/afl-tests/id:000793,src:000002,op:ext_AO,pos:135,+cov b/src/exchange/afl-tests/id:000793,src:000002,op:ext_AO,pos:135,+cov similarity index 100% rename from src/mint/afl-tests/id:000793,src:000002,op:ext_AO,pos:135,+cov rename to src/exchange/afl-tests/id:000793,src:000002,op:ext_AO,pos:135,+cov diff --git a/src/mint/afl-tests/id:000793,src:000002,op:havoc,rep:64 b/src/exchange/afl-tests/id:000793,src:000002,op:havoc,rep:64 similarity index 100% rename from src/mint/afl-tests/id:000793,src:000002,op:havoc,rep:64 rename to src/exchange/afl-tests/id:000793,src:000002,op:havoc,rep:64 diff --git a/src/mint/afl-tests/id:000794,src:000002,op:ext_AO,pos:138,+cov b/src/exchange/afl-tests/id:000794,src:000002,op:ext_AO,pos:138,+cov similarity index 100% rename from src/mint/afl-tests/id:000794,src:000002,op:ext_AO,pos:138,+cov rename to src/exchange/afl-tests/id:000794,src:000002,op:ext_AO,pos:138,+cov diff --git a/src/mint/afl-tests/id:000794,src:000002,op:havoc,rep:64 b/src/exchange/afl-tests/id:000794,src:000002,op:havoc,rep:64 similarity index 100% rename from src/mint/afl-tests/id:000794,src:000002,op:havoc,rep:64 rename to src/exchange/afl-tests/id:000794,src:000002,op:havoc,rep:64 diff --git a/src/mint/afl-tests/id:000795,src:000002,op:havoc,rep:4 b/src/exchange/afl-tests/id:000795,src:000002,op:havoc,rep:4 similarity index 100% rename from src/mint/afl-tests/id:000795,src:000002,op:havoc,rep:4 rename to src/exchange/afl-tests/id:000795,src:000002,op:havoc,rep:4 diff --git a/src/mint/afl-tests/id:000795,src:000002,op:havoc,rep:8 b/src/exchange/afl-tests/id:000795,src:000002,op:havoc,rep:8 similarity index 100% rename from src/mint/afl-tests/id:000795,src:000002,op:havoc,rep:8 rename to src/exchange/afl-tests/id:000795,src:000002,op:havoc,rep:8 diff --git a/src/mint/afl-tests/id:000796,src:000002,op:havoc,rep:16 b/src/exchange/afl-tests/id:000796,src:000002,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000796,src:000002,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000796,src:000002,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000796,src:000002,op:havoc,rep:32,+cov b/src/exchange/afl-tests/id:000796,src:000002,op:havoc,rep:32,+cov similarity index 100% rename from src/mint/afl-tests/id:000796,src:000002,op:havoc,rep:32,+cov rename to src/exchange/afl-tests/id:000796,src:000002,op:havoc,rep:32,+cov diff --git a/src/mint/afl-tests/id:000797,src:000002,op:havoc,rep:16 b/src/exchange/afl-tests/id:000797,src:000002,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000797,src:000002,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000797,src:000002,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000797,src:000002,op:havoc,rep:2 b/src/exchange/afl-tests/id:000797,src:000002,op:havoc,rep:2 similarity index 100% rename from src/mint/afl-tests/id:000797,src:000002,op:havoc,rep:2 rename to src/exchange/afl-tests/id:000797,src:000002,op:havoc,rep:2 diff --git a/src/mint/afl-tests/id:000798,src:000002,op:havoc,rep:16 b/src/exchange/afl-tests/id:000798,src:000002,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000798,src:000002,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000798,src:000002,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000798,src:000002,op:havoc,rep:64 b/src/exchange/afl-tests/id:000798,src:000002,op:havoc,rep:64 similarity index 100% rename from src/mint/afl-tests/id:000798,src:000002,op:havoc,rep:64 rename to src/exchange/afl-tests/id:000798,src:000002,op:havoc,rep:64 diff --git a/src/mint/afl-tests/id:000799,src:000002,op:havoc,rep:16 b/src/exchange/afl-tests/id:000799,src:000002,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000799,src:000002,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000799,src:000002,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000799,src:000002,op:havoc,rep:64 b/src/exchange/afl-tests/id:000799,src:000002,op:havoc,rep:64 similarity index 100% rename from src/mint/afl-tests/id:000799,src:000002,op:havoc,rep:64 rename to src/exchange/afl-tests/id:000799,src:000002,op:havoc,rep:64 diff --git a/src/mint/afl-tests/id:000800,src:000002,op:havoc,rep:4 b/src/exchange/afl-tests/id:000800,src:000002,op:havoc,rep:4 similarity index 100% rename from src/mint/afl-tests/id:000800,src:000002,op:havoc,rep:4 rename to src/exchange/afl-tests/id:000800,src:000002,op:havoc,rep:4 diff --git a/src/mint/afl-tests/id:000801,src:000002,op:havoc,rep:128 b/src/exchange/afl-tests/id:000801,src:000002,op:havoc,rep:128 similarity index 100% rename from src/mint/afl-tests/id:000801,src:000002,op:havoc,rep:128 rename to src/exchange/afl-tests/id:000801,src:000002,op:havoc,rep:128 diff --git a/src/mint/afl-tests/id:000801,src:000002,op:havoc,rep:64 b/src/exchange/afl-tests/id:000801,src:000002,op:havoc,rep:64 similarity index 100% rename from src/mint/afl-tests/id:000801,src:000002,op:havoc,rep:64 rename to src/exchange/afl-tests/id:000801,src:000002,op:havoc,rep:64 diff --git a/src/mint/afl-tests/id:000802,src:000002,op:havoc,rep:16 b/src/exchange/afl-tests/id:000802,src:000002,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000802,src:000002,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000802,src:000002,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000802,src:000002,op:havoc,rep:4 b/src/exchange/afl-tests/id:000802,src:000002,op:havoc,rep:4 similarity index 100% rename from src/mint/afl-tests/id:000802,src:000002,op:havoc,rep:4 rename to src/exchange/afl-tests/id:000802,src:000002,op:havoc,rep:4 diff --git a/src/mint/afl-tests/id:000803,src:000002,op:havoc,rep:128,+cov b/src/exchange/afl-tests/id:000803,src:000002,op:havoc,rep:128,+cov similarity index 100% rename from src/mint/afl-tests/id:000803,src:000002,op:havoc,rep:128,+cov rename to src/exchange/afl-tests/id:000803,src:000002,op:havoc,rep:128,+cov diff --git a/src/mint/afl-tests/id:000803,src:000002,op:havoc,rep:2 b/src/exchange/afl-tests/id:000803,src:000002,op:havoc,rep:2 similarity index 100% rename from src/mint/afl-tests/id:000803,src:000002,op:havoc,rep:2 rename to src/exchange/afl-tests/id:000803,src:000002,op:havoc,rep:2 diff --git a/src/mint/afl-tests/id:000804,src:000002,op:havoc,rep:32 b/src/exchange/afl-tests/id:000804,src:000002,op:havoc,rep:32 similarity index 100% rename from src/mint/afl-tests/id:000804,src:000002,op:havoc,rep:32 rename to src/exchange/afl-tests/id:000804,src:000002,op:havoc,rep:32 diff --git a/src/mint/afl-tests/id:000804,src:000002,op:havoc,rep:64 b/src/exchange/afl-tests/id:000804,src:000002,op:havoc,rep:64 similarity index 100% rename from src/mint/afl-tests/id:000804,src:000002,op:havoc,rep:64 rename to src/exchange/afl-tests/id:000804,src:000002,op:havoc,rep:64 diff --git a/src/mint/afl-tests/id:000805,src:000002,op:havoc,rep:4 b/src/exchange/afl-tests/id:000805,src:000002,op:havoc,rep:4 similarity index 100% rename from src/mint/afl-tests/id:000805,src:000002,op:havoc,rep:4 rename to src/exchange/afl-tests/id:000805,src:000002,op:havoc,rep:4 diff --git a/src/mint/afl-tests/id:000805,src:000003,op:flip1,pos:0,+cov b/src/exchange/afl-tests/id:000805,src:000003,op:flip1,pos:0,+cov similarity index 100% rename from src/mint/afl-tests/id:000805,src:000003,op:flip1,pos:0,+cov rename to src/exchange/afl-tests/id:000805,src:000003,op:flip1,pos:0,+cov diff --git a/src/mint/afl-tests/id:000806,src:000002,op:havoc,rep:32 b/src/exchange/afl-tests/id:000806,src:000002,op:havoc,rep:32 similarity index 100% rename from src/mint/afl-tests/id:000806,src:000002,op:havoc,rep:32 rename to src/exchange/afl-tests/id:000806,src:000002,op:havoc,rep:32 diff --git a/src/mint/afl-tests/id:000806,src:000003,op:flip1,pos:13,+cov b/src/exchange/afl-tests/id:000806,src:000003,op:flip1,pos:13,+cov similarity index 100% rename from src/mint/afl-tests/id:000806,src:000003,op:flip1,pos:13,+cov rename to src/exchange/afl-tests/id:000806,src:000003,op:flip1,pos:13,+cov diff --git a/src/mint/afl-tests/id:000807,src:000002,op:havoc,rep:128 b/src/exchange/afl-tests/id:000807,src:000002,op:havoc,rep:128 similarity index 100% rename from src/mint/afl-tests/id:000807,src:000002,op:havoc,rep:128 rename to src/exchange/afl-tests/id:000807,src:000002,op:havoc,rep:128 diff --git a/src/mint/afl-tests/id:000807,src:000003,op:flip1,pos:18,+cov b/src/exchange/afl-tests/id:000807,src:000003,op:flip1,pos:18,+cov similarity index 100% rename from src/mint/afl-tests/id:000807,src:000003,op:flip1,pos:18,+cov rename to src/exchange/afl-tests/id:000807,src:000003,op:flip1,pos:18,+cov diff --git a/src/mint/afl-tests/id:000808,src:000002,op:havoc,rep:16 b/src/exchange/afl-tests/id:000808,src:000002,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000808,src:000002,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000808,src:000002,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000808,src:000003,op:flip1,pos:27,+cov b/src/exchange/afl-tests/id:000808,src:000003,op:flip1,pos:27,+cov similarity index 100% rename from src/mint/afl-tests/id:000808,src:000003,op:flip1,pos:27,+cov rename to src/exchange/afl-tests/id:000808,src:000003,op:flip1,pos:27,+cov diff --git a/src/mint/afl-tests/id:000809,src:000002,op:havoc,rep:16 b/src/exchange/afl-tests/id:000809,src:000002,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000809,src:000002,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000809,src:000002,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000809,src:000003,op:flip1,pos:27,+cov b/src/exchange/afl-tests/id:000809,src:000003,op:flip1,pos:27,+cov similarity index 100% rename from src/mint/afl-tests/id:000809,src:000003,op:flip1,pos:27,+cov rename to src/exchange/afl-tests/id:000809,src:000003,op:flip1,pos:27,+cov diff --git a/src/mint/afl-tests/id:000810,src:000002,op:havoc,rep:32,+cov b/src/exchange/afl-tests/id:000810,src:000002,op:havoc,rep:32,+cov similarity index 100% rename from src/mint/afl-tests/id:000810,src:000002,op:havoc,rep:32,+cov rename to src/exchange/afl-tests/id:000810,src:000002,op:havoc,rep:32,+cov diff --git a/src/mint/afl-tests/id:000810,src:000003,op:flip1,pos:30,+cov b/src/exchange/afl-tests/id:000810,src:000003,op:flip1,pos:30,+cov similarity index 100% rename from src/mint/afl-tests/id:000810,src:000003,op:flip1,pos:30,+cov rename to src/exchange/afl-tests/id:000810,src:000003,op:flip1,pos:30,+cov diff --git a/src/mint/afl-tests/id:000811,src:000002,op:havoc,rep:2,+cov b/src/exchange/afl-tests/id:000811,src:000002,op:havoc,rep:2,+cov similarity index 100% rename from src/mint/afl-tests/id:000811,src:000002,op:havoc,rep:2,+cov rename to src/exchange/afl-tests/id:000811,src:000002,op:havoc,rep:2,+cov diff --git a/src/mint/afl-tests/id:000811,src:000003,op:flip1,pos:30,+cov b/src/exchange/afl-tests/id:000811,src:000003,op:flip1,pos:30,+cov similarity index 100% rename from src/mint/afl-tests/id:000811,src:000003,op:flip1,pos:30,+cov rename to src/exchange/afl-tests/id:000811,src:000003,op:flip1,pos:30,+cov diff --git a/src/mint/afl-tests/id:000812,src:000002,op:havoc,rep:4,+cov b/src/exchange/afl-tests/id:000812,src:000002,op:havoc,rep:4,+cov similarity index 100% rename from src/mint/afl-tests/id:000812,src:000002,op:havoc,rep:4,+cov rename to src/exchange/afl-tests/id:000812,src:000002,op:havoc,rep:4,+cov diff --git a/src/mint/afl-tests/id:000812,src:000003,op:flip1,pos:32,+cov b/src/exchange/afl-tests/id:000812,src:000003,op:flip1,pos:32,+cov similarity index 100% rename from src/mint/afl-tests/id:000812,src:000003,op:flip1,pos:32,+cov rename to src/exchange/afl-tests/id:000812,src:000003,op:flip1,pos:32,+cov diff --git a/src/mint/afl-tests/id:000813,src:000002,op:havoc,rep:16 b/src/exchange/afl-tests/id:000813,src:000002,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000813,src:000002,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000813,src:000002,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000813,src:000003,op:flip1,pos:34,+cov b/src/exchange/afl-tests/id:000813,src:000003,op:flip1,pos:34,+cov similarity index 100% rename from src/mint/afl-tests/id:000813,src:000003,op:flip1,pos:34,+cov rename to src/exchange/afl-tests/id:000813,src:000003,op:flip1,pos:34,+cov diff --git a/src/mint/afl-tests/id:000814,src:000002,op:havoc,rep:16,+cov b/src/exchange/afl-tests/id:000814,src:000002,op:havoc,rep:16,+cov similarity index 100% rename from src/mint/afl-tests/id:000814,src:000002,op:havoc,rep:16,+cov rename to src/exchange/afl-tests/id:000814,src:000002,op:havoc,rep:16,+cov diff --git a/src/mint/afl-tests/id:000814,src:000003,op:flip1,pos:40,+cov b/src/exchange/afl-tests/id:000814,src:000003,op:flip1,pos:40,+cov similarity index 100% rename from src/mint/afl-tests/id:000814,src:000003,op:flip1,pos:40,+cov rename to src/exchange/afl-tests/id:000814,src:000003,op:flip1,pos:40,+cov diff --git a/src/mint/afl-tests/id:000815,src:000002,op:havoc,rep:16 b/src/exchange/afl-tests/id:000815,src:000002,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000815,src:000002,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000815,src:000002,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000815,src:000003,op:flip1,pos:42,+cov b/src/exchange/afl-tests/id:000815,src:000003,op:flip1,pos:42,+cov similarity index 100% rename from src/mint/afl-tests/id:000815,src:000003,op:flip1,pos:42,+cov rename to src/exchange/afl-tests/id:000815,src:000003,op:flip1,pos:42,+cov diff --git a/src/mint/afl-tests/id:000816,src:000002,op:havoc,rep:16 b/src/exchange/afl-tests/id:000816,src:000002,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000816,src:000002,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000816,src:000002,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000816,src:000003,op:flip1,pos:43,+cov b/src/exchange/afl-tests/id:000816,src:000003,op:flip1,pos:43,+cov similarity index 100% rename from src/mint/afl-tests/id:000816,src:000003,op:flip1,pos:43,+cov rename to src/exchange/afl-tests/id:000816,src:000003,op:flip1,pos:43,+cov diff --git a/src/mint/afl-tests/id:000817,src:000002,op:havoc,rep:16 b/src/exchange/afl-tests/id:000817,src:000002,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000817,src:000002,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000817,src:000002,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000817,src:000003,op:flip1,pos:48,+cov b/src/exchange/afl-tests/id:000817,src:000003,op:flip1,pos:48,+cov similarity index 100% rename from src/mint/afl-tests/id:000817,src:000003,op:flip1,pos:48,+cov rename to src/exchange/afl-tests/id:000817,src:000003,op:flip1,pos:48,+cov diff --git a/src/mint/afl-tests/id:000818,src:000002,op:havoc,rep:16 b/src/exchange/afl-tests/id:000818,src:000002,op:havoc,rep:16 similarity index 100% rename from src/mint/afl-tests/id:000818,src:000002,op:havoc,rep:16 rename to src/exchange/afl-tests/id:000818,src:000002,op:havoc,rep:16 diff --git a/src/mint/afl-tests/id:000818,src:000003,op:flip1,pos:50,+cov b/src/exchange/afl-tests/id:000818,src:000003,op:flip1,pos:50,+cov similarity index 100% rename from src/mint/afl-tests/id:000818,src:000003,op:flip1,pos:50,+cov rename to src/exchange/afl-tests/id:000818,src:000003,op:flip1,pos:50,+cov diff --git a/src/mint/afl-tests/id:000819,src:000002,op:havoc,rep:16,+cov b/src/exchange/afl-tests/id:000819,src:000002,op:havoc,rep:16,+cov similarity index 100% rename from src/mint/afl-tests/id:000819,src:000002,op:havoc,rep:16,+cov rename to src/exchange/afl-tests/id:000819,src:000002,op:havoc,rep:16,+cov diff --git a/src/mint/afl-tests/id:000819,src:000003,op:flip1,pos:61,+cov b/src/exchange/afl-tests/id:000819,src:000003,op:flip1,pos:61,+cov similarity index 100% rename from src/mint/afl-tests/id:000819,src:000003,op:flip1,pos:61,+cov rename to src/exchange/afl-tests/id:000819,src:000003,op:flip1,pos:61,+cov diff --git a/src/mint/afl-tests/id:000820,src:000002,op:havoc,rep:2 b/src/exchange/afl-tests/id:000820,src:000002,op:havoc,rep:2 similarity index 100% rename from src/mint/afl-tests/id:000820,src:000002,op:havoc,rep:2 rename to src/exchange/afl-tests/id:000820,src:000002,op:havoc,rep:2 diff --git a/src/mint/afl-tests/id:000820,src:000003,op:flip1,pos:67,+cov b/src/exchange/afl-tests/id:000820,src:000003,op:flip1,pos:67,+cov similarity index 100% rename from src/mint/afl-tests/id:000820,src:000003,op:flip1,pos:67,+cov rename to src/exchange/afl-tests/id:000820,src:000003,op:flip1,pos:67,+cov diff --git a/src/mint/afl-tests/id:000821,src:000003,op:flip1,pos:18,+cov b/src/exchange/afl-tests/id:000821,src:000003,op:flip1,pos:18,+cov similarity index 100% rename from src/mint/afl-tests/id:000821,src:000003,op:flip1,pos:18,+cov rename to src/exchange/afl-tests/id:000821,src:000003,op:flip1,pos:18,+cov diff --git a/src/mint/afl-tests/id:000821,src:000003,op:flip1,pos:70 b/src/exchange/afl-tests/id:000821,src:000003,op:flip1,pos:70 similarity index 100% rename from src/mint/afl-tests/id:000821,src:000003,op:flip1,pos:70 rename to src/exchange/afl-tests/id:000821,src:000003,op:flip1,pos:70 diff --git a/src/mint/afl-tests/id:000822,src:000003,op:flip1,pos:27,+cov b/src/exchange/afl-tests/id:000822,src:000003,op:flip1,pos:27,+cov similarity index 100% rename from src/mint/afl-tests/id:000822,src:000003,op:flip1,pos:27,+cov rename to src/exchange/afl-tests/id:000822,src:000003,op:flip1,pos:27,+cov diff --git a/src/mint/afl-tests/id:000822,src:000003,op:flip1,pos:73,+cov b/src/exchange/afl-tests/id:000822,src:000003,op:flip1,pos:73,+cov similarity index 100% rename from src/mint/afl-tests/id:000822,src:000003,op:flip1,pos:73,+cov rename to src/exchange/afl-tests/id:000822,src:000003,op:flip1,pos:73,+cov diff --git a/src/mint/afl-tests/id:000823,src:000003,op:flip1,pos:27,+cov b/src/exchange/afl-tests/id:000823,src:000003,op:flip1,pos:27,+cov similarity index 100% rename from src/mint/afl-tests/id:000823,src:000003,op:flip1,pos:27,+cov rename to src/exchange/afl-tests/id:000823,src:000003,op:flip1,pos:27,+cov diff --git a/src/mint/afl-tests/id:000823,src:000003,op:flip1,pos:77,+cov b/src/exchange/afl-tests/id:000823,src:000003,op:flip1,pos:77,+cov similarity index 100% rename from src/mint/afl-tests/id:000823,src:000003,op:flip1,pos:77,+cov rename to src/exchange/afl-tests/id:000823,src:000003,op:flip1,pos:77,+cov diff --git a/src/mint/afl-tests/id:000824,src:000003,op:flip1,pos:27,+cov b/src/exchange/afl-tests/id:000824,src:000003,op:flip1,pos:27,+cov similarity index 100% rename from src/mint/afl-tests/id:000824,src:000003,op:flip1,pos:27,+cov rename to src/exchange/afl-tests/id:000824,src:000003,op:flip1,pos:27,+cov diff --git a/src/mint/afl-tests/id:000824,src:000003,op:flip1,pos:83,+cov b/src/exchange/afl-tests/id:000824,src:000003,op:flip1,pos:83,+cov similarity index 100% rename from src/mint/afl-tests/id:000824,src:000003,op:flip1,pos:83,+cov rename to src/exchange/afl-tests/id:000824,src:000003,op:flip1,pos:83,+cov diff --git a/src/mint/afl-tests/id:000825,src:000003,op:flip1,pos:28,+cov b/src/exchange/afl-tests/id:000825,src:000003,op:flip1,pos:28,+cov similarity index 100% rename from src/mint/afl-tests/id:000825,src:000003,op:flip1,pos:28,+cov rename to src/exchange/afl-tests/id:000825,src:000003,op:flip1,pos:28,+cov diff --git a/src/mint/afl-tests/id:000825,src:000003,op:flip1,pos:85,+cov b/src/exchange/afl-tests/id:000825,src:000003,op:flip1,pos:85,+cov similarity index 100% rename from src/mint/afl-tests/id:000825,src:000003,op:flip1,pos:85,+cov rename to src/exchange/afl-tests/id:000825,src:000003,op:flip1,pos:85,+cov diff --git a/src/mint/afl-tests/id:000826,src:000003,op:flip1,pos:28,+cov b/src/exchange/afl-tests/id:000826,src:000003,op:flip1,pos:28,+cov similarity index 100% rename from src/mint/afl-tests/id:000826,src:000003,op:flip1,pos:28,+cov rename to src/exchange/afl-tests/id:000826,src:000003,op:flip1,pos:28,+cov diff --git a/src/mint/afl-tests/id:000826,src:000003,op:flip1,pos:85,+cov b/src/exchange/afl-tests/id:000826,src:000003,op:flip1,pos:85,+cov similarity index 100% rename from src/mint/afl-tests/id:000826,src:000003,op:flip1,pos:85,+cov rename to src/exchange/afl-tests/id:000826,src:000003,op:flip1,pos:85,+cov diff --git a/src/mint/afl-tests/id:000827,src:000003,op:flip1,pos:29,+cov b/src/exchange/afl-tests/id:000827,src:000003,op:flip1,pos:29,+cov similarity index 100% rename from src/mint/afl-tests/id:000827,src:000003,op:flip1,pos:29,+cov rename to src/exchange/afl-tests/id:000827,src:000003,op:flip1,pos:29,+cov diff --git a/src/mint/afl-tests/id:000827,src:000003,op:flip1,pos:88,+cov b/src/exchange/afl-tests/id:000827,src:000003,op:flip1,pos:88,+cov similarity index 100% rename from src/mint/afl-tests/id:000827,src:000003,op:flip1,pos:88,+cov rename to src/exchange/afl-tests/id:000827,src:000003,op:flip1,pos:88,+cov diff --git a/src/mint/afl-tests/id:000828,src:000003,op:flip1,pos:29,+cov b/src/exchange/afl-tests/id:000828,src:000003,op:flip1,pos:29,+cov similarity index 100% rename from src/mint/afl-tests/id:000828,src:000003,op:flip1,pos:29,+cov rename to src/exchange/afl-tests/id:000828,src:000003,op:flip1,pos:29,+cov diff --git a/src/mint/afl-tests/id:000828,src:000003,op:flip1,pos:89 b/src/exchange/afl-tests/id:000828,src:000003,op:flip1,pos:89 similarity index 100% rename from src/mint/afl-tests/id:000828,src:000003,op:flip1,pos:89 rename to src/exchange/afl-tests/id:000828,src:000003,op:flip1,pos:89 diff --git a/src/mint/afl-tests/id:000829,src:000003,op:flip1,pos:29,+cov b/src/exchange/afl-tests/id:000829,src:000003,op:flip1,pos:29,+cov similarity index 100% rename from src/mint/afl-tests/id:000829,src:000003,op:flip1,pos:29,+cov rename to src/exchange/afl-tests/id:000829,src:000003,op:flip1,pos:29,+cov diff --git a/src/mint/afl-tests/id:000829,src:000003,op:flip1,pos:91,+cov b/src/exchange/afl-tests/id:000829,src:000003,op:flip1,pos:91,+cov similarity index 100% rename from src/mint/afl-tests/id:000829,src:000003,op:flip1,pos:91,+cov rename to src/exchange/afl-tests/id:000829,src:000003,op:flip1,pos:91,+cov diff --git a/src/mint/afl-tests/id:000830,src:000003,op:flip1,pos:30,+cov b/src/exchange/afl-tests/id:000830,src:000003,op:flip1,pos:30,+cov similarity index 100% rename from src/mint/afl-tests/id:000830,src:000003,op:flip1,pos:30,+cov rename to src/exchange/afl-tests/id:000830,src:000003,op:flip1,pos:30,+cov diff --git a/src/mint/afl-tests/id:000830,src:000003,op:flip1,pos:93,+cov b/src/exchange/afl-tests/id:000830,src:000003,op:flip1,pos:93,+cov similarity index 100% rename from src/mint/afl-tests/id:000830,src:000003,op:flip1,pos:93,+cov rename to src/exchange/afl-tests/id:000830,src:000003,op:flip1,pos:93,+cov diff --git a/src/mint/afl-tests/id:000831,src:000003,op:flip1,pos:32,+cov b/src/exchange/afl-tests/id:000831,src:000003,op:flip1,pos:32,+cov similarity index 100% rename from src/mint/afl-tests/id:000831,src:000003,op:flip1,pos:32,+cov rename to src/exchange/afl-tests/id:000831,src:000003,op:flip1,pos:32,+cov diff --git a/src/mint/afl-tests/id:000831,src:000003,op:flip1,pos:93,+cov b/src/exchange/afl-tests/id:000831,src:000003,op:flip1,pos:93,+cov similarity index 100% rename from src/mint/afl-tests/id:000831,src:000003,op:flip1,pos:93,+cov rename to src/exchange/afl-tests/id:000831,src:000003,op:flip1,pos:93,+cov diff --git a/src/mint/afl-tests/id:000832,src:000003,op:flip1,pos:34,+cov b/src/exchange/afl-tests/id:000832,src:000003,op:flip1,pos:34,+cov similarity index 100% rename from src/mint/afl-tests/id:000832,src:000003,op:flip1,pos:34,+cov rename to src/exchange/afl-tests/id:000832,src:000003,op:flip1,pos:34,+cov diff --git a/src/mint/afl-tests/id:000832,src:000003,op:flip1,pos:97,+cov b/src/exchange/afl-tests/id:000832,src:000003,op:flip1,pos:97,+cov similarity index 100% rename from src/mint/afl-tests/id:000832,src:000003,op:flip1,pos:97,+cov rename to src/exchange/afl-tests/id:000832,src:000003,op:flip1,pos:97,+cov diff --git a/src/mint/afl-tests/id:000833,src:000003,op:flip1,pos:109,+cov b/src/exchange/afl-tests/id:000833,src:000003,op:flip1,pos:109,+cov similarity index 100% rename from src/mint/afl-tests/id:000833,src:000003,op:flip1,pos:109,+cov rename to src/exchange/afl-tests/id:000833,src:000003,op:flip1,pos:109,+cov diff --git a/src/mint/afl-tests/id:000833,src:000003,op:flip1,pos:36,+cov b/src/exchange/afl-tests/id:000833,src:000003,op:flip1,pos:36,+cov similarity index 100% rename from src/mint/afl-tests/id:000833,src:000003,op:flip1,pos:36,+cov rename to src/exchange/afl-tests/id:000833,src:000003,op:flip1,pos:36,+cov diff --git a/src/mint/afl-tests/id:000834,src:000003,op:flip1,pos:111,+cov b/src/exchange/afl-tests/id:000834,src:000003,op:flip1,pos:111,+cov similarity index 100% rename from src/mint/afl-tests/id:000834,src:000003,op:flip1,pos:111,+cov rename to src/exchange/afl-tests/id:000834,src:000003,op:flip1,pos:111,+cov diff --git a/src/mint/afl-tests/id:000834,src:000003,op:flip1,pos:39 b/src/exchange/afl-tests/id:000834,src:000003,op:flip1,pos:39 similarity index 100% rename from src/mint/afl-tests/id:000834,src:000003,op:flip1,pos:39 rename to src/exchange/afl-tests/id:000834,src:000003,op:flip1,pos:39 diff --git a/src/mint/afl-tests/id:000835,src:000003,op:flip1,pos:113,+cov b/src/exchange/afl-tests/id:000835,src:000003,op:flip1,pos:113,+cov similarity index 100% rename from src/mint/afl-tests/id:000835,src:000003,op:flip1,pos:113,+cov rename to src/exchange/afl-tests/id:000835,src:000003,op:flip1,pos:113,+cov diff --git a/src/mint/afl-tests/id:000835,src:000003,op:flip1,pos:39,+cov b/src/exchange/afl-tests/id:000835,src:000003,op:flip1,pos:39,+cov similarity index 100% rename from src/mint/afl-tests/id:000835,src:000003,op:flip1,pos:39,+cov rename to src/exchange/afl-tests/id:000835,src:000003,op:flip1,pos:39,+cov diff --git a/src/mint/afl-tests/id:000836,src:000003,op:flip1,pos:114,+cov b/src/exchange/afl-tests/id:000836,src:000003,op:flip1,pos:114,+cov similarity index 100% rename from src/mint/afl-tests/id:000836,src:000003,op:flip1,pos:114,+cov rename to src/exchange/afl-tests/id:000836,src:000003,op:flip1,pos:114,+cov diff --git a/src/mint/afl-tests/id:000836,src:000003,op:flip1,pos:40,+cov b/src/exchange/afl-tests/id:000836,src:000003,op:flip1,pos:40,+cov similarity index 100% rename from src/mint/afl-tests/id:000836,src:000003,op:flip1,pos:40,+cov rename to src/exchange/afl-tests/id:000836,src:000003,op:flip1,pos:40,+cov diff --git a/src/mint/afl-tests/id:000837,src:000003,op:flip1,pos:119,+cov b/src/exchange/afl-tests/id:000837,src:000003,op:flip1,pos:119,+cov similarity index 100% rename from src/mint/afl-tests/id:000837,src:000003,op:flip1,pos:119,+cov rename to src/exchange/afl-tests/id:000837,src:000003,op:flip1,pos:119,+cov diff --git a/src/mint/afl-tests/id:000837,src:000003,op:flip1,pos:41,+cov b/src/exchange/afl-tests/id:000837,src:000003,op:flip1,pos:41,+cov similarity index 100% rename from src/mint/afl-tests/id:000837,src:000003,op:flip1,pos:41,+cov rename to src/exchange/afl-tests/id:000837,src:000003,op:flip1,pos:41,+cov diff --git a/src/mint/afl-tests/id:000838,src:000003,op:flip1,pos:120,+cov b/src/exchange/afl-tests/id:000838,src:000003,op:flip1,pos:120,+cov similarity index 100% rename from src/mint/afl-tests/id:000838,src:000003,op:flip1,pos:120,+cov rename to src/exchange/afl-tests/id:000838,src:000003,op:flip1,pos:120,+cov diff --git a/src/mint/afl-tests/id:000838,src:000003,op:flip1,pos:44,+cov b/src/exchange/afl-tests/id:000838,src:000003,op:flip1,pos:44,+cov similarity index 100% rename from src/mint/afl-tests/id:000838,src:000003,op:flip1,pos:44,+cov rename to src/exchange/afl-tests/id:000838,src:000003,op:flip1,pos:44,+cov diff --git a/src/mint/afl-tests/id:000839,src:000003,op:flip1,pos:128,+cov b/src/exchange/afl-tests/id:000839,src:000003,op:flip1,pos:128,+cov similarity index 100% rename from src/mint/afl-tests/id:000839,src:000003,op:flip1,pos:128,+cov rename to src/exchange/afl-tests/id:000839,src:000003,op:flip1,pos:128,+cov diff --git a/src/mint/afl-tests/id:000839,src:000003,op:flip1,pos:46,+cov b/src/exchange/afl-tests/id:000839,src:000003,op:flip1,pos:46,+cov similarity index 100% rename from src/mint/afl-tests/id:000839,src:000003,op:flip1,pos:46,+cov rename to src/exchange/afl-tests/id:000839,src:000003,op:flip1,pos:46,+cov diff --git a/src/mint/afl-tests/id:000840,src:000003,op:flip1,pos:141,+cov b/src/exchange/afl-tests/id:000840,src:000003,op:flip1,pos:141,+cov similarity index 100% rename from src/mint/afl-tests/id:000840,src:000003,op:flip1,pos:141,+cov rename to src/exchange/afl-tests/id:000840,src:000003,op:flip1,pos:141,+cov diff --git a/src/mint/afl-tests/id:000840,src:000003,op:flip1,pos:48,+cov b/src/exchange/afl-tests/id:000840,src:000003,op:flip1,pos:48,+cov similarity index 100% rename from src/mint/afl-tests/id:000840,src:000003,op:flip1,pos:48,+cov rename to src/exchange/afl-tests/id:000840,src:000003,op:flip1,pos:48,+cov diff --git a/src/mint/afl-tests/id:000841,src:000003,op:flip1,pos:145,+cov b/src/exchange/afl-tests/id:000841,src:000003,op:flip1,pos:145,+cov similarity index 100% rename from src/mint/afl-tests/id:000841,src:000003,op:flip1,pos:145,+cov rename to src/exchange/afl-tests/id:000841,src:000003,op:flip1,pos:145,+cov diff --git a/src/mint/afl-tests/id:000841,src:000003,op:flip1,pos:48,+cov b/src/exchange/afl-tests/id:000841,src:000003,op:flip1,pos:48,+cov similarity index 100% rename from src/mint/afl-tests/id:000841,src:000003,op:flip1,pos:48,+cov rename to src/exchange/afl-tests/id:000841,src:000003,op:flip1,pos:48,+cov diff --git a/src/mint/afl-tests/id:000842,src:000003,op:flip1,pos:147,+cov b/src/exchange/afl-tests/id:000842,src:000003,op:flip1,pos:147,+cov similarity index 100% rename from src/mint/afl-tests/id:000842,src:000003,op:flip1,pos:147,+cov rename to src/exchange/afl-tests/id:000842,src:000003,op:flip1,pos:147,+cov diff --git a/src/mint/afl-tests/id:000842,src:000003,op:flip1,pos:51 b/src/exchange/afl-tests/id:000842,src:000003,op:flip1,pos:51 similarity index 100% rename from src/mint/afl-tests/id:000842,src:000003,op:flip1,pos:51 rename to src/exchange/afl-tests/id:000842,src:000003,op:flip1,pos:51 diff --git a/src/mint/afl-tests/id:000843,src:000003,op:flip1,pos:150,+cov b/src/exchange/afl-tests/id:000843,src:000003,op:flip1,pos:150,+cov similarity index 100% rename from src/mint/afl-tests/id:000843,src:000003,op:flip1,pos:150,+cov rename to src/exchange/afl-tests/id:000843,src:000003,op:flip1,pos:150,+cov diff --git a/src/mint/afl-tests/id:000843,src:000003,op:flip1,pos:51,+cov b/src/exchange/afl-tests/id:000843,src:000003,op:flip1,pos:51,+cov similarity index 100% rename from src/mint/afl-tests/id:000843,src:000003,op:flip1,pos:51,+cov rename to src/exchange/afl-tests/id:000843,src:000003,op:flip1,pos:51,+cov diff --git a/src/mint/afl-tests/id:000844,src:000003,op:flip1,pos:150,+cov b/src/exchange/afl-tests/id:000844,src:000003,op:flip1,pos:150,+cov similarity index 100% rename from src/mint/afl-tests/id:000844,src:000003,op:flip1,pos:150,+cov rename to src/exchange/afl-tests/id:000844,src:000003,op:flip1,pos:150,+cov diff --git a/src/mint/afl-tests/id:000844,src:000003,op:flip1,pos:54,+cov b/src/exchange/afl-tests/id:000844,src:000003,op:flip1,pos:54,+cov similarity index 100% rename from src/mint/afl-tests/id:000844,src:000003,op:flip1,pos:54,+cov rename to src/exchange/afl-tests/id:000844,src:000003,op:flip1,pos:54,+cov diff --git a/src/mint/afl-tests/id:000845,src:000003,op:flip1,pos:58,+cov b/src/exchange/afl-tests/id:000845,src:000003,op:flip1,pos:58,+cov similarity index 100% rename from src/mint/afl-tests/id:000845,src:000003,op:flip1,pos:58,+cov rename to src/exchange/afl-tests/id:000845,src:000003,op:flip1,pos:58,+cov diff --git a/src/mint/afl-tests/id:000845,src:000003,op:flip2,pos:65,+cov b/src/exchange/afl-tests/id:000845,src:000003,op:flip2,pos:65,+cov similarity index 100% rename from src/mint/afl-tests/id:000845,src:000003,op:flip2,pos:65,+cov rename to src/exchange/afl-tests/id:000845,src:000003,op:flip2,pos:65,+cov diff --git a/src/mint/afl-tests/id:000846,src:000003,op:flip1,pos:64,+cov b/src/exchange/afl-tests/id:000846,src:000003,op:flip1,pos:64,+cov similarity index 100% rename from src/mint/afl-tests/id:000846,src:000003,op:flip1,pos:64,+cov rename to src/exchange/afl-tests/id:000846,src:000003,op:flip1,pos:64,+cov diff --git a/src/mint/afl-tests/id:000846,src:000003,op:flip2,pos:84,+cov b/src/exchange/afl-tests/id:000846,src:000003,op:flip2,pos:84,+cov similarity index 100% rename from src/mint/afl-tests/id:000846,src:000003,op:flip2,pos:84,+cov rename to src/exchange/afl-tests/id:000846,src:000003,op:flip2,pos:84,+cov diff --git a/src/mint/afl-tests/id:000847,src:000003,op:flip1,pos:64,+cov b/src/exchange/afl-tests/id:000847,src:000003,op:flip1,pos:64,+cov similarity index 100% rename from src/mint/afl-tests/id:000847,src:000003,op:flip1,pos:64,+cov rename to src/exchange/afl-tests/id:000847,src:000003,op:flip1,pos:64,+cov diff --git a/src/mint/afl-tests/id:000847,src:000003,op:flip2,pos:99,+cov b/src/exchange/afl-tests/id:000847,src:000003,op:flip2,pos:99,+cov similarity index 100% rename from src/mint/afl-tests/id:000847,src:000003,op:flip2,pos:99,+cov rename to src/exchange/afl-tests/id:000847,src:000003,op:flip2,pos:99,+cov diff --git a/src/mint/afl-tests/id:000848,src:000003,op:flip1,pos:66,+cov b/src/exchange/afl-tests/id:000848,src:000003,op:flip1,pos:66,+cov similarity index 100% rename from src/mint/afl-tests/id:000848,src:000003,op:flip1,pos:66,+cov rename to src/exchange/afl-tests/id:000848,src:000003,op:flip1,pos:66,+cov diff --git a/src/mint/afl-tests/id:000848,src:000003,op:flip2,pos:102,+cov b/src/exchange/afl-tests/id:000848,src:000003,op:flip2,pos:102,+cov similarity index 100% rename from src/mint/afl-tests/id:000848,src:000003,op:flip2,pos:102,+cov rename to src/exchange/afl-tests/id:000848,src:000003,op:flip2,pos:102,+cov diff --git a/src/mint/afl-tests/id:000849,src:000003,op:flip1,pos:67,+cov b/src/exchange/afl-tests/id:000849,src:000003,op:flip1,pos:67,+cov similarity index 100% rename from src/mint/afl-tests/id:000849,src:000003,op:flip1,pos:67,+cov rename to src/exchange/afl-tests/id:000849,src:000003,op:flip1,pos:67,+cov diff --git a/src/mint/afl-tests/id:000849,src:000003,op:flip2,pos:115,+cov b/src/exchange/afl-tests/id:000849,src:000003,op:flip2,pos:115,+cov similarity index 100% rename from src/mint/afl-tests/id:000849,src:000003,op:flip2,pos:115,+cov rename to src/exchange/afl-tests/id:000849,src:000003,op:flip2,pos:115,+cov diff --git a/src/mint/afl-tests/id:000850,src:000003,op:flip1,pos:67,+cov b/src/exchange/afl-tests/id:000850,src:000003,op:flip1,pos:67,+cov similarity index 100% rename from src/mint/afl-tests/id:000850,src:000003,op:flip1,pos:67,+cov rename to src/exchange/afl-tests/id:000850,src:000003,op:flip1,pos:67,+cov diff --git a/src/mint/afl-tests/id:000850,src:000003,op:flip2,pos:132,+cov b/src/exchange/afl-tests/id:000850,src:000003,op:flip2,pos:132,+cov similarity index 100% rename from src/mint/afl-tests/id:000850,src:000003,op:flip2,pos:132,+cov rename to src/exchange/afl-tests/id:000850,src:000003,op:flip2,pos:132,+cov diff --git a/src/mint/afl-tests/id:000851,src:000003,op:flip1,pos:74,+cov b/src/exchange/afl-tests/id:000851,src:000003,op:flip1,pos:74,+cov similarity index 100% rename from src/mint/afl-tests/id:000851,src:000003,op:flip1,pos:74,+cov rename to src/exchange/afl-tests/id:000851,src:000003,op:flip1,pos:74,+cov diff --git a/src/mint/afl-tests/id:000851,src:000003,op:flip2,pos:133,+cov b/src/exchange/afl-tests/id:000851,src:000003,op:flip2,pos:133,+cov similarity index 100% rename from src/mint/afl-tests/id:000851,src:000003,op:flip2,pos:133,+cov rename to src/exchange/afl-tests/id:000851,src:000003,op:flip2,pos:133,+cov diff --git a/src/mint/afl-tests/id:000852,src:000003,op:flip1,pos:76,+cov b/src/exchange/afl-tests/id:000852,src:000003,op:flip1,pos:76,+cov similarity index 100% rename from src/mint/afl-tests/id:000852,src:000003,op:flip1,pos:76,+cov rename to src/exchange/afl-tests/id:000852,src:000003,op:flip1,pos:76,+cov diff --git a/src/mint/afl-tests/id:000852,src:000003,op:flip2,pos:139,+cov b/src/exchange/afl-tests/id:000852,src:000003,op:flip2,pos:139,+cov similarity index 100% rename from src/mint/afl-tests/id:000852,src:000003,op:flip2,pos:139,+cov rename to src/exchange/afl-tests/id:000852,src:000003,op:flip2,pos:139,+cov diff --git a/src/mint/afl-tests/id:000853,src:000003,op:flip1,pos:78,+cov b/src/exchange/afl-tests/id:000853,src:000003,op:flip1,pos:78,+cov similarity index 100% rename from src/mint/afl-tests/id:000853,src:000003,op:flip1,pos:78,+cov rename to src/exchange/afl-tests/id:000853,src:000003,op:flip1,pos:78,+cov diff --git a/src/mint/afl-tests/id:000853,src:000003,op:flip2,pos:139,+cov b/src/exchange/afl-tests/id:000853,src:000003,op:flip2,pos:139,+cov similarity index 100% rename from src/mint/afl-tests/id:000853,src:000003,op:flip2,pos:139,+cov rename to src/exchange/afl-tests/id:000853,src:000003,op:flip2,pos:139,+cov diff --git a/src/mint/afl-tests/id:000854,src:000003,op:flip2,pos:145,+cov b/src/exchange/afl-tests/id:000854,src:000003,op:flip2,pos:145,+cov similarity index 100% rename from src/mint/afl-tests/id:000854,src:000003,op:flip2,pos:145,+cov rename to src/exchange/afl-tests/id:000854,src:000003,op:flip2,pos:145,+cov diff --git a/src/mint/afl-tests/id:000854,src:000003,op:flip2,pos:28,+cov b/src/exchange/afl-tests/id:000854,src:000003,op:flip2,pos:28,+cov similarity index 100% rename from src/mint/afl-tests/id:000854,src:000003,op:flip2,pos:28,+cov rename to src/exchange/afl-tests/id:000854,src:000003,op:flip2,pos:28,+cov diff --git a/src/mint/afl-tests/id:000855,src:000003,op:flip2,pos:147,+cov b/src/exchange/afl-tests/id:000855,src:000003,op:flip2,pos:147,+cov similarity index 100% rename from src/mint/afl-tests/id:000855,src:000003,op:flip2,pos:147,+cov rename to src/exchange/afl-tests/id:000855,src:000003,op:flip2,pos:147,+cov diff --git a/src/mint/afl-tests/id:000855,src:000003,op:flip2,pos:29,+cov b/src/exchange/afl-tests/id:000855,src:000003,op:flip2,pos:29,+cov similarity index 100% rename from src/mint/afl-tests/id:000855,src:000003,op:flip2,pos:29,+cov rename to src/exchange/afl-tests/id:000855,src:000003,op:flip2,pos:29,+cov diff --git a/src/mint/afl-tests/id:000856,src:000003,op:flip2,pos:151,+cov b/src/exchange/afl-tests/id:000856,src:000003,op:flip2,pos:151,+cov similarity index 100% rename from src/mint/afl-tests/id:000856,src:000003,op:flip2,pos:151,+cov rename to src/exchange/afl-tests/id:000856,src:000003,op:flip2,pos:151,+cov diff --git a/src/mint/afl-tests/id:000856,src:000003,op:flip2,pos:29,+cov b/src/exchange/afl-tests/id:000856,src:000003,op:flip2,pos:29,+cov similarity index 100% rename from src/mint/afl-tests/id:000856,src:000003,op:flip2,pos:29,+cov rename to src/exchange/afl-tests/id:000856,src:000003,op:flip2,pos:29,+cov diff --git a/src/mint/afl-tests/id:000857,src:000003,op:flip2,pos:30,+cov b/src/exchange/afl-tests/id:000857,src:000003,op:flip2,pos:30,+cov similarity index 100% rename from src/mint/afl-tests/id:000857,src:000003,op:flip2,pos:30,+cov rename to src/exchange/afl-tests/id:000857,src:000003,op:flip2,pos:30,+cov diff --git a/src/mint/afl-tests/id:000857,src:000003,op:flip4,pos:110,+cov b/src/exchange/afl-tests/id:000857,src:000003,op:flip4,pos:110,+cov similarity index 100% rename from src/mint/afl-tests/id:000857,src:000003,op:flip4,pos:110,+cov rename to src/exchange/afl-tests/id:000857,src:000003,op:flip4,pos:110,+cov diff --git a/src/mint/afl-tests/id:000858,src:000003,op:flip2,pos:35 b/src/exchange/afl-tests/id:000858,src:000003,op:flip2,pos:35 similarity index 100% rename from src/mint/afl-tests/id:000858,src:000003,op:flip2,pos:35 rename to src/exchange/afl-tests/id:000858,src:000003,op:flip2,pos:35 diff --git a/src/mint/afl-tests/id:000858,src:000003,op:flip4,pos:120,+cov b/src/exchange/afl-tests/id:000858,src:000003,op:flip4,pos:120,+cov similarity index 100% rename from src/mint/afl-tests/id:000858,src:000003,op:flip4,pos:120,+cov rename to src/exchange/afl-tests/id:000858,src:000003,op:flip4,pos:120,+cov diff --git a/src/mint/afl-tests/id:000859,src:000003,op:flip2,pos:37,+cov b/src/exchange/afl-tests/id:000859,src:000003,op:flip2,pos:37,+cov similarity index 100% rename from src/mint/afl-tests/id:000859,src:000003,op:flip2,pos:37,+cov rename to src/exchange/afl-tests/id:000859,src:000003,op:flip2,pos:37,+cov diff --git a/src/mint/afl-tests/id:000859,src:000003,op:flip4,pos:123,+cov b/src/exchange/afl-tests/id:000859,src:000003,op:flip4,pos:123,+cov similarity index 100% rename from src/mint/afl-tests/id:000859,src:000003,op:flip4,pos:123,+cov rename to src/exchange/afl-tests/id:000859,src:000003,op:flip4,pos:123,+cov diff --git a/src/mint/afl-tests/id:000860,src:000003,op:flip2,pos:41,+cov b/src/exchange/afl-tests/id:000860,src:000003,op:flip2,pos:41,+cov similarity index 100% rename from src/mint/afl-tests/id:000860,src:000003,op:flip2,pos:41,+cov rename to src/exchange/afl-tests/id:000860,src:000003,op:flip2,pos:41,+cov diff --git a/src/mint/afl-tests/id:000860,src:000003,op:flip4,pos:124,+cov b/src/exchange/afl-tests/id:000860,src:000003,op:flip4,pos:124,+cov similarity index 100% rename from src/mint/afl-tests/id:000860,src:000003,op:flip4,pos:124,+cov rename to src/exchange/afl-tests/id:000860,src:000003,op:flip4,pos:124,+cov diff --git a/src/mint/afl-tests/id:000861,src:000003,op:flip2,pos:42,+cov b/src/exchange/afl-tests/id:000861,src:000003,op:flip2,pos:42,+cov similarity index 100% rename from src/mint/afl-tests/id:000861,src:000003,op:flip2,pos:42,+cov rename to src/exchange/afl-tests/id:000861,src:000003,op:flip2,pos:42,+cov diff --git a/src/mint/afl-tests/id:000861,src:000003,op:flip4,pos:124,+cov b/src/exchange/afl-tests/id:000861,src:000003,op:flip4,pos:124,+cov similarity index 100% rename from src/mint/afl-tests/id:000861,src:000003,op:flip4,pos:124,+cov rename to src/exchange/afl-tests/id:000861,src:000003,op:flip4,pos:124,+cov diff --git a/src/mint/afl-tests/id:000862,src:000003,op:flip2,pos:43,+cov b/src/exchange/afl-tests/id:000862,src:000003,op:flip2,pos:43,+cov similarity index 100% rename from src/mint/afl-tests/id:000862,src:000003,op:flip2,pos:43,+cov rename to src/exchange/afl-tests/id:000862,src:000003,op:flip2,pos:43,+cov diff --git a/src/mint/afl-tests/id:000862,src:000003,op:flip4,pos:124,+cov b/src/exchange/afl-tests/id:000862,src:000003,op:flip4,pos:124,+cov similarity index 100% rename from src/mint/afl-tests/id:000862,src:000003,op:flip4,pos:124,+cov rename to src/exchange/afl-tests/id:000862,src:000003,op:flip4,pos:124,+cov diff --git a/src/mint/afl-tests/id:000863,src:000003,op:flip2,pos:43,+cov b/src/exchange/afl-tests/id:000863,src:000003,op:flip2,pos:43,+cov similarity index 100% rename from src/mint/afl-tests/id:000863,src:000003,op:flip2,pos:43,+cov rename to src/exchange/afl-tests/id:000863,src:000003,op:flip2,pos:43,+cov diff --git a/src/mint/afl-tests/id:000863,src:000003,op:flip4,pos:129,+cov b/src/exchange/afl-tests/id:000863,src:000003,op:flip4,pos:129,+cov similarity index 100% rename from src/mint/afl-tests/id:000863,src:000003,op:flip4,pos:129,+cov rename to src/exchange/afl-tests/id:000863,src:000003,op:flip4,pos:129,+cov diff --git a/src/mint/afl-tests/id:000864,src:000003,op:flip2,pos:43 b/src/exchange/afl-tests/id:000864,src:000003,op:flip2,pos:43 similarity index 100% rename from src/mint/afl-tests/id:000864,src:000003,op:flip2,pos:43 rename to src/exchange/afl-tests/id:000864,src:000003,op:flip2,pos:43 diff --git a/src/mint/afl-tests/id:000864,src:000003,op:flip4,pos:138,+cov b/src/exchange/afl-tests/id:000864,src:000003,op:flip4,pos:138,+cov similarity index 100% rename from src/mint/afl-tests/id:000864,src:000003,op:flip4,pos:138,+cov rename to src/exchange/afl-tests/id:000864,src:000003,op:flip4,pos:138,+cov diff --git a/src/mint/afl-tests/id:000865,src:000003,op:flip2,pos:45,+cov b/src/exchange/afl-tests/id:000865,src:000003,op:flip2,pos:45,+cov similarity index 100% rename from src/mint/afl-tests/id:000865,src:000003,op:flip2,pos:45,+cov rename to src/exchange/afl-tests/id:000865,src:000003,op:flip2,pos:45,+cov diff --git a/src/mint/afl-tests/id:000865,src:000003,op:flip8,pos:118,+cov b/src/exchange/afl-tests/id:000865,src:000003,op:flip8,pos:118,+cov similarity index 100% rename from src/mint/afl-tests/id:000865,src:000003,op:flip8,pos:118,+cov rename to src/exchange/afl-tests/id:000865,src:000003,op:flip8,pos:118,+cov diff --git a/src/mint/afl-tests/id:000866,src:000003,op:flip2,pos:47,+cov b/src/exchange/afl-tests/id:000866,src:000003,op:flip2,pos:47,+cov similarity index 100% rename from src/mint/afl-tests/id:000866,src:000003,op:flip2,pos:47,+cov rename to src/exchange/afl-tests/id:000866,src:000003,op:flip2,pos:47,+cov diff --git a/src/mint/afl-tests/id:000866,src:000003,op:flip8,pos:129,+cov b/src/exchange/afl-tests/id:000866,src:000003,op:flip8,pos:129,+cov similarity index 100% rename from src/mint/afl-tests/id:000866,src:000003,op:flip8,pos:129,+cov rename to src/exchange/afl-tests/id:000866,src:000003,op:flip8,pos:129,+cov diff --git a/src/mint/afl-tests/id:000867,src:000003,op:flip2,pos:49,+cov b/src/exchange/afl-tests/id:000867,src:000003,op:flip2,pos:49,+cov similarity index 100% rename from src/mint/afl-tests/id:000867,src:000003,op:flip2,pos:49,+cov rename to src/exchange/afl-tests/id:000867,src:000003,op:flip2,pos:49,+cov diff --git a/src/mint/afl-tests/id:000867,src:000003,op:flip8,pos:130,+cov b/src/exchange/afl-tests/id:000867,src:000003,op:flip8,pos:130,+cov similarity index 100% rename from src/mint/afl-tests/id:000867,src:000003,op:flip8,pos:130,+cov rename to src/exchange/afl-tests/id:000867,src:000003,op:flip8,pos:130,+cov diff --git a/src/mint/afl-tests/id:000868,src:000003,op:flip2,pos:54,+cov b/src/exchange/afl-tests/id:000868,src:000003,op:flip2,pos:54,+cov similarity index 100% rename from src/mint/afl-tests/id:000868,src:000003,op:flip2,pos:54,+cov rename to src/exchange/afl-tests/id:000868,src:000003,op:flip2,pos:54,+cov diff --git a/src/mint/afl-tests/id:000868,src:000003,op:flip8,pos:132,+cov b/src/exchange/afl-tests/id:000868,src:000003,op:flip8,pos:132,+cov similarity index 100% rename from src/mint/afl-tests/id:000868,src:000003,op:flip8,pos:132,+cov rename to src/exchange/afl-tests/id:000868,src:000003,op:flip8,pos:132,+cov diff --git a/src/mint/afl-tests/id:000869,src:000003,op:arith8,pos:17,val:-31 b/src/exchange/afl-tests/id:000869,src:000003,op:arith8,pos:17,val:-31 similarity index 100% rename from src/mint/afl-tests/id:000869,src:000003,op:arith8,pos:17,val:-31 rename to src/exchange/afl-tests/id:000869,src:000003,op:arith8,pos:17,val:-31 diff --git a/src/mint/afl-tests/id:000869,src:000003,op:flip2,pos:62,+cov b/src/exchange/afl-tests/id:000869,src:000003,op:flip2,pos:62,+cov similarity index 100% rename from src/mint/afl-tests/id:000869,src:000003,op:flip2,pos:62,+cov rename to src/exchange/afl-tests/id:000869,src:000003,op:flip2,pos:62,+cov diff --git a/src/mint/afl-tests/id:000870,src:000003,op:arith8,pos:27,val:+26,+cov b/src/exchange/afl-tests/id:000870,src:000003,op:arith8,pos:27,val:+26,+cov similarity index 100% rename from src/mint/afl-tests/id:000870,src:000003,op:arith8,pos:27,val:+26,+cov rename to src/exchange/afl-tests/id:000870,src:000003,op:arith8,pos:27,val:+26,+cov diff --git a/src/mint/afl-tests/id:000870,src:000003,op:flip2,pos:63,+cov b/src/exchange/afl-tests/id:000870,src:000003,op:flip2,pos:63,+cov similarity index 100% rename from src/mint/afl-tests/id:000870,src:000003,op:flip2,pos:63,+cov rename to src/exchange/afl-tests/id:000870,src:000003,op:flip2,pos:63,+cov diff --git a/src/mint/afl-tests/id:000871,src:000003,op:arith8,pos:29,val:+11,+cov b/src/exchange/afl-tests/id:000871,src:000003,op:arith8,pos:29,val:+11,+cov similarity index 100% rename from src/mint/afl-tests/id:000871,src:000003,op:arith8,pos:29,val:+11,+cov rename to src/exchange/afl-tests/id:000871,src:000003,op:arith8,pos:29,val:+11,+cov diff --git a/src/mint/afl-tests/id:000871,src:000003,op:flip2,pos:68,+cov b/src/exchange/afl-tests/id:000871,src:000003,op:flip2,pos:68,+cov similarity index 100% rename from src/mint/afl-tests/id:000871,src:000003,op:flip2,pos:68,+cov rename to src/exchange/afl-tests/id:000871,src:000003,op:flip2,pos:68,+cov diff --git a/src/mint/afl-tests/id:000872,src:000003,op:arith8,pos:29,val:+33 b/src/exchange/afl-tests/id:000872,src:000003,op:arith8,pos:29,val:+33 similarity index 100% rename from src/mint/afl-tests/id:000872,src:000003,op:arith8,pos:29,val:+33 rename to src/exchange/afl-tests/id:000872,src:000003,op:arith8,pos:29,val:+33 diff --git a/src/mint/afl-tests/id:000873,src:000003,op:arith8,pos:30,val:-14,+cov b/src/exchange/afl-tests/id:000873,src:000003,op:arith8,pos:30,val:-14,+cov similarity index 100% rename from src/mint/afl-tests/id:000873,src:000003,op:arith8,pos:30,val:-14,+cov rename to src/exchange/afl-tests/id:000873,src:000003,op:arith8,pos:30,val:-14,+cov diff --git a/src/mint/afl-tests/id:000874,src:000003,op:arith8,pos:30,val:+28,+cov b/src/exchange/afl-tests/id:000874,src:000003,op:arith8,pos:30,val:+28,+cov similarity index 100% rename from src/mint/afl-tests/id:000874,src:000003,op:arith8,pos:30,val:+28,+cov rename to src/exchange/afl-tests/id:000874,src:000003,op:arith8,pos:30,val:+28,+cov diff --git a/src/mint/afl-tests/id:000875,src:000003,op:arith8,pos:35,val:+18,+cov b/src/exchange/afl-tests/id:000875,src:000003,op:arith8,pos:35,val:+18,+cov similarity index 100% rename from src/mint/afl-tests/id:000875,src:000003,op:arith8,pos:35,val:+18,+cov rename to src/exchange/afl-tests/id:000875,src:000003,op:arith8,pos:35,val:+18,+cov diff --git a/src/mint/afl-tests/id:000876,src:000003,op:arith8,pos:35,val:+26,+cov b/src/exchange/afl-tests/id:000876,src:000003,op:arith8,pos:35,val:+26,+cov similarity index 100% rename from src/mint/afl-tests/id:000876,src:000003,op:arith8,pos:35,val:+26,+cov rename to src/exchange/afl-tests/id:000876,src:000003,op:arith8,pos:35,val:+26,+cov diff --git a/src/mint/afl-tests/id:000877,src:000003,op:arith8,pos:36,val:-23,+cov b/src/exchange/afl-tests/id:000877,src:000003,op:arith8,pos:36,val:-23,+cov similarity index 100% rename from src/mint/afl-tests/id:000877,src:000003,op:arith8,pos:36,val:-23,+cov rename to src/exchange/afl-tests/id:000877,src:000003,op:arith8,pos:36,val:-23,+cov diff --git a/src/mint/afl-tests/id:000878,src:000003,op:arith8,pos:37,val:+20,+cov b/src/exchange/afl-tests/id:000878,src:000003,op:arith8,pos:37,val:+20,+cov similarity index 100% rename from src/mint/afl-tests/id:000878,src:000003,op:arith8,pos:37,val:+20,+cov rename to src/exchange/afl-tests/id:000878,src:000003,op:arith8,pos:37,val:+20,+cov diff --git a/src/mint/afl-tests/id:000879,src:000003,op:arith8,pos:37,val:-27,+cov b/src/exchange/afl-tests/id:000879,src:000003,op:arith8,pos:37,val:-27,+cov similarity index 100% rename from src/mint/afl-tests/id:000879,src:000003,op:arith8,pos:37,val:-27,+cov rename to src/exchange/afl-tests/id:000879,src:000003,op:arith8,pos:37,val:-27,+cov diff --git a/src/mint/afl-tests/id:000880,src:000003,op:arith8,pos:42,val:+31,+cov b/src/exchange/afl-tests/id:000880,src:000003,op:arith8,pos:42,val:+31,+cov similarity index 100% rename from src/mint/afl-tests/id:000880,src:000003,op:arith8,pos:42,val:+31,+cov rename to src/exchange/afl-tests/id:000880,src:000003,op:arith8,pos:42,val:+31,+cov diff --git a/src/mint/afl-tests/id:000881,src:000003,op:arith8,pos:46,val:+26,+cov b/src/exchange/afl-tests/id:000881,src:000003,op:arith8,pos:46,val:+26,+cov similarity index 100% rename from src/mint/afl-tests/id:000881,src:000003,op:arith8,pos:46,val:+26,+cov rename to src/exchange/afl-tests/id:000881,src:000003,op:arith8,pos:46,val:+26,+cov diff --git a/src/mint/afl-tests/id:000882,src:000003,op:arith8,pos:47,val:-35,+cov b/src/exchange/afl-tests/id:000882,src:000003,op:arith8,pos:47,val:-35,+cov similarity index 100% rename from src/mint/afl-tests/id:000882,src:000003,op:arith8,pos:47,val:-35,+cov rename to src/exchange/afl-tests/id:000882,src:000003,op:arith8,pos:47,val:-35,+cov diff --git a/src/mint/afl-tests/id:000883,src:000003,op:arith8,pos:49,val:-2,+cov b/src/exchange/afl-tests/id:000883,src:000003,op:arith8,pos:49,val:-2,+cov similarity index 100% rename from src/mint/afl-tests/id:000883,src:000003,op:arith8,pos:49,val:-2,+cov rename to src/exchange/afl-tests/id:000883,src:000003,op:arith8,pos:49,val:-2,+cov diff --git a/src/mint/afl-tests/id:000884,src:000003,op:arith8,pos:51,val:+15,+cov b/src/exchange/afl-tests/id:000884,src:000003,op:arith8,pos:51,val:+15,+cov similarity index 100% rename from src/mint/afl-tests/id:000884,src:000003,op:arith8,pos:51,val:+15,+cov rename to src/exchange/afl-tests/id:000884,src:000003,op:arith8,pos:51,val:+15,+cov diff --git a/src/mint/afl-tests/id:000885,src:000003,op:arith8,pos:52,val:+11,+cov b/src/exchange/afl-tests/id:000885,src:000003,op:arith8,pos:52,val:+11,+cov similarity index 100% rename from src/mint/afl-tests/id:000885,src:000003,op:arith8,pos:52,val:+11,+cov rename to src/exchange/afl-tests/id:000885,src:000003,op:arith8,pos:52,val:+11,+cov diff --git a/src/mint/afl-tests/id:000886,src:000003,op:arith8,pos:61,val:+34 b/src/exchange/afl-tests/id:000886,src:000003,op:arith8,pos:61,val:+34 similarity index 100% rename from src/mint/afl-tests/id:000886,src:000003,op:arith8,pos:61,val:+34 rename to src/exchange/afl-tests/id:000886,src:000003,op:arith8,pos:61,val:+34 diff --git a/src/mint/afl-tests/id:000887,src:000003,op:arith8,pos:62,val:-18,+cov b/src/exchange/afl-tests/id:000887,src:000003,op:arith8,pos:62,val:-18,+cov similarity index 100% rename from src/mint/afl-tests/id:000887,src:000003,op:arith8,pos:62,val:-18,+cov rename to src/exchange/afl-tests/id:000887,src:000003,op:arith8,pos:62,val:-18,+cov diff --git a/src/mint/afl-tests/id:000888,src:000003,op:arith8,pos:68,val:+21,+cov b/src/exchange/afl-tests/id:000888,src:000003,op:arith8,pos:68,val:+21,+cov similarity index 100% rename from src/mint/afl-tests/id:000888,src:000003,op:arith8,pos:68,val:+21,+cov rename to src/exchange/afl-tests/id:000888,src:000003,op:arith8,pos:68,val:+21,+cov diff --git a/src/mint/afl-tests/id:000889,src:000003,op:arith8,pos:71,val:-12,+cov b/src/exchange/afl-tests/id:000889,src:000003,op:arith8,pos:71,val:-12,+cov similarity index 100% rename from src/mint/afl-tests/id:000889,src:000003,op:arith8,pos:71,val:-12,+cov rename to src/exchange/afl-tests/id:000889,src:000003,op:arith8,pos:71,val:-12,+cov diff --git a/src/mint/afl-tests/id:000890,src:000003,op:arith8,pos:75,val:+15,+cov b/src/exchange/afl-tests/id:000890,src:000003,op:arith8,pos:75,val:+15,+cov similarity index 100% rename from src/mint/afl-tests/id:000890,src:000003,op:arith8,pos:75,val:+15,+cov rename to src/exchange/afl-tests/id:000890,src:000003,op:arith8,pos:75,val:+15,+cov diff --git a/src/mint/afl-tests/id:000891,src:000003,op:arith8,pos:77,val:+13,+cov b/src/exchange/afl-tests/id:000891,src:000003,op:arith8,pos:77,val:+13,+cov similarity index 100% rename from src/mint/afl-tests/id:000891,src:000003,op:arith8,pos:77,val:+13,+cov rename to src/exchange/afl-tests/id:000891,src:000003,op:arith8,pos:77,val:+13,+cov diff --git a/src/mint/afl-tests/id:000892,src:000003,op:arith8,pos:80,val:-17,+cov b/src/exchange/afl-tests/id:000892,src:000003,op:arith8,pos:80,val:-17,+cov similarity index 100% rename from src/mint/afl-tests/id:000892,src:000003,op:arith8,pos:80,val:-17,+cov rename to src/exchange/afl-tests/id:000892,src:000003,op:arith8,pos:80,val:-17,+cov diff --git a/src/mint/afl-tests/id:000893,src:000003,op:arith8,pos:80,val:-23,+cov b/src/exchange/afl-tests/id:000893,src:000003,op:arith8,pos:80,val:-23,+cov similarity index 100% rename from src/mint/afl-tests/id:000893,src:000003,op:arith8,pos:80,val:-23,+cov rename to src/exchange/afl-tests/id:000893,src:000003,op:arith8,pos:80,val:-23,+cov diff --git a/src/mint/afl-tests/id:000894,src:000003,op:arith8,pos:81,val:-9,+cov b/src/exchange/afl-tests/id:000894,src:000003,op:arith8,pos:81,val:-9,+cov similarity index 100% rename from src/mint/afl-tests/id:000894,src:000003,op:arith8,pos:81,val:-9,+cov rename to src/exchange/afl-tests/id:000894,src:000003,op:arith8,pos:81,val:-9,+cov diff --git a/src/mint/afl-tests/id:000895,src:000003,op:arith8,pos:83,val:-18,+cov b/src/exchange/afl-tests/id:000895,src:000003,op:arith8,pos:83,val:-18,+cov similarity index 100% rename from src/mint/afl-tests/id:000895,src:000003,op:arith8,pos:83,val:-18,+cov rename to src/exchange/afl-tests/id:000895,src:000003,op:arith8,pos:83,val:-18,+cov diff --git a/src/mint/afl-tests/id:000896,src:000003,op:arith8,pos:83,val:+25,+cov b/src/exchange/afl-tests/id:000896,src:000003,op:arith8,pos:83,val:+25,+cov similarity index 100% rename from src/mint/afl-tests/id:000896,src:000003,op:arith8,pos:83,val:+25,+cov rename to src/exchange/afl-tests/id:000896,src:000003,op:arith8,pos:83,val:+25,+cov diff --git a/src/mint/afl-tests/id:000897,src:000003,op:arith8,pos:84,val:-18,+cov b/src/exchange/afl-tests/id:000897,src:000003,op:arith8,pos:84,val:-18,+cov similarity index 100% rename from src/mint/afl-tests/id:000897,src:000003,op:arith8,pos:84,val:-18,+cov rename to src/exchange/afl-tests/id:000897,src:000003,op:arith8,pos:84,val:-18,+cov diff --git a/src/mint/afl-tests/id:000898,src:000003,op:arith8,pos:86,val:+11,+cov b/src/exchange/afl-tests/id:000898,src:000003,op:arith8,pos:86,val:+11,+cov similarity index 100% rename from src/mint/afl-tests/id:000898,src:000003,op:arith8,pos:86,val:+11,+cov rename to src/exchange/afl-tests/id:000898,src:000003,op:arith8,pos:86,val:+11,+cov diff --git a/src/mint/afl-tests/id:000899,src:000003,op:arith8,pos:86,val:+27,+cov b/src/exchange/afl-tests/id:000899,src:000003,op:arith8,pos:86,val:+27,+cov similarity index 100% rename from src/mint/afl-tests/id:000899,src:000003,op:arith8,pos:86,val:+27,+cov rename to src/exchange/afl-tests/id:000899,src:000003,op:arith8,pos:86,val:+27,+cov diff --git a/src/mint/afl-tests/id:000900,src:000003,op:arith8,pos:87,val:-23,+cov b/src/exchange/afl-tests/id:000900,src:000003,op:arith8,pos:87,val:-23,+cov similarity index 100% rename from src/mint/afl-tests/id:000900,src:000003,op:arith8,pos:87,val:-23,+cov rename to src/exchange/afl-tests/id:000900,src:000003,op:arith8,pos:87,val:-23,+cov diff --git a/src/mint/afl-tests/id:000901,src:000003,op:arith8,pos:88,val:+35,+cov b/src/exchange/afl-tests/id:000901,src:000003,op:arith8,pos:88,val:+35,+cov similarity index 100% rename from src/mint/afl-tests/id:000901,src:000003,op:arith8,pos:88,val:+35,+cov rename to src/exchange/afl-tests/id:000901,src:000003,op:arith8,pos:88,val:+35,+cov diff --git a/src/mint/afl-tests/id:000902,src:000003,op:arith8,pos:89,val:-14,+cov b/src/exchange/afl-tests/id:000902,src:000003,op:arith8,pos:89,val:-14,+cov similarity index 100% rename from src/mint/afl-tests/id:000902,src:000003,op:arith8,pos:89,val:-14,+cov rename to src/exchange/afl-tests/id:000902,src:000003,op:arith8,pos:89,val:-14,+cov diff --git a/src/mint/afl-tests/id:000903,src:000003,op:arith8,pos:89,val:-33,+cov b/src/exchange/afl-tests/id:000903,src:000003,op:arith8,pos:89,val:-33,+cov similarity index 100% rename from src/mint/afl-tests/id:000903,src:000003,op:arith8,pos:89,val:-33,+cov rename to src/exchange/afl-tests/id:000903,src:000003,op:arith8,pos:89,val:-33,+cov diff --git a/src/mint/afl-tests/id:000904,src:000003,op:arith8,pos:90,val:-25,+cov b/src/exchange/afl-tests/id:000904,src:000003,op:arith8,pos:90,val:-25,+cov similarity index 100% rename from src/mint/afl-tests/id:000904,src:000003,op:arith8,pos:90,val:-25,+cov rename to src/exchange/afl-tests/id:000904,src:000003,op:arith8,pos:90,val:-25,+cov diff --git a/src/mint/afl-tests/id:000905,src:000003,op:arith8,pos:92,val:-25,+cov b/src/exchange/afl-tests/id:000905,src:000003,op:arith8,pos:92,val:-25,+cov similarity index 100% rename from src/mint/afl-tests/id:000905,src:000003,op:arith8,pos:92,val:-25,+cov rename to src/exchange/afl-tests/id:000905,src:000003,op:arith8,pos:92,val:-25,+cov diff --git a/src/mint/afl-tests/id:000906,src:000003,op:arith8,pos:96,val:+10,+cov b/src/exchange/afl-tests/id:000906,src:000003,op:arith8,pos:96,val:+10,+cov similarity index 100% rename from src/mint/afl-tests/id:000906,src:000003,op:arith8,pos:96,val:+10,+cov rename to src/exchange/afl-tests/id:000906,src:000003,op:arith8,pos:96,val:+10,+cov diff --git a/src/mint/afl-tests/id:000907,src:000003,op:arith8,pos:96,val:-19,+cov b/src/exchange/afl-tests/id:000907,src:000003,op:arith8,pos:96,val:-19,+cov similarity index 100% rename from src/mint/afl-tests/id:000907,src:000003,op:arith8,pos:96,val:-19,+cov rename to src/exchange/afl-tests/id:000907,src:000003,op:arith8,pos:96,val:-19,+cov diff --git a/src/mint/afl-tests/id:000908,src:000003,op:arith8,pos:96,val:+25,+cov b/src/exchange/afl-tests/id:000908,src:000003,op:arith8,pos:96,val:+25,+cov similarity index 100% rename from src/mint/afl-tests/id:000908,src:000003,op:arith8,pos:96,val:+25,+cov rename to src/exchange/afl-tests/id:000908,src:000003,op:arith8,pos:96,val:+25,+cov diff --git a/src/mint/afl-tests/id:000909,src:000003,op:arith8,pos:97,val:-17,+cov b/src/exchange/afl-tests/id:000909,src:000003,op:arith8,pos:97,val:-17,+cov similarity index 100% rename from src/mint/afl-tests/id:000909,src:000003,op:arith8,pos:97,val:-17,+cov rename to src/exchange/afl-tests/id:000909,src:000003,op:arith8,pos:97,val:-17,+cov diff --git a/src/mint/afl-tests/id:000910,src:000003,op:arith8,pos:100,val:-15,+cov b/src/exchange/afl-tests/id:000910,src:000003,op:arith8,pos:100,val:-15,+cov similarity index 100% rename from src/mint/afl-tests/id:000910,src:000003,op:arith8,pos:100,val:-15,+cov rename to src/exchange/afl-tests/id:000910,src:000003,op:arith8,pos:100,val:-15,+cov diff --git a/src/mint/afl-tests/id:000911,src:000003,op:arith8,pos:102,val:-27,+cov b/src/exchange/afl-tests/id:000911,src:000003,op:arith8,pos:102,val:-27,+cov similarity index 100% rename from src/mint/afl-tests/id:000911,src:000003,op:arith8,pos:102,val:-27,+cov rename to src/exchange/afl-tests/id:000911,src:000003,op:arith8,pos:102,val:-27,+cov diff --git a/src/mint/afl-tests/id:000912,src:000003,op:arith8,pos:102,val:-34,+cov b/src/exchange/afl-tests/id:000912,src:000003,op:arith8,pos:102,val:-34,+cov similarity index 100% rename from src/mint/afl-tests/id:000912,src:000003,op:arith8,pos:102,val:-34,+cov rename to src/exchange/afl-tests/id:000912,src:000003,op:arith8,pos:102,val:-34,+cov diff --git a/src/mint/afl-tests/id:000913,src:000003,op:arith8,pos:103,val:-9,+cov b/src/exchange/afl-tests/id:000913,src:000003,op:arith8,pos:103,val:-9,+cov similarity index 100% rename from src/mint/afl-tests/id:000913,src:000003,op:arith8,pos:103,val:-9,+cov rename to src/exchange/afl-tests/id:000913,src:000003,op:arith8,pos:103,val:-9,+cov diff --git a/src/mint/afl-tests/id:000914,src:000003,op:arith8,pos:103,val:+12 b/src/exchange/afl-tests/id:000914,src:000003,op:arith8,pos:103,val:+12 similarity index 100% rename from src/mint/afl-tests/id:000914,src:000003,op:arith8,pos:103,val:+12 rename to src/exchange/afl-tests/id:000914,src:000003,op:arith8,pos:103,val:+12 diff --git a/src/mint/afl-tests/id:000915,src:000003,op:arith8,pos:103,val:+20,+cov b/src/exchange/afl-tests/id:000915,src:000003,op:arith8,pos:103,val:+20,+cov similarity index 100% rename from src/mint/afl-tests/id:000915,src:000003,op:arith8,pos:103,val:+20,+cov rename to src/exchange/afl-tests/id:000915,src:000003,op:arith8,pos:103,val:+20,+cov diff --git a/src/mint/afl-tests/id:000916,src:000003,op:arith8,pos:103,val:+22,+cov b/src/exchange/afl-tests/id:000916,src:000003,op:arith8,pos:103,val:+22,+cov similarity index 100% rename from src/mint/afl-tests/id:000916,src:000003,op:arith8,pos:103,val:+22,+cov rename to src/exchange/afl-tests/id:000916,src:000003,op:arith8,pos:103,val:+22,+cov diff --git a/src/mint/afl-tests/id:000917,src:000003,op:arith8,pos:103,val:+29,+cov b/src/exchange/afl-tests/id:000917,src:000003,op:arith8,pos:103,val:+29,+cov similarity index 100% rename from src/mint/afl-tests/id:000917,src:000003,op:arith8,pos:103,val:+29,+cov rename to src/exchange/afl-tests/id:000917,src:000003,op:arith8,pos:103,val:+29,+cov diff --git a/src/mint/afl-tests/id:000918,src:000003,op:arith8,pos:103,val:+33,+cov b/src/exchange/afl-tests/id:000918,src:000003,op:arith8,pos:103,val:+33,+cov similarity index 100% rename from src/mint/afl-tests/id:000918,src:000003,op:arith8,pos:103,val:+33,+cov rename to src/exchange/afl-tests/id:000918,src:000003,op:arith8,pos:103,val:+33,+cov diff --git a/src/mint/afl-tests/id:000919,src:000003,op:arith8,pos:104,val:-10,+cov b/src/exchange/afl-tests/id:000919,src:000003,op:arith8,pos:104,val:-10,+cov similarity index 100% rename from src/mint/afl-tests/id:000919,src:000003,op:arith8,pos:104,val:-10,+cov rename to src/exchange/afl-tests/id:000919,src:000003,op:arith8,pos:104,val:-10,+cov diff --git a/src/mint/afl-tests/id:000920,src:000003,op:arith8,pos:104,val:-12,+cov b/src/exchange/afl-tests/id:000920,src:000003,op:arith8,pos:104,val:-12,+cov similarity index 100% rename from src/mint/afl-tests/id:000920,src:000003,op:arith8,pos:104,val:-12,+cov rename to src/exchange/afl-tests/id:000920,src:000003,op:arith8,pos:104,val:-12,+cov diff --git a/src/mint/afl-tests/id:000921,src:000003,op:arith8,pos:104,val:+34,+cov b/src/exchange/afl-tests/id:000921,src:000003,op:arith8,pos:104,val:+34,+cov similarity index 100% rename from src/mint/afl-tests/id:000921,src:000003,op:arith8,pos:104,val:+34,+cov rename to src/exchange/afl-tests/id:000921,src:000003,op:arith8,pos:104,val:+34,+cov diff --git a/src/mint/afl-tests/id:000922,src:000003,op:arith8,pos:106,val:+5,+cov b/src/exchange/afl-tests/id:000922,src:000003,op:arith8,pos:106,val:+5,+cov similarity index 100% rename from src/mint/afl-tests/id:000922,src:000003,op:arith8,pos:106,val:+5,+cov rename to src/exchange/afl-tests/id:000922,src:000003,op:arith8,pos:106,val:+5,+cov diff --git a/src/mint/afl-tests/id:000923,src:000003,op:arith8,pos:106,val:-13,+cov b/src/exchange/afl-tests/id:000923,src:000003,op:arith8,pos:106,val:-13,+cov similarity index 100% rename from src/mint/afl-tests/id:000923,src:000003,op:arith8,pos:106,val:-13,+cov rename to src/exchange/afl-tests/id:000923,src:000003,op:arith8,pos:106,val:-13,+cov diff --git a/src/mint/afl-tests/id:000924,src:000003,op:arith8,pos:110,val:+15,+cov b/src/exchange/afl-tests/id:000924,src:000003,op:arith8,pos:110,val:+15,+cov similarity index 100% rename from src/mint/afl-tests/id:000924,src:000003,op:arith8,pos:110,val:+15,+cov rename to src/exchange/afl-tests/id:000924,src:000003,op:arith8,pos:110,val:+15,+cov diff --git a/src/mint/afl-tests/id:000925,src:000003,op:arith8,pos:112,val:-13,+cov b/src/exchange/afl-tests/id:000925,src:000003,op:arith8,pos:112,val:-13,+cov similarity index 100% rename from src/mint/afl-tests/id:000925,src:000003,op:arith8,pos:112,val:-13,+cov rename to src/exchange/afl-tests/id:000925,src:000003,op:arith8,pos:112,val:-13,+cov diff --git a/src/mint/afl-tests/id:000926,src:000003,op:arith8,pos:113,val:+34,+cov b/src/exchange/afl-tests/id:000926,src:000003,op:arith8,pos:113,val:+34,+cov similarity index 100% rename from src/mint/afl-tests/id:000926,src:000003,op:arith8,pos:113,val:+34,+cov rename to src/exchange/afl-tests/id:000926,src:000003,op:arith8,pos:113,val:+34,+cov diff --git a/src/mint/afl-tests/id:000927,src:000003,op:arith8,pos:114,val:+5,+cov b/src/exchange/afl-tests/id:000927,src:000003,op:arith8,pos:114,val:+5,+cov similarity index 100% rename from src/mint/afl-tests/id:000927,src:000003,op:arith8,pos:114,val:+5,+cov rename to src/exchange/afl-tests/id:000927,src:000003,op:arith8,pos:114,val:+5,+cov diff --git a/src/mint/afl-tests/id:000928,src:000003,op:arith8,pos:114,val:+26,+cov b/src/exchange/afl-tests/id:000928,src:000003,op:arith8,pos:114,val:+26,+cov similarity index 100% rename from src/mint/afl-tests/id:000928,src:000003,op:arith8,pos:114,val:+26,+cov rename to src/exchange/afl-tests/id:000928,src:000003,op:arith8,pos:114,val:+26,+cov diff --git a/src/mint/afl-tests/id:000929,src:000003,op:arith8,pos:114,val:-27,+cov b/src/exchange/afl-tests/id:000929,src:000003,op:arith8,pos:114,val:-27,+cov similarity index 100% rename from src/mint/afl-tests/id:000929,src:000003,op:arith8,pos:114,val:-27,+cov rename to src/exchange/afl-tests/id:000929,src:000003,op:arith8,pos:114,val:-27,+cov diff --git a/src/mint/afl-tests/id:000930,src:000003,op:arith8,pos:118,val:-28,+cov b/src/exchange/afl-tests/id:000930,src:000003,op:arith8,pos:118,val:-28,+cov similarity index 100% rename from src/mint/afl-tests/id:000930,src:000003,op:arith8,pos:118,val:-28,+cov rename to src/exchange/afl-tests/id:000930,src:000003,op:arith8,pos:118,val:-28,+cov diff --git a/src/mint/afl-tests/id:000931,src:000003,op:arith8,pos:119,val:+12,+cov b/src/exchange/afl-tests/id:000931,src:000003,op:arith8,pos:119,val:+12,+cov similarity index 100% rename from src/mint/afl-tests/id:000931,src:000003,op:arith8,pos:119,val:+12,+cov rename to src/exchange/afl-tests/id:000931,src:000003,op:arith8,pos:119,val:+12,+cov diff --git a/src/mint/afl-tests/id:000932,src:000003,op:arith8,pos:119,val:+27,+cov b/src/exchange/afl-tests/id:000932,src:000003,op:arith8,pos:119,val:+27,+cov similarity index 100% rename from src/mint/afl-tests/id:000932,src:000003,op:arith8,pos:119,val:+27,+cov rename to src/exchange/afl-tests/id:000932,src:000003,op:arith8,pos:119,val:+27,+cov diff --git a/src/mint/afl-tests/id:000933,src:000003,op:arith8,pos:122,val:-4,+cov b/src/exchange/afl-tests/id:000933,src:000003,op:arith8,pos:122,val:-4,+cov similarity index 100% rename from src/mint/afl-tests/id:000933,src:000003,op:arith8,pos:122,val:-4,+cov rename to src/exchange/afl-tests/id:000933,src:000003,op:arith8,pos:122,val:-4,+cov diff --git a/src/mint/afl-tests/id:000934,src:000003,op:arith8,pos:122,val:-26,+cov b/src/exchange/afl-tests/id:000934,src:000003,op:arith8,pos:122,val:-26,+cov similarity index 100% rename from src/mint/afl-tests/id:000934,src:000003,op:arith8,pos:122,val:-26,+cov rename to src/exchange/afl-tests/id:000934,src:000003,op:arith8,pos:122,val:-26,+cov diff --git a/src/mint/afl-tests/id:000935,src:000003,op:arith8,pos:122,val:+35,+cov b/src/exchange/afl-tests/id:000935,src:000003,op:arith8,pos:122,val:+35,+cov similarity index 100% rename from src/mint/afl-tests/id:000935,src:000003,op:arith8,pos:122,val:+35,+cov rename to src/exchange/afl-tests/id:000935,src:000003,op:arith8,pos:122,val:+35,+cov diff --git a/src/mint/afl-tests/id:000936,src:000003,op:arith8,pos:123,val:-11,+cov b/src/exchange/afl-tests/id:000936,src:000003,op:arith8,pos:123,val:-11,+cov similarity index 100% rename from src/mint/afl-tests/id:000936,src:000003,op:arith8,pos:123,val:-11,+cov rename to src/exchange/afl-tests/id:000936,src:000003,op:arith8,pos:123,val:-11,+cov diff --git a/src/mint/afl-tests/id:000937,src:000003,op:arith8,pos:124,val:-14,+cov b/src/exchange/afl-tests/id:000937,src:000003,op:arith8,pos:124,val:-14,+cov similarity index 100% rename from src/mint/afl-tests/id:000937,src:000003,op:arith8,pos:124,val:-14,+cov rename to src/exchange/afl-tests/id:000937,src:000003,op:arith8,pos:124,val:-14,+cov diff --git a/src/mint/afl-tests/id:000938,src:000003,op:arith8,pos:128,val:+5,+cov b/src/exchange/afl-tests/id:000938,src:000003,op:arith8,pos:128,val:+5,+cov similarity index 100% rename from src/mint/afl-tests/id:000938,src:000003,op:arith8,pos:128,val:+5,+cov rename to src/exchange/afl-tests/id:000938,src:000003,op:arith8,pos:128,val:+5,+cov diff --git a/src/mint/afl-tests/id:000939,src:000003,op:arith8,pos:129,val:+21,+cov b/src/exchange/afl-tests/id:000939,src:000003,op:arith8,pos:129,val:+21,+cov similarity index 100% rename from src/mint/afl-tests/id:000939,src:000003,op:arith8,pos:129,val:+21,+cov rename to src/exchange/afl-tests/id:000939,src:000003,op:arith8,pos:129,val:+21,+cov diff --git a/src/mint/afl-tests/id:000940,src:000003,op:arith8,pos:133,val:-7,+cov b/src/exchange/afl-tests/id:000940,src:000003,op:arith8,pos:133,val:-7,+cov similarity index 100% rename from src/mint/afl-tests/id:000940,src:000003,op:arith8,pos:133,val:-7,+cov rename to src/exchange/afl-tests/id:000940,src:000003,op:arith8,pos:133,val:-7,+cov diff --git a/src/mint/afl-tests/id:000941,src:000003,op:arith8,pos:133,val:+20,+cov b/src/exchange/afl-tests/id:000941,src:000003,op:arith8,pos:133,val:+20,+cov similarity index 100% rename from src/mint/afl-tests/id:000941,src:000003,op:arith8,pos:133,val:+20,+cov rename to src/exchange/afl-tests/id:000941,src:000003,op:arith8,pos:133,val:+20,+cov diff --git a/src/mint/afl-tests/id:000942,src:000003,op:arith8,pos:135,val:-26,+cov b/src/exchange/afl-tests/id:000942,src:000003,op:arith8,pos:135,val:-26,+cov similarity index 100% rename from src/mint/afl-tests/id:000942,src:000003,op:arith8,pos:135,val:-26,+cov rename to src/exchange/afl-tests/id:000942,src:000003,op:arith8,pos:135,val:-26,+cov diff --git a/src/mint/afl-tests/id:000943,src:000003,op:arith8,pos:141,val:+1,+cov b/src/exchange/afl-tests/id:000943,src:000003,op:arith8,pos:141,val:+1,+cov similarity index 100% rename from src/mint/afl-tests/id:000943,src:000003,op:arith8,pos:141,val:+1,+cov rename to src/exchange/afl-tests/id:000943,src:000003,op:arith8,pos:141,val:+1,+cov diff --git a/src/mint/afl-tests/id:000944,src:000003,op:arith8,pos:143,val:-5,+cov b/src/exchange/afl-tests/id:000944,src:000003,op:arith8,pos:143,val:-5,+cov similarity index 100% rename from src/mint/afl-tests/id:000944,src:000003,op:arith8,pos:143,val:-5,+cov rename to src/exchange/afl-tests/id:000944,src:000003,op:arith8,pos:143,val:-5,+cov diff --git a/src/mint/afl-tests/id:000945,src:000003,op:arith8,pos:145,val:+21,+cov b/src/exchange/afl-tests/id:000945,src:000003,op:arith8,pos:145,val:+21,+cov similarity index 100% rename from src/mint/afl-tests/id:000945,src:000003,op:arith8,pos:145,val:+21,+cov rename to src/exchange/afl-tests/id:000945,src:000003,op:arith8,pos:145,val:+21,+cov diff --git a/src/mint/afl-tests/id:000946,src:000003,op:arith8,pos:147,val:-9,+cov b/src/exchange/afl-tests/id:000946,src:000003,op:arith8,pos:147,val:-9,+cov similarity index 100% rename from src/mint/afl-tests/id:000946,src:000003,op:arith8,pos:147,val:-9,+cov rename to src/exchange/afl-tests/id:000946,src:000003,op:arith8,pos:147,val:-9,+cov diff --git a/src/mint/afl-tests/id:000947,src:000003,op:arith8,pos:147,val:+31,+cov b/src/exchange/afl-tests/id:000947,src:000003,op:arith8,pos:147,val:+31,+cov similarity index 100% rename from src/mint/afl-tests/id:000947,src:000003,op:arith8,pos:147,val:+31,+cov rename to src/exchange/afl-tests/id:000947,src:000003,op:arith8,pos:147,val:+31,+cov diff --git a/src/mint/afl-tests/id:000948,src:000003,op:arith8,pos:148,val:+3,+cov b/src/exchange/afl-tests/id:000948,src:000003,op:arith8,pos:148,val:+3,+cov similarity index 100% rename from src/mint/afl-tests/id:000948,src:000003,op:arith8,pos:148,val:+3,+cov rename to src/exchange/afl-tests/id:000948,src:000003,op:arith8,pos:148,val:+3,+cov diff --git a/src/mint/afl-tests/id:000949,src:000003,op:arith8,pos:148,val:-11,+cov b/src/exchange/afl-tests/id:000949,src:000003,op:arith8,pos:148,val:-11,+cov similarity index 100% rename from src/mint/afl-tests/id:000949,src:000003,op:arith8,pos:148,val:-11,+cov rename to src/exchange/afl-tests/id:000949,src:000003,op:arith8,pos:148,val:-11,+cov diff --git a/src/mint/afl-tests/id:000950,src:000003,op:arith8,pos:149,val:-18,+cov b/src/exchange/afl-tests/id:000950,src:000003,op:arith8,pos:149,val:-18,+cov similarity index 100% rename from src/mint/afl-tests/id:000950,src:000003,op:arith8,pos:149,val:-18,+cov rename to src/exchange/afl-tests/id:000950,src:000003,op:arith8,pos:149,val:-18,+cov diff --git a/src/mint/afl-tests/id:000951,src:000003,op:arith8,pos:151,val:-21,+cov b/src/exchange/afl-tests/id:000951,src:000003,op:arith8,pos:151,val:-21,+cov similarity index 100% rename from src/mint/afl-tests/id:000951,src:000003,op:arith8,pos:151,val:-21,+cov rename to src/exchange/afl-tests/id:000951,src:000003,op:arith8,pos:151,val:-21,+cov diff --git a/src/mint/afl-tests/id:000952,src:000003,op:arith8,pos:151,val:+26,+cov b/src/exchange/afl-tests/id:000952,src:000003,op:arith8,pos:151,val:+26,+cov similarity index 100% rename from src/mint/afl-tests/id:000952,src:000003,op:arith8,pos:151,val:+26,+cov rename to src/exchange/afl-tests/id:000952,src:000003,op:arith8,pos:151,val:+26,+cov diff --git a/src/mint/afl-tests/id:000953,src:000003,op:arith8,pos:151,val:-30,+cov b/src/exchange/afl-tests/id:000953,src:000003,op:arith8,pos:151,val:-30,+cov similarity index 100% rename from src/mint/afl-tests/id:000953,src:000003,op:arith8,pos:151,val:-30,+cov rename to src/exchange/afl-tests/id:000953,src:000003,op:arith8,pos:151,val:-30,+cov diff --git a/src/mint/afl-tests/id:000954,src:000003,op:arith16,pos:88,val:-16,+cov b/src/exchange/afl-tests/id:000954,src:000003,op:arith16,pos:88,val:-16,+cov similarity index 100% rename from src/mint/afl-tests/id:000954,src:000003,op:arith16,pos:88,val:-16,+cov rename to src/exchange/afl-tests/id:000954,src:000003,op:arith16,pos:88,val:-16,+cov diff --git a/src/mint/afl-tests/id:000955,src:000003,op:arith16,pos:109,val:-19,+cov b/src/exchange/afl-tests/id:000955,src:000003,op:arith16,pos:109,val:-19,+cov similarity index 100% rename from src/mint/afl-tests/id:000955,src:000003,op:arith16,pos:109,val:-19,+cov rename to src/exchange/afl-tests/id:000955,src:000003,op:arith16,pos:109,val:-19,+cov diff --git a/src/mint/afl-tests/id:000956,src:000003,op:arith16,pos:109,val:-26,+cov b/src/exchange/afl-tests/id:000956,src:000003,op:arith16,pos:109,val:-26,+cov similarity index 100% rename from src/mint/afl-tests/id:000956,src:000003,op:arith16,pos:109,val:-26,+cov rename to src/exchange/afl-tests/id:000956,src:000003,op:arith16,pos:109,val:-26,+cov diff --git a/src/mint/afl-tests/id:000957,src:000003,op:arith16,pos:109,val:-33,+cov b/src/exchange/afl-tests/id:000957,src:000003,op:arith16,pos:109,val:-33,+cov similarity index 100% rename from src/mint/afl-tests/id:000957,src:000003,op:arith16,pos:109,val:-33,+cov rename to src/exchange/afl-tests/id:000957,src:000003,op:arith16,pos:109,val:-33,+cov diff --git a/src/mint/afl-tests/id:000958,src:000003,op:arith16,pos:121,val:-34,+cov b/src/exchange/afl-tests/id:000958,src:000003,op:arith16,pos:121,val:-34,+cov similarity index 100% rename from src/mint/afl-tests/id:000958,src:000003,op:arith16,pos:121,val:-34,+cov rename to src/exchange/afl-tests/id:000958,src:000003,op:arith16,pos:121,val:-34,+cov diff --git a/src/mint/afl-tests/id:000959,src:000003,op:int8,pos:80,val:+16,+cov b/src/exchange/afl-tests/id:000959,src:000003,op:int8,pos:80,val:+16,+cov similarity index 100% rename from src/mint/afl-tests/id:000959,src:000003,op:int8,pos:80,val:+16,+cov rename to src/exchange/afl-tests/id:000959,src:000003,op:int8,pos:80,val:+16,+cov diff --git a/src/mint/afl-tests/id:000960,src:000003,op:int8,pos:83,val:+1,+cov b/src/exchange/afl-tests/id:000960,src:000003,op:int8,pos:83,val:+1,+cov similarity index 100% rename from src/mint/afl-tests/id:000960,src:000003,op:int8,pos:83,val:+1,+cov rename to src/exchange/afl-tests/id:000960,src:000003,op:int8,pos:83,val:+1,+cov diff --git a/src/mint/afl-tests/id:000961,src:000003,op:int8,pos:101,val:+64,+cov b/src/exchange/afl-tests/id:000961,src:000003,op:int8,pos:101,val:+64,+cov similarity index 100% rename from src/mint/afl-tests/id:000961,src:000003,op:int8,pos:101,val:+64,+cov rename to src/exchange/afl-tests/id:000961,src:000003,op:int8,pos:101,val:+64,+cov diff --git a/src/mint/afl-tests/id:000962,src:000003,op:int8,pos:120,val:-128,+cov b/src/exchange/afl-tests/id:000962,src:000003,op:int8,pos:120,val:-128,+cov similarity index 100% rename from src/mint/afl-tests/id:000962,src:000003,op:int8,pos:120,val:-128,+cov rename to src/exchange/afl-tests/id:000962,src:000003,op:int8,pos:120,val:-128,+cov diff --git a/src/mint/afl-tests/id:000963,src:000003,op:int8,pos:139,val:+16,+cov b/src/exchange/afl-tests/id:000963,src:000003,op:int8,pos:139,val:+16,+cov similarity index 100% rename from src/mint/afl-tests/id:000963,src:000003,op:int8,pos:139,val:+16,+cov rename to src/exchange/afl-tests/id:000963,src:000003,op:int8,pos:139,val:+16,+cov diff --git a/src/mint/afl-tests/id:000964,src:000003,op:int16,pos:81,val:+127,+cov b/src/exchange/afl-tests/id:000964,src:000003,op:int16,pos:81,val:+127,+cov similarity index 100% rename from src/mint/afl-tests/id:000964,src:000003,op:int16,pos:81,val:+127,+cov rename to src/exchange/afl-tests/id:000964,src:000003,op:int16,pos:81,val:+127,+cov diff --git a/src/mint/afl-tests/id:000965,src:000003,op:int16,pos:95,val:+1,+cov b/src/exchange/afl-tests/id:000965,src:000003,op:int16,pos:95,val:+1,+cov similarity index 100% rename from src/mint/afl-tests/id:000965,src:000003,op:int16,pos:95,val:+1,+cov rename to src/exchange/afl-tests/id:000965,src:000003,op:int16,pos:95,val:+1,+cov diff --git a/src/mint/afl-tests/id:000966,src:000003,op:int16,pos:97,val:be:+127,+cov b/src/exchange/afl-tests/id:000966,src:000003,op:int16,pos:97,val:be:+127,+cov similarity index 100% rename from src/mint/afl-tests/id:000966,src:000003,op:int16,pos:97,val:be:+127,+cov rename to src/exchange/afl-tests/id:000966,src:000003,op:int16,pos:97,val:be:+127,+cov diff --git a/src/mint/afl-tests/id:000967,src:000003,op:int16,pos:98,val:+1,+cov b/src/exchange/afl-tests/id:000967,src:000003,op:int16,pos:98,val:+1,+cov similarity index 100% rename from src/mint/afl-tests/id:000967,src:000003,op:int16,pos:98,val:+1,+cov rename to src/exchange/afl-tests/id:000967,src:000003,op:int16,pos:98,val:+1,+cov diff --git a/src/mint/afl-tests/id:000968,src:000003,op:int16,pos:100,val:-1,+cov b/src/exchange/afl-tests/id:000968,src:000003,op:int16,pos:100,val:-1,+cov similarity index 100% rename from src/mint/afl-tests/id:000968,src:000003,op:int16,pos:100,val:-1,+cov rename to src/exchange/afl-tests/id:000968,src:000003,op:int16,pos:100,val:-1,+cov diff --git a/src/mint/afl-tests/id:000969,src:000003,op:int16,pos:102,val:be:+127,+cov b/src/exchange/afl-tests/id:000969,src:000003,op:int16,pos:102,val:be:+127,+cov similarity index 100% rename from src/mint/afl-tests/id:000969,src:000003,op:int16,pos:102,val:be:+127,+cov rename to src/exchange/afl-tests/id:000969,src:000003,op:int16,pos:102,val:be:+127,+cov diff --git a/src/mint/afl-tests/id:000970,src:000003,op:int16,pos:107,val:-128,+cov b/src/exchange/afl-tests/id:000970,src:000003,op:int16,pos:107,val:-128,+cov similarity index 100% rename from src/mint/afl-tests/id:000970,src:000003,op:int16,pos:107,val:-128,+cov rename to src/exchange/afl-tests/id:000970,src:000003,op:int16,pos:107,val:-128,+cov diff --git a/src/mint/afl-tests/id:000971,src:000003,op:int16,pos:108,val:be:+127,+cov b/src/exchange/afl-tests/id:000971,src:000003,op:int16,pos:108,val:be:+127,+cov similarity index 100% rename from src/mint/afl-tests/id:000971,src:000003,op:int16,pos:108,val:be:+127,+cov rename to src/exchange/afl-tests/id:000971,src:000003,op:int16,pos:108,val:be:+127,+cov diff --git a/src/mint/afl-tests/id:000972,src:000003,op:int16,pos:109,val:be:+100,+cov b/src/exchange/afl-tests/id:000972,src:000003,op:int16,pos:109,val:be:+100,+cov similarity index 100% rename from src/mint/afl-tests/id:000972,src:000003,op:int16,pos:109,val:be:+100,+cov rename to src/exchange/afl-tests/id:000972,src:000003,op:int16,pos:109,val:be:+100,+cov diff --git a/src/mint/afl-tests/id:000973,src:000003,op:int16,pos:125,val:+1000,+cov b/src/exchange/afl-tests/id:000973,src:000003,op:int16,pos:125,val:+1000,+cov similarity index 100% rename from src/mint/afl-tests/id:000973,src:000003,op:int16,pos:125,val:+1000,+cov rename to src/exchange/afl-tests/id:000973,src:000003,op:int16,pos:125,val:+1000,+cov diff --git a/src/mint/afl-tests/id:000974,src:000003,op:int16,pos:137,val:be:+32,+cov b/src/exchange/afl-tests/id:000974,src:000003,op:int16,pos:137,val:be:+32,+cov similarity index 100% rename from src/mint/afl-tests/id:000974,src:000003,op:int16,pos:137,val:be:+32,+cov rename to src/exchange/afl-tests/id:000974,src:000003,op:int16,pos:137,val:be:+32,+cov diff --git a/src/mint/afl-tests/id:000975,src:000003,op:int16,pos:150,val:be:+255,+cov b/src/exchange/afl-tests/id:000975,src:000003,op:int16,pos:150,val:be:+255,+cov similarity index 100% rename from src/mint/afl-tests/id:000975,src:000003,op:int16,pos:150,val:be:+255,+cov rename to src/exchange/afl-tests/id:000975,src:000003,op:int16,pos:150,val:be:+255,+cov diff --git a/src/mint/afl-tests/id:000976,src:000003,op:int32,pos:1,val:be:+65535 b/src/exchange/afl-tests/id:000976,src:000003,op:int32,pos:1,val:be:+65535 similarity index 100% rename from src/mint/afl-tests/id:000976,src:000003,op:int32,pos:1,val:be:+65535 rename to src/exchange/afl-tests/id:000976,src:000003,op:int32,pos:1,val:be:+65535 diff --git a/src/mint/afl-tests/id:000977,src:000003,op:int32,pos:54,val:+32768,+cov b/src/exchange/afl-tests/id:000977,src:000003,op:int32,pos:54,val:+32768,+cov similarity index 100% rename from src/mint/afl-tests/id:000977,src:000003,op:int32,pos:54,val:+32768,+cov rename to src/exchange/afl-tests/id:000977,src:000003,op:int32,pos:54,val:+32768,+cov diff --git a/src/mint/afl-tests/id:000978,src:000003,op:int32,pos:80,val:be:+32767,+cov b/src/exchange/afl-tests/id:000978,src:000003,op:int32,pos:80,val:be:+32767,+cov similarity index 100% rename from src/mint/afl-tests/id:000978,src:000003,op:int32,pos:80,val:be:+32767,+cov rename to src/exchange/afl-tests/id:000978,src:000003,op:int32,pos:80,val:be:+32767,+cov diff --git a/src/mint/afl-tests/id:000979,src:000003,op:int32,pos:84,val:+2147483647 b/src/exchange/afl-tests/id:000979,src:000003,op:int32,pos:84,val:+2147483647 similarity index 100% rename from src/mint/afl-tests/id:000979,src:000003,op:int32,pos:84,val:+2147483647 rename to src/exchange/afl-tests/id:000979,src:000003,op:int32,pos:84,val:+2147483647 diff --git a/src/mint/afl-tests/id:000980,src:000003,op:int32,pos:89,val:be:+4096,+cov b/src/exchange/afl-tests/id:000980,src:000003,op:int32,pos:89,val:be:+4096,+cov similarity index 100% rename from src/mint/afl-tests/id:000980,src:000003,op:int32,pos:89,val:be:+4096,+cov rename to src/exchange/afl-tests/id:000980,src:000003,op:int32,pos:89,val:be:+4096,+cov diff --git a/src/mint/afl-tests/id:000981,src:000003,op:int32,pos:98,val:-129,+cov b/src/exchange/afl-tests/id:000981,src:000003,op:int32,pos:98,val:-129,+cov similarity index 100% rename from src/mint/afl-tests/id:000981,src:000003,op:int32,pos:98,val:-129,+cov rename to src/exchange/afl-tests/id:000981,src:000003,op:int32,pos:98,val:-129,+cov diff --git a/src/mint/afl-tests/id:000982,src:000003,op:int32,pos:99,val:-32769,+cov b/src/exchange/afl-tests/id:000982,src:000003,op:int32,pos:99,val:-32769,+cov similarity index 100% rename from src/mint/afl-tests/id:000982,src:000003,op:int32,pos:99,val:-32769,+cov rename to src/exchange/afl-tests/id:000982,src:000003,op:int32,pos:99,val:-32769,+cov diff --git a/src/mint/afl-tests/id:000983,src:000003,op:int32,pos:99,val:+100663045,+cov b/src/exchange/afl-tests/id:000983,src:000003,op:int32,pos:99,val:+100663045,+cov similarity index 100% rename from src/mint/afl-tests/id:000983,src:000003,op:int32,pos:99,val:+100663045,+cov rename to src/exchange/afl-tests/id:000983,src:000003,op:int32,pos:99,val:+100663045,+cov diff --git a/src/mint/afl-tests/id:000984,src:000003,op:int32,pos:101,val:+64,+cov b/src/exchange/afl-tests/id:000984,src:000003,op:int32,pos:101,val:+64,+cov similarity index 100% rename from src/mint/afl-tests/id:000984,src:000003,op:int32,pos:101,val:+64,+cov rename to src/exchange/afl-tests/id:000984,src:000003,op:int32,pos:101,val:+64,+cov diff --git a/src/mint/afl-tests/id:000985,src:000003,op:int32,pos:102,val:be:+32,+cov b/src/exchange/afl-tests/id:000985,src:000003,op:int32,pos:102,val:be:+32,+cov similarity index 100% rename from src/mint/afl-tests/id:000985,src:000003,op:int32,pos:102,val:be:+32,+cov rename to src/exchange/afl-tests/id:000985,src:000003,op:int32,pos:102,val:be:+32,+cov diff --git a/src/mint/afl-tests/id:000986,src:000003,op:int32,pos:105,val:be:+512,+cov b/src/exchange/afl-tests/id:000986,src:000003,op:int32,pos:105,val:be:+512,+cov similarity index 100% rename from src/mint/afl-tests/id:000986,src:000003,op:int32,pos:105,val:be:+512,+cov rename to src/exchange/afl-tests/id:000986,src:000003,op:int32,pos:105,val:be:+512,+cov diff --git a/src/mint/afl-tests/id:000987,src:000003,op:int32,pos:106,val:+100,+cov b/src/exchange/afl-tests/id:000987,src:000003,op:int32,pos:106,val:+100,+cov similarity index 100% rename from src/mint/afl-tests/id:000987,src:000003,op:int32,pos:106,val:+100,+cov rename to src/exchange/afl-tests/id:000987,src:000003,op:int32,pos:106,val:+100,+cov diff --git a/src/mint/afl-tests/id:000988,src:000003,op:int32,pos:109,val:-100663046,+cov b/src/exchange/afl-tests/id:000988,src:000003,op:int32,pos:109,val:-100663046,+cov similarity index 100% rename from src/mint/afl-tests/id:000988,src:000003,op:int32,pos:109,val:-100663046,+cov rename to src/exchange/afl-tests/id:000988,src:000003,op:int32,pos:109,val:-100663046,+cov diff --git a/src/mint/afl-tests/id:000989,src:000003,op:int32,pos:120,val:+255,+cov b/src/exchange/afl-tests/id:000989,src:000003,op:int32,pos:120,val:+255,+cov similarity index 100% rename from src/mint/afl-tests/id:000989,src:000003,op:int32,pos:120,val:+255,+cov rename to src/exchange/afl-tests/id:000989,src:000003,op:int32,pos:120,val:+255,+cov diff --git a/src/mint/afl-tests/id:000990,src:000003,op:int32,pos:121,val:+1000,+cov b/src/exchange/afl-tests/id:000990,src:000003,op:int32,pos:121,val:+1000,+cov similarity index 100% rename from src/mint/afl-tests/id:000990,src:000003,op:int32,pos:121,val:+1000,+cov rename to src/exchange/afl-tests/id:000990,src:000003,op:int32,pos:121,val:+1000,+cov diff --git a/src/mint/afl-tests/id:000991,src:000003,op:int32,pos:121,val:-100663046,+cov b/src/exchange/afl-tests/id:000991,src:000003,op:int32,pos:121,val:-100663046,+cov similarity index 100% rename from src/mint/afl-tests/id:000991,src:000003,op:int32,pos:121,val:-100663046,+cov rename to src/exchange/afl-tests/id:000991,src:000003,op:int32,pos:121,val:-100663046,+cov diff --git a/src/mint/afl-tests/id:000992,src:000003,op:int32,pos:121,val:be:+65535,+cov b/src/exchange/afl-tests/id:000992,src:000003,op:int32,pos:121,val:be:+65535,+cov similarity index 100% rename from src/mint/afl-tests/id:000992,src:000003,op:int32,pos:121,val:be:+65535,+cov rename to src/exchange/afl-tests/id:000992,src:000003,op:int32,pos:121,val:be:+65535,+cov diff --git a/src/mint/afl-tests/id:000993,src:000003,op:int32,pos:130,val:+100663045,+cov b/src/exchange/afl-tests/id:000993,src:000003,op:int32,pos:130,val:+100663045,+cov similarity index 100% rename from src/mint/afl-tests/id:000993,src:000003,op:int32,pos:130,val:+100663045,+cov rename to src/exchange/afl-tests/id:000993,src:000003,op:int32,pos:130,val:+100663045,+cov diff --git a/src/mint/afl-tests/id:000994,src:000003,op:int32,pos:135,val:be:+32,+cov b/src/exchange/afl-tests/id:000994,src:000003,op:int32,pos:135,val:be:+32,+cov similarity index 100% rename from src/mint/afl-tests/id:000994,src:000003,op:int32,pos:135,val:be:+32,+cov rename to src/exchange/afl-tests/id:000994,src:000003,op:int32,pos:135,val:be:+32,+cov diff --git a/src/mint/afl-tests/id:000995,src:000003,op:int32,pos:136,val:be:+127,+cov b/src/exchange/afl-tests/id:000995,src:000003,op:int32,pos:136,val:be:+127,+cov similarity index 100% rename from src/mint/afl-tests/id:000995,src:000003,op:int32,pos:136,val:be:+127,+cov rename to src/exchange/afl-tests/id:000995,src:000003,op:int32,pos:136,val:be:+127,+cov diff --git a/src/mint/afl-tests/id:000996,src:000003,op:int32,pos:138,val:+1,+cov b/src/exchange/afl-tests/id:000996,src:000003,op:int32,pos:138,val:+1,+cov similarity index 100% rename from src/mint/afl-tests/id:000996,src:000003,op:int32,pos:138,val:+1,+cov rename to src/exchange/afl-tests/id:000996,src:000003,op:int32,pos:138,val:+1,+cov diff --git a/src/mint/afl-tests/id:000997,src:000003,op:int32,pos:147,val:be:+127,+cov b/src/exchange/afl-tests/id:000997,src:000003,op:int32,pos:147,val:be:+127,+cov similarity index 100% rename from src/mint/afl-tests/id:000997,src:000003,op:int32,pos:147,val:be:+127,+cov rename to src/exchange/afl-tests/id:000997,src:000003,op:int32,pos:147,val:be:+127,+cov diff --git a/src/mint/afl-tests/id:000998,src:000003,op:ext_AO,pos:29,+cov b/src/exchange/afl-tests/id:000998,src:000003,op:ext_AO,pos:29,+cov similarity index 100% rename from src/mint/afl-tests/id:000998,src:000003,op:ext_AO,pos:29,+cov rename to src/exchange/afl-tests/id:000998,src:000003,op:ext_AO,pos:29,+cov diff --git a/src/mint/afl-tests/id:000999,src:000003,op:ext_AO,pos:31,+cov b/src/exchange/afl-tests/id:000999,src:000003,op:ext_AO,pos:31,+cov similarity index 100% rename from src/mint/afl-tests/id:000999,src:000003,op:ext_AO,pos:31,+cov rename to src/exchange/afl-tests/id:000999,src:000003,op:ext_AO,pos:31,+cov diff --git a/src/mint/afl-tests/id:001000,src:000003,op:ext_AO,pos:37,+cov b/src/exchange/afl-tests/id:001000,src:000003,op:ext_AO,pos:37,+cov similarity index 100% rename from src/mint/afl-tests/id:001000,src:000003,op:ext_AO,pos:37,+cov rename to src/exchange/afl-tests/id:001000,src:000003,op:ext_AO,pos:37,+cov diff --git a/src/mint/afl-tests/id:001001,src:000003,op:ext_AO,pos:40,+cov b/src/exchange/afl-tests/id:001001,src:000003,op:ext_AO,pos:40,+cov similarity index 100% rename from src/mint/afl-tests/id:001001,src:000003,op:ext_AO,pos:40,+cov rename to src/exchange/afl-tests/id:001001,src:000003,op:ext_AO,pos:40,+cov diff --git a/src/mint/afl-tests/id:001002,src:000003,op:ext_AO,pos:44,+cov b/src/exchange/afl-tests/id:001002,src:000003,op:ext_AO,pos:44,+cov similarity index 100% rename from src/mint/afl-tests/id:001002,src:000003,op:ext_AO,pos:44,+cov rename to src/exchange/afl-tests/id:001002,src:000003,op:ext_AO,pos:44,+cov diff --git a/src/mint/afl-tests/id:001003,src:000003,op:ext_AO,pos:44,+cov b/src/exchange/afl-tests/id:001003,src:000003,op:ext_AO,pos:44,+cov similarity index 100% rename from src/mint/afl-tests/id:001003,src:000003,op:ext_AO,pos:44,+cov rename to src/exchange/afl-tests/id:001003,src:000003,op:ext_AO,pos:44,+cov diff --git a/src/mint/afl-tests/id:001004,src:000003,op:ext_AO,pos:51,+cov b/src/exchange/afl-tests/id:001004,src:000003,op:ext_AO,pos:51,+cov similarity index 100% rename from src/mint/afl-tests/id:001004,src:000003,op:ext_AO,pos:51,+cov rename to src/exchange/afl-tests/id:001004,src:000003,op:ext_AO,pos:51,+cov diff --git a/src/mint/afl-tests/id:001005,src:000003,op:ext_AO,pos:54,+cov b/src/exchange/afl-tests/id:001005,src:000003,op:ext_AO,pos:54,+cov similarity index 100% rename from src/mint/afl-tests/id:001005,src:000003,op:ext_AO,pos:54,+cov rename to src/exchange/afl-tests/id:001005,src:000003,op:ext_AO,pos:54,+cov diff --git a/src/mint/afl-tests/id:001006,src:000003,op:ext_AO,pos:55,+cov b/src/exchange/afl-tests/id:001006,src:000003,op:ext_AO,pos:55,+cov similarity index 100% rename from src/mint/afl-tests/id:001006,src:000003,op:ext_AO,pos:55,+cov rename to src/exchange/afl-tests/id:001006,src:000003,op:ext_AO,pos:55,+cov diff --git a/src/mint/afl-tests/id:001007,src:000003,op:ext_AO,pos:61,+cov b/src/exchange/afl-tests/id:001007,src:000003,op:ext_AO,pos:61,+cov similarity index 100% rename from src/mint/afl-tests/id:001007,src:000003,op:ext_AO,pos:61,+cov rename to src/exchange/afl-tests/id:001007,src:000003,op:ext_AO,pos:61,+cov diff --git a/src/mint/afl-tests/id:001008,src:000003,op:ext_AO,pos:64,+cov b/src/exchange/afl-tests/id:001008,src:000003,op:ext_AO,pos:64,+cov similarity index 100% rename from src/mint/afl-tests/id:001008,src:000003,op:ext_AO,pos:64,+cov rename to src/exchange/afl-tests/id:001008,src:000003,op:ext_AO,pos:64,+cov diff --git a/src/mint/afl-tests/id:001009,src:000003,op:ext_AO,pos:66,+cov b/src/exchange/afl-tests/id:001009,src:000003,op:ext_AO,pos:66,+cov similarity index 100% rename from src/mint/afl-tests/id:001009,src:000003,op:ext_AO,pos:66,+cov rename to src/exchange/afl-tests/id:001009,src:000003,op:ext_AO,pos:66,+cov diff --git a/src/mint/afl-tests/id:001010,src:000003,op:ext_AO,pos:67,+cov b/src/exchange/afl-tests/id:001010,src:000003,op:ext_AO,pos:67,+cov similarity index 100% rename from src/mint/afl-tests/id:001010,src:000003,op:ext_AO,pos:67,+cov rename to src/exchange/afl-tests/id:001010,src:000003,op:ext_AO,pos:67,+cov diff --git a/src/mint/afl-tests/id:001011,src:000003,op:ext_AO,pos:71,+cov b/src/exchange/afl-tests/id:001011,src:000003,op:ext_AO,pos:71,+cov similarity index 100% rename from src/mint/afl-tests/id:001011,src:000003,op:ext_AO,pos:71,+cov rename to src/exchange/afl-tests/id:001011,src:000003,op:ext_AO,pos:71,+cov diff --git a/src/mint/afl-tests/id:001012,src:000003,op:ext_AO,pos:80,+cov b/src/exchange/afl-tests/id:001012,src:000003,op:ext_AO,pos:80,+cov similarity index 100% rename from src/mint/afl-tests/id:001012,src:000003,op:ext_AO,pos:80,+cov rename to src/exchange/afl-tests/id:001012,src:000003,op:ext_AO,pos:80,+cov diff --git a/src/mint/afl-tests/id:001013,src:000003,op:ext_AO,pos:84,+cov b/src/exchange/afl-tests/id:001013,src:000003,op:ext_AO,pos:84,+cov similarity index 100% rename from src/mint/afl-tests/id:001013,src:000003,op:ext_AO,pos:84,+cov rename to src/exchange/afl-tests/id:001013,src:000003,op:ext_AO,pos:84,+cov diff --git a/src/mint/afl-tests/id:001014,src:000003,op:ext_AO,pos:84,+cov b/src/exchange/afl-tests/id:001014,src:000003,op:ext_AO,pos:84,+cov similarity index 100% rename from src/mint/afl-tests/id:001014,src:000003,op:ext_AO,pos:84,+cov rename to src/exchange/afl-tests/id:001014,src:000003,op:ext_AO,pos:84,+cov diff --git a/src/mint/afl-tests/id:001015,src:000003,op:ext_AO,pos:85,+cov b/src/exchange/afl-tests/id:001015,src:000003,op:ext_AO,pos:85,+cov similarity index 100% rename from src/mint/afl-tests/id:001015,src:000003,op:ext_AO,pos:85,+cov rename to src/exchange/afl-tests/id:001015,src:000003,op:ext_AO,pos:85,+cov diff --git a/src/mint/afl-tests/id:001016,src:000003,op:ext_AO,pos:86,+cov b/src/exchange/afl-tests/id:001016,src:000003,op:ext_AO,pos:86,+cov similarity index 100% rename from src/mint/afl-tests/id:001016,src:000003,op:ext_AO,pos:86,+cov rename to src/exchange/afl-tests/id:001016,src:000003,op:ext_AO,pos:86,+cov diff --git a/src/mint/afl-tests/id:001017,src:000003,op:ext_AO,pos:89,+cov b/src/exchange/afl-tests/id:001017,src:000003,op:ext_AO,pos:89,+cov similarity index 100% rename from src/mint/afl-tests/id:001017,src:000003,op:ext_AO,pos:89,+cov rename to src/exchange/afl-tests/id:001017,src:000003,op:ext_AO,pos:89,+cov diff --git a/src/mint/afl-tests/id:001018,src:000003,op:ext_AO,pos:90,+cov b/src/exchange/afl-tests/id:001018,src:000003,op:ext_AO,pos:90,+cov similarity index 100% rename from src/mint/afl-tests/id:001018,src:000003,op:ext_AO,pos:90,+cov rename to src/exchange/afl-tests/id:001018,src:000003,op:ext_AO,pos:90,+cov diff --git a/src/mint/afl-tests/id:001019,src:000003,op:ext_AO,pos:90,+cov b/src/exchange/afl-tests/id:001019,src:000003,op:ext_AO,pos:90,+cov similarity index 100% rename from src/mint/afl-tests/id:001019,src:000003,op:ext_AO,pos:90,+cov rename to src/exchange/afl-tests/id:001019,src:000003,op:ext_AO,pos:90,+cov diff --git a/src/mint/afl-tests/id:001020,src:000003,op:ext_AO,pos:101,+cov b/src/exchange/afl-tests/id:001020,src:000003,op:ext_AO,pos:101,+cov similarity index 100% rename from src/mint/afl-tests/id:001020,src:000003,op:ext_AO,pos:101,+cov rename to src/exchange/afl-tests/id:001020,src:000003,op:ext_AO,pos:101,+cov diff --git a/src/mint/afl-tests/id:001021,src:000003,op:ext_AO,pos:102,+cov b/src/exchange/afl-tests/id:001021,src:000003,op:ext_AO,pos:102,+cov similarity index 100% rename from src/mint/afl-tests/id:001021,src:000003,op:ext_AO,pos:102,+cov rename to src/exchange/afl-tests/id:001021,src:000003,op:ext_AO,pos:102,+cov diff --git a/src/mint/afl-tests/id:001022,src:000003,op:ext_AO,pos:103,+cov b/src/exchange/afl-tests/id:001022,src:000003,op:ext_AO,pos:103,+cov similarity index 100% rename from src/mint/afl-tests/id:001022,src:000003,op:ext_AO,pos:103,+cov rename to src/exchange/afl-tests/id:001022,src:000003,op:ext_AO,pos:103,+cov diff --git a/src/mint/afl-tests/id:001023,src:000003,op:ext_AO,pos:106,+cov b/src/exchange/afl-tests/id:001023,src:000003,op:ext_AO,pos:106,+cov similarity index 100% rename from src/mint/afl-tests/id:001023,src:000003,op:ext_AO,pos:106,+cov rename to src/exchange/afl-tests/id:001023,src:000003,op:ext_AO,pos:106,+cov diff --git a/src/mint/afl-tests/id:001024,src:000003,op:ext_AO,pos:107,+cov b/src/exchange/afl-tests/id:001024,src:000003,op:ext_AO,pos:107,+cov similarity index 100% rename from src/mint/afl-tests/id:001024,src:000003,op:ext_AO,pos:107,+cov rename to src/exchange/afl-tests/id:001024,src:000003,op:ext_AO,pos:107,+cov diff --git a/src/mint/afl-tests/id:001025,src:000003,op:ext_AO,pos:109,+cov b/src/exchange/afl-tests/id:001025,src:000003,op:ext_AO,pos:109,+cov similarity index 100% rename from src/mint/afl-tests/id:001025,src:000003,op:ext_AO,pos:109,+cov rename to src/exchange/afl-tests/id:001025,src:000003,op:ext_AO,pos:109,+cov diff --git a/src/mint/afl-tests/id:001026,src:000003,op:ext_AO,pos:109,+cov b/src/exchange/afl-tests/id:001026,src:000003,op:ext_AO,pos:109,+cov similarity index 100% rename from src/mint/afl-tests/id:001026,src:000003,op:ext_AO,pos:109,+cov rename to src/exchange/afl-tests/id:001026,src:000003,op:ext_AO,pos:109,+cov diff --git a/src/mint/afl-tests/id:001027,src:000003,op:ext_AO,pos:113,+cov b/src/exchange/afl-tests/id:001027,src:000003,op:ext_AO,pos:113,+cov similarity index 100% rename from src/mint/afl-tests/id:001027,src:000003,op:ext_AO,pos:113,+cov rename to src/exchange/afl-tests/id:001027,src:000003,op:ext_AO,pos:113,+cov diff --git a/src/mint/afl-tests/id:001028,src:000003,op:ext_AO,pos:117,+cov b/src/exchange/afl-tests/id:001028,src:000003,op:ext_AO,pos:117,+cov similarity index 100% rename from src/mint/afl-tests/id:001028,src:000003,op:ext_AO,pos:117,+cov rename to src/exchange/afl-tests/id:001028,src:000003,op:ext_AO,pos:117,+cov diff --git a/src/mint/afl-tests/id:001029,src:000003,op:ext_AO,pos:122,+cov b/src/exchange/afl-tests/id:001029,src:000003,op:ext_AO,pos:122,+cov similarity index 100% rename from src/mint/afl-tests/id:001029,src:000003,op:ext_AO,pos:122,+cov rename to src/exchange/afl-tests/id:001029,src:000003,op:ext_AO,pos:122,+cov diff --git a/src/mint/afl-tests/id:001030,src:000003,op:ext_AO,pos:122,+cov b/src/exchange/afl-tests/id:001030,src:000003,op:ext_AO,pos:122,+cov similarity index 100% rename from src/mint/afl-tests/id:001030,src:000003,op:ext_AO,pos:122,+cov rename to src/exchange/afl-tests/id:001030,src:000003,op:ext_AO,pos:122,+cov diff --git a/src/mint/afl-tests/id:001031,src:000003,op:ext_AO,pos:124,+cov b/src/exchange/afl-tests/id:001031,src:000003,op:ext_AO,pos:124,+cov similarity index 100% rename from src/mint/afl-tests/id:001031,src:000003,op:ext_AO,pos:124,+cov rename to src/exchange/afl-tests/id:001031,src:000003,op:ext_AO,pos:124,+cov diff --git a/src/mint/afl-tests/id:001032,src:000003,op:ext_AO,pos:125,+cov b/src/exchange/afl-tests/id:001032,src:000003,op:ext_AO,pos:125,+cov similarity index 100% rename from src/mint/afl-tests/id:001032,src:000003,op:ext_AO,pos:125,+cov rename to src/exchange/afl-tests/id:001032,src:000003,op:ext_AO,pos:125,+cov diff --git a/src/mint/afl-tests/id:001033,src:000003,op:ext_AO,pos:125,+cov b/src/exchange/afl-tests/id:001033,src:000003,op:ext_AO,pos:125,+cov similarity index 100% rename from src/mint/afl-tests/id:001033,src:000003,op:ext_AO,pos:125,+cov rename to src/exchange/afl-tests/id:001033,src:000003,op:ext_AO,pos:125,+cov diff --git a/src/mint/afl-tests/id:001034,src:000003,op:ext_AO,pos:126,+cov b/src/exchange/afl-tests/id:001034,src:000003,op:ext_AO,pos:126,+cov similarity index 100% rename from src/mint/afl-tests/id:001034,src:000003,op:ext_AO,pos:126,+cov rename to src/exchange/afl-tests/id:001034,src:000003,op:ext_AO,pos:126,+cov diff --git a/src/mint/afl-tests/id:001035,src:000003,op:ext_AO,pos:126,+cov b/src/exchange/afl-tests/id:001035,src:000003,op:ext_AO,pos:126,+cov similarity index 100% rename from src/mint/afl-tests/id:001035,src:000003,op:ext_AO,pos:126,+cov rename to src/exchange/afl-tests/id:001035,src:000003,op:ext_AO,pos:126,+cov diff --git a/src/mint/afl-tests/id:001036,src:000003,op:ext_AO,pos:129,+cov b/src/exchange/afl-tests/id:001036,src:000003,op:ext_AO,pos:129,+cov similarity index 100% rename from src/mint/afl-tests/id:001036,src:000003,op:ext_AO,pos:129,+cov rename to src/exchange/afl-tests/id:001036,src:000003,op:ext_AO,pos:129,+cov diff --git a/src/mint/afl-tests/id:001037,src:000003,op:ext_AO,pos:129,+cov b/src/exchange/afl-tests/id:001037,src:000003,op:ext_AO,pos:129,+cov similarity index 100% rename from src/mint/afl-tests/id:001037,src:000003,op:ext_AO,pos:129,+cov rename to src/exchange/afl-tests/id:001037,src:000003,op:ext_AO,pos:129,+cov diff --git a/src/mint/afl-tests/id:001038,src:000003,op:ext_AO,pos:130,+cov b/src/exchange/afl-tests/id:001038,src:000003,op:ext_AO,pos:130,+cov similarity index 100% rename from src/mint/afl-tests/id:001038,src:000003,op:ext_AO,pos:130,+cov rename to src/exchange/afl-tests/id:001038,src:000003,op:ext_AO,pos:130,+cov diff --git a/src/mint/afl-tests/id:001039,src:000003,op:ext_AO,pos:135,+cov b/src/exchange/afl-tests/id:001039,src:000003,op:ext_AO,pos:135,+cov similarity index 100% rename from src/mint/afl-tests/id:001039,src:000003,op:ext_AO,pos:135,+cov rename to src/exchange/afl-tests/id:001039,src:000003,op:ext_AO,pos:135,+cov diff --git a/src/mint/afl-tests/id:001040,src:000003,op:ext_AO,pos:136,+cov b/src/exchange/afl-tests/id:001040,src:000003,op:ext_AO,pos:136,+cov similarity index 100% rename from src/mint/afl-tests/id:001040,src:000003,op:ext_AO,pos:136,+cov rename to src/exchange/afl-tests/id:001040,src:000003,op:ext_AO,pos:136,+cov diff --git a/src/mint/afl-tests/id:001041,src:000003,op:ext_AO,pos:140,+cov b/src/exchange/afl-tests/id:001041,src:000003,op:ext_AO,pos:140,+cov similarity index 100% rename from src/mint/afl-tests/id:001041,src:000003,op:ext_AO,pos:140,+cov rename to src/exchange/afl-tests/id:001041,src:000003,op:ext_AO,pos:140,+cov diff --git a/src/mint/afl-tests/id:001042,src:000003,op:ext_AO,pos:142,+cov b/src/exchange/afl-tests/id:001042,src:000003,op:ext_AO,pos:142,+cov similarity index 100% rename from src/mint/afl-tests/id:001042,src:000003,op:ext_AO,pos:142,+cov rename to src/exchange/afl-tests/id:001042,src:000003,op:ext_AO,pos:142,+cov diff --git a/src/mint/afl-tests/id:001043,src:000003,op:ext_AO,pos:142,+cov b/src/exchange/afl-tests/id:001043,src:000003,op:ext_AO,pos:142,+cov similarity index 100% rename from src/mint/afl-tests/id:001043,src:000003,op:ext_AO,pos:142,+cov rename to src/exchange/afl-tests/id:001043,src:000003,op:ext_AO,pos:142,+cov diff --git a/src/mint/afl-tests/id:001044,src:000003,op:ext_AO,pos:145,+cov b/src/exchange/afl-tests/id:001044,src:000003,op:ext_AO,pos:145,+cov similarity index 100% rename from src/mint/afl-tests/id:001044,src:000003,op:ext_AO,pos:145,+cov rename to src/exchange/afl-tests/id:001044,src:000003,op:ext_AO,pos:145,+cov diff --git a/src/mint/afl-tests/id:001045,src:000003,op:ext_AO,pos:147,+cov b/src/exchange/afl-tests/id:001045,src:000003,op:ext_AO,pos:147,+cov similarity index 100% rename from src/mint/afl-tests/id:001045,src:000003,op:ext_AO,pos:147,+cov rename to src/exchange/afl-tests/id:001045,src:000003,op:ext_AO,pos:147,+cov diff --git a/src/mint/afl-tests/id:001046,src:000003,op:ext_AO,pos:149,+cov b/src/exchange/afl-tests/id:001046,src:000003,op:ext_AO,pos:149,+cov similarity index 100% rename from src/mint/afl-tests/id:001046,src:000003,op:ext_AO,pos:149,+cov rename to src/exchange/afl-tests/id:001046,src:000003,op:ext_AO,pos:149,+cov diff --git a/src/mint/afl-tests/id:001047,src:000004,op:flip1,pos:0,+cov b/src/exchange/afl-tests/id:001047,src:000004,op:flip1,pos:0,+cov similarity index 100% rename from src/mint/afl-tests/id:001047,src:000004,op:flip1,pos:0,+cov rename to src/exchange/afl-tests/id:001047,src:000004,op:flip1,pos:0,+cov diff --git a/src/mint/afl-tests/id:001048,src:000004,op:flip1,pos:4,+cov b/src/exchange/afl-tests/id:001048,src:000004,op:flip1,pos:4,+cov similarity index 100% rename from src/mint/afl-tests/id:001048,src:000004,op:flip1,pos:4,+cov rename to src/exchange/afl-tests/id:001048,src:000004,op:flip1,pos:4,+cov diff --git a/src/mint/afl-tests/id:001049,src:000004,op:flip1,pos:4 b/src/exchange/afl-tests/id:001049,src:000004,op:flip1,pos:4 similarity index 100% rename from src/mint/afl-tests/id:001049,src:000004,op:flip1,pos:4 rename to src/exchange/afl-tests/id:001049,src:000004,op:flip1,pos:4 diff --git a/src/mint/afl-tests/id:001050,src:000004,op:flip1,pos:18 b/src/exchange/afl-tests/id:001050,src:000004,op:flip1,pos:18 similarity index 100% rename from src/mint/afl-tests/id:001050,src:000004,op:flip1,pos:18 rename to src/exchange/afl-tests/id:001050,src:000004,op:flip1,pos:18 diff --git a/src/mint/afl-tests/id:001051,src:000004,op:flip1,pos:55,+cov b/src/exchange/afl-tests/id:001051,src:000004,op:flip1,pos:55,+cov similarity index 100% rename from src/mint/afl-tests/id:001051,src:000004,op:flip1,pos:55,+cov rename to src/exchange/afl-tests/id:001051,src:000004,op:flip1,pos:55,+cov diff --git a/src/mint/afl-tests/id:001052,src:000004,op:flip1,pos:59 b/src/exchange/afl-tests/id:001052,src:000004,op:flip1,pos:59 similarity index 100% rename from src/mint/afl-tests/id:001052,src:000004,op:flip1,pos:59 rename to src/exchange/afl-tests/id:001052,src:000004,op:flip1,pos:59 diff --git a/src/mint/afl-tests/id:001053,src:000004,op:flip1,pos:87,+cov b/src/exchange/afl-tests/id:001053,src:000004,op:flip1,pos:87,+cov similarity index 100% rename from src/mint/afl-tests/id:001053,src:000004,op:flip1,pos:87,+cov rename to src/exchange/afl-tests/id:001053,src:000004,op:flip1,pos:87,+cov diff --git a/src/mint/afl-tests/id:001054,src:000004,op:flip1,pos:89 b/src/exchange/afl-tests/id:001054,src:000004,op:flip1,pos:89 similarity index 100% rename from src/mint/afl-tests/id:001054,src:000004,op:flip1,pos:89 rename to src/exchange/afl-tests/id:001054,src:000004,op:flip1,pos:89 diff --git a/src/mint/afl-tests/id:001055,src:000004,op:flip1,pos:106,+cov b/src/exchange/afl-tests/id:001055,src:000004,op:flip1,pos:106,+cov similarity index 100% rename from src/mint/afl-tests/id:001055,src:000004,op:flip1,pos:106,+cov rename to src/exchange/afl-tests/id:001055,src:000004,op:flip1,pos:106,+cov diff --git a/src/mint/afl-tests/id:001056,src:000004,op:flip1,pos:108 b/src/exchange/afl-tests/id:001056,src:000004,op:flip1,pos:108 similarity index 100% rename from src/mint/afl-tests/id:001056,src:000004,op:flip1,pos:108 rename to src/exchange/afl-tests/id:001056,src:000004,op:flip1,pos:108 diff --git a/src/mint/afl-tests/id:001057,src:000004,op:flip1,pos:108 b/src/exchange/afl-tests/id:001057,src:000004,op:flip1,pos:108 similarity index 100% rename from src/mint/afl-tests/id:001057,src:000004,op:flip1,pos:108 rename to src/exchange/afl-tests/id:001057,src:000004,op:flip1,pos:108 diff --git a/src/mint/afl-tests/id:001058,src:000004,op:flip1,pos:110 b/src/exchange/afl-tests/id:001058,src:000004,op:flip1,pos:110 similarity index 100% rename from src/mint/afl-tests/id:001058,src:000004,op:flip1,pos:110 rename to src/exchange/afl-tests/id:001058,src:000004,op:flip1,pos:110 diff --git a/src/mint/afl-tests/id:001059,src:000004,op:flip1,pos:111,+cov b/src/exchange/afl-tests/id:001059,src:000004,op:flip1,pos:111,+cov similarity index 100% rename from src/mint/afl-tests/id:001059,src:000004,op:flip1,pos:111,+cov rename to src/exchange/afl-tests/id:001059,src:000004,op:flip1,pos:111,+cov diff --git a/src/mint/afl-tests/id:001060,src:000004,op:flip1,pos:112 b/src/exchange/afl-tests/id:001060,src:000004,op:flip1,pos:112 similarity index 100% rename from src/mint/afl-tests/id:001060,src:000004,op:flip1,pos:112 rename to src/exchange/afl-tests/id:001060,src:000004,op:flip1,pos:112 diff --git a/src/mint/afl-tests/id:001061,src:000004,op:flip1,pos:134,+cov b/src/exchange/afl-tests/id:001061,src:000004,op:flip1,pos:134,+cov similarity index 100% rename from src/mint/afl-tests/id:001061,src:000004,op:flip1,pos:134,+cov rename to src/exchange/afl-tests/id:001061,src:000004,op:flip1,pos:134,+cov diff --git a/src/mint/afl-tests/id:001062,src:000004,op:flip1,pos:138,+cov b/src/exchange/afl-tests/id:001062,src:000004,op:flip1,pos:138,+cov similarity index 100% rename from src/mint/afl-tests/id:001062,src:000004,op:flip1,pos:138,+cov rename to src/exchange/afl-tests/id:001062,src:000004,op:flip1,pos:138,+cov diff --git a/src/mint/afl-tests/id:001063,src:000004,op:flip1,pos:152,+cov b/src/exchange/afl-tests/id:001063,src:000004,op:flip1,pos:152,+cov similarity index 100% rename from src/mint/afl-tests/id:001063,src:000004,op:flip1,pos:152,+cov rename to src/exchange/afl-tests/id:001063,src:000004,op:flip1,pos:152,+cov diff --git a/src/mint/afl-tests/id:001064,src:000004,op:flip1,pos:154,+cov b/src/exchange/afl-tests/id:001064,src:000004,op:flip1,pos:154,+cov similarity index 100% rename from src/mint/afl-tests/id:001064,src:000004,op:flip1,pos:154,+cov rename to src/exchange/afl-tests/id:001064,src:000004,op:flip1,pos:154,+cov diff --git a/src/mint/afl-tests/id:001065,src:000004,op:flip1,pos:475,+cov b/src/exchange/afl-tests/id:001065,src:000004,op:flip1,pos:475,+cov similarity index 100% rename from src/mint/afl-tests/id:001065,src:000004,op:flip1,pos:475,+cov rename to src/exchange/afl-tests/id:001065,src:000004,op:flip1,pos:475,+cov diff --git a/src/mint/afl-tests/id:001066,src:000004,op:flip1,pos:651,+cov b/src/exchange/afl-tests/id:001066,src:000004,op:flip1,pos:651,+cov similarity index 100% rename from src/mint/afl-tests/id:001066,src:000004,op:flip1,pos:651,+cov rename to src/exchange/afl-tests/id:001066,src:000004,op:flip1,pos:651,+cov diff --git a/src/mint/afl-tests/id:001067,src:000004,op:flip1,pos:783,+cov b/src/exchange/afl-tests/id:001067,src:000004,op:flip1,pos:783,+cov similarity index 100% rename from src/mint/afl-tests/id:001067,src:000004,op:flip1,pos:783,+cov rename to src/exchange/afl-tests/id:001067,src:000004,op:flip1,pos:783,+cov diff --git a/src/mint/afl-tests/id:001068,src:000004,op:flip1,pos:1150 b/src/exchange/afl-tests/id:001068,src:000004,op:flip1,pos:1150 similarity index 100% rename from src/mint/afl-tests/id:001068,src:000004,op:flip1,pos:1150 rename to src/exchange/afl-tests/id:001068,src:000004,op:flip1,pos:1150 diff --git a/src/mint/afl-tests/id:001069,src:000004,op:flip1,pos:1278,+cov b/src/exchange/afl-tests/id:001069,src:000004,op:flip1,pos:1278,+cov similarity index 100% rename from src/mint/afl-tests/id:001069,src:000004,op:flip1,pos:1278,+cov rename to src/exchange/afl-tests/id:001069,src:000004,op:flip1,pos:1278,+cov diff --git a/src/mint/afl-tests/id:001070,src:000004,op:flip1,pos:1649 b/src/exchange/afl-tests/id:001070,src:000004,op:flip1,pos:1649 similarity index 100% rename from src/mint/afl-tests/id:001070,src:000004,op:flip1,pos:1649 rename to src/exchange/afl-tests/id:001070,src:000004,op:flip1,pos:1649 diff --git a/src/mint/afl-tests/id:001071,src:000004,op:flip1,pos:1662,+cov b/src/exchange/afl-tests/id:001071,src:000004,op:flip1,pos:1662,+cov similarity index 100% rename from src/mint/afl-tests/id:001071,src:000004,op:flip1,pos:1662,+cov rename to src/exchange/afl-tests/id:001071,src:000004,op:flip1,pos:1662,+cov diff --git a/src/mint/afl-tests/id:001072,src:000004,op:flip1,pos:2148 b/src/exchange/afl-tests/id:001072,src:000004,op:flip1,pos:2148 similarity index 100% rename from src/mint/afl-tests/id:001072,src:000004,op:flip1,pos:2148 rename to src/exchange/afl-tests/id:001072,src:000004,op:flip1,pos:2148 diff --git a/src/mint/afl-tests/id:001073,src:000004,op:flip1,pos:2437,+cov b/src/exchange/afl-tests/id:001073,src:000004,op:flip1,pos:2437,+cov similarity index 100% rename from src/mint/afl-tests/id:001073,src:000004,op:flip1,pos:2437,+cov rename to src/exchange/afl-tests/id:001073,src:000004,op:flip1,pos:2437,+cov diff --git a/src/mint/afl-tests/id:001074,src:000004,op:flip1,pos:2647 b/src/exchange/afl-tests/id:001074,src:000004,op:flip1,pos:2647 similarity index 100% rename from src/mint/afl-tests/id:001074,src:000004,op:flip1,pos:2647 rename to src/exchange/afl-tests/id:001074,src:000004,op:flip1,pos:2647 diff --git a/src/mint/afl-tests/id:001075,src:000004,op:flip1,pos:3146 b/src/exchange/afl-tests/id:001075,src:000004,op:flip1,pos:3146 similarity index 100% rename from src/mint/afl-tests/id:001075,src:000004,op:flip1,pos:3146 rename to src/exchange/afl-tests/id:001075,src:000004,op:flip1,pos:3146 diff --git a/src/mint/afl-tests/id:001076,src:000004,op:flip1,pos:3205,+cov b/src/exchange/afl-tests/id:001076,src:000004,op:flip1,pos:3205,+cov similarity index 100% rename from src/mint/afl-tests/id:001076,src:000004,op:flip1,pos:3205,+cov rename to src/exchange/afl-tests/id:001076,src:000004,op:flip1,pos:3205,+cov diff --git a/src/mint/afl-tests/id:001077,src:000004,op:flip1,pos:3645 b/src/exchange/afl-tests/id:001077,src:000004,op:flip1,pos:3645 similarity index 100% rename from src/mint/afl-tests/id:001077,src:000004,op:flip1,pos:3645 rename to src/exchange/afl-tests/id:001077,src:000004,op:flip1,pos:3645 diff --git a/src/mint/afl-tests/id:001078,src:000004,op:flip1,pos:3980,+cov b/src/exchange/afl-tests/id:001078,src:000004,op:flip1,pos:3980,+cov similarity index 100% rename from src/mint/afl-tests/id:001078,src:000004,op:flip1,pos:3980,+cov rename to src/exchange/afl-tests/id:001078,src:000004,op:flip1,pos:3980,+cov diff --git a/src/mint/afl-tests/id:001079,src:000004,op:flip1,pos:4144 b/src/exchange/afl-tests/id:001079,src:000004,op:flip1,pos:4144 similarity index 100% rename from src/mint/afl-tests/id:001079,src:000004,op:flip1,pos:4144 rename to src/exchange/afl-tests/id:001079,src:000004,op:flip1,pos:4144 diff --git a/src/mint/afl-tests/id:001080,src:000004,op:flip1,pos:4198,+cov b/src/exchange/afl-tests/id:001080,src:000004,op:flip1,pos:4198,+cov similarity index 100% rename from src/mint/afl-tests/id:001080,src:000004,op:flip1,pos:4198,+cov rename to src/exchange/afl-tests/id:001080,src:000004,op:flip1,pos:4198,+cov diff --git a/src/mint/afl-tests/id:001081,src:000004,op:flip1,pos:4249,+cov b/src/exchange/afl-tests/id:001081,src:000004,op:flip1,pos:4249,+cov similarity index 100% rename from src/mint/afl-tests/id:001081,src:000004,op:flip1,pos:4249,+cov rename to src/exchange/afl-tests/id:001081,src:000004,op:flip1,pos:4249,+cov diff --git a/src/mint/afl-tests/id:001082,src:000004,op:flip1,pos:4291,+cov b/src/exchange/afl-tests/id:001082,src:000004,op:flip1,pos:4291,+cov similarity index 100% rename from src/mint/afl-tests/id:001082,src:000004,op:flip1,pos:4291,+cov rename to src/exchange/afl-tests/id:001082,src:000004,op:flip1,pos:4291,+cov diff --git a/src/mint/afl-tests/id:001083,src:000004,op:flip1,pos:4673,+cov b/src/exchange/afl-tests/id:001083,src:000004,op:flip1,pos:4673,+cov similarity index 100% rename from src/mint/afl-tests/id:001083,src:000004,op:flip1,pos:4673,+cov rename to src/exchange/afl-tests/id:001083,src:000004,op:flip1,pos:4673,+cov diff --git a/src/mint/afl-tests/id:001084,src:000004,op:flip1,pos:5206,+cov b/src/exchange/afl-tests/id:001084,src:000004,op:flip1,pos:5206,+cov similarity index 100% rename from src/mint/afl-tests/id:001084,src:000004,op:flip1,pos:5206,+cov rename to src/exchange/afl-tests/id:001084,src:000004,op:flip1,pos:5206,+cov diff --git a/src/mint/afl-tests/id:001085,src:000004,op:flip1,pos:5361,+cov b/src/exchange/afl-tests/id:001085,src:000004,op:flip1,pos:5361,+cov similarity index 100% rename from src/mint/afl-tests/id:001085,src:000004,op:flip1,pos:5361,+cov rename to src/exchange/afl-tests/id:001085,src:000004,op:flip1,pos:5361,+cov diff --git a/src/mint/afl-tests/id:001086,src:000004,op:flip1,pos:5362 b/src/exchange/afl-tests/id:001086,src:000004,op:flip1,pos:5362 similarity index 100% rename from src/mint/afl-tests/id:001086,src:000004,op:flip1,pos:5362 rename to src/exchange/afl-tests/id:001086,src:000004,op:flip1,pos:5362 diff --git a/src/mint/afl-tests/id:001087,src:000004,op:flip1,pos:5507,+cov b/src/exchange/afl-tests/id:001087,src:000004,op:flip1,pos:5507,+cov similarity index 100% rename from src/mint/afl-tests/id:001087,src:000004,op:flip1,pos:5507,+cov rename to src/exchange/afl-tests/id:001087,src:000004,op:flip1,pos:5507,+cov diff --git a/src/mint/afl-tests/id:001088,src:000004,op:flip1,pos:6639 b/src/exchange/afl-tests/id:001088,src:000004,op:flip1,pos:6639 similarity index 100% rename from src/mint/afl-tests/id:001088,src:000004,op:flip1,pos:6639 rename to src/exchange/afl-tests/id:001088,src:000004,op:flip1,pos:6639 diff --git a/src/mint/afl-tests/id:001089,src:000004,op:flip1,pos:7138 b/src/exchange/afl-tests/id:001089,src:000004,op:flip1,pos:7138 similarity index 100% rename from src/mint/afl-tests/id:001089,src:000004,op:flip1,pos:7138 rename to src/exchange/afl-tests/id:001089,src:000004,op:flip1,pos:7138 diff --git a/src/mint/afl-tests/id:001090,src:000004,op:flip1,pos:8027,+cov b/src/exchange/afl-tests/id:001090,src:000004,op:flip1,pos:8027,+cov similarity index 100% rename from src/mint/afl-tests/id:001090,src:000004,op:flip1,pos:8027,+cov rename to src/exchange/afl-tests/id:001090,src:000004,op:flip1,pos:8027,+cov diff --git a/src/mint/afl-tests/id:001091,src:000004,op:flip1,pos:8136 b/src/exchange/afl-tests/id:001091,src:000004,op:flip1,pos:8136 similarity index 100% rename from src/mint/afl-tests/id:001091,src:000004,op:flip1,pos:8136 rename to src/exchange/afl-tests/id:001091,src:000004,op:flip1,pos:8136 diff --git a/src/mint/afl-tests/id:001092,src:000004,op:flip1,pos:8636 b/src/exchange/afl-tests/id:001092,src:000004,op:flip1,pos:8636 similarity index 100% rename from src/mint/afl-tests/id:001092,src:000004,op:flip1,pos:8636 rename to src/exchange/afl-tests/id:001092,src:000004,op:flip1,pos:8636 diff --git a/src/mint/afl-tests/id:001093,src:000004,op:flip1,pos:8655,+cov b/src/exchange/afl-tests/id:001093,src:000004,op:flip1,pos:8655,+cov similarity index 100% rename from src/mint/afl-tests/id:001093,src:000004,op:flip1,pos:8655,+cov rename to src/exchange/afl-tests/id:001093,src:000004,op:flip1,pos:8655,+cov diff --git a/src/mint/afl-tests/id:001094,src:000004,op:flip1,pos:8712 b/src/exchange/afl-tests/id:001094,src:000004,op:flip1,pos:8712 similarity index 100% rename from src/mint/afl-tests/id:001094,src:000004,op:flip1,pos:8712 rename to src/exchange/afl-tests/id:001094,src:000004,op:flip1,pos:8712 diff --git a/src/mint/afl-tests/id:001095,src:000004,op:flip1,pos:8768 b/src/exchange/afl-tests/id:001095,src:000004,op:flip1,pos:8768 similarity index 100% rename from src/mint/afl-tests/id:001095,src:000004,op:flip1,pos:8768 rename to src/exchange/afl-tests/id:001095,src:000004,op:flip1,pos:8768 diff --git a/src/mint/afl-tests/id:001096,src:000004,op:flip1,pos:8825 b/src/exchange/afl-tests/id:001096,src:000004,op:flip1,pos:8825 similarity index 100% rename from src/mint/afl-tests/id:001096,src:000004,op:flip1,pos:8825 rename to src/exchange/afl-tests/id:001096,src:000004,op:flip1,pos:8825 diff --git a/src/mint/afl-tests/id:001097,src:000004,op:flip1,pos:8840,+cov b/src/exchange/afl-tests/id:001097,src:000004,op:flip1,pos:8840,+cov similarity index 100% rename from src/mint/afl-tests/id:001097,src:000004,op:flip1,pos:8840,+cov rename to src/exchange/afl-tests/id:001097,src:000004,op:flip1,pos:8840,+cov diff --git a/src/mint/afl-tests/id:001098,src:000004,op:flip1,pos:8869,+cov b/src/exchange/afl-tests/id:001098,src:000004,op:flip1,pos:8869,+cov similarity index 100% rename from src/mint/afl-tests/id:001098,src:000004,op:flip1,pos:8869,+cov rename to src/exchange/afl-tests/id:001098,src:000004,op:flip1,pos:8869,+cov diff --git a/src/mint/afl-tests/id:001099,src:000004,op:flip1,pos:8882,+cov b/src/exchange/afl-tests/id:001099,src:000004,op:flip1,pos:8882,+cov similarity index 100% rename from src/mint/afl-tests/id:001099,src:000004,op:flip1,pos:8882,+cov rename to src/exchange/afl-tests/id:001099,src:000004,op:flip1,pos:8882,+cov diff --git a/src/mint/afl-tests/id:001100,src:000004,op:flip1,pos:8910,+cov b/src/exchange/afl-tests/id:001100,src:000004,op:flip1,pos:8910,+cov similarity index 100% rename from src/mint/afl-tests/id:001100,src:000004,op:flip1,pos:8910,+cov rename to src/exchange/afl-tests/id:001100,src:000004,op:flip1,pos:8910,+cov diff --git a/src/mint/afl-tests/id:001101,src:000004,op:flip1,pos:9001,+cov b/src/exchange/afl-tests/id:001101,src:000004,op:flip1,pos:9001,+cov similarity index 100% rename from src/mint/afl-tests/id:001101,src:000004,op:flip1,pos:9001,+cov rename to src/exchange/afl-tests/id:001101,src:000004,op:flip1,pos:9001,+cov diff --git a/src/mint/afl-tests/id:001102,src:000004,op:flip1,pos:9584,+cov b/src/exchange/afl-tests/id:001102,src:000004,op:flip1,pos:9584,+cov similarity index 100% rename from src/mint/afl-tests/id:001102,src:000004,op:flip1,pos:9584,+cov rename to src/exchange/afl-tests/id:001102,src:000004,op:flip1,pos:9584,+cov diff --git a/src/mint/afl-tests/id:001103,src:000004,op:flip1,pos:9658,+cov b/src/exchange/afl-tests/id:001103,src:000004,op:flip1,pos:9658,+cov similarity index 100% rename from src/mint/afl-tests/id:001103,src:000004,op:flip1,pos:9658,+cov rename to src/exchange/afl-tests/id:001103,src:000004,op:flip1,pos:9658,+cov diff --git a/src/mint/afl-tests/id:001104,src:000004,op:flip1,pos:9808,+cov b/src/exchange/afl-tests/id:001104,src:000004,op:flip1,pos:9808,+cov similarity index 100% rename from src/mint/afl-tests/id:001104,src:000004,op:flip1,pos:9808,+cov rename to src/exchange/afl-tests/id:001104,src:000004,op:flip1,pos:9808,+cov diff --git a/src/mint/afl-tests/id:001105,src:000004,op:flip1,pos:9954,+cov b/src/exchange/afl-tests/id:001105,src:000004,op:flip1,pos:9954,+cov similarity index 100% rename from src/mint/afl-tests/id:001105,src:000004,op:flip1,pos:9954,+cov rename to src/exchange/afl-tests/id:001105,src:000004,op:flip1,pos:9954,+cov diff --git a/src/mint/afl-tests/id:001106,src:000004,op:flip1,pos:10093,+cov b/src/exchange/afl-tests/id:001106,src:000004,op:flip1,pos:10093,+cov similarity index 100% rename from src/mint/afl-tests/id:001106,src:000004,op:flip1,pos:10093,+cov rename to src/exchange/afl-tests/id:001106,src:000004,op:flip1,pos:10093,+cov diff --git a/src/mint/afl-tests/id:001107,src:000004,op:flip1,pos:10417 b/src/exchange/afl-tests/id:001107,src:000004,op:flip1,pos:10417 similarity index 100% rename from src/mint/afl-tests/id:001107,src:000004,op:flip1,pos:10417 rename to src/exchange/afl-tests/id:001107,src:000004,op:flip1,pos:10417 diff --git a/src/mint/afl-tests/id:001108,src:000004,op:flip1,pos:10430,+cov b/src/exchange/afl-tests/id:001108,src:000004,op:flip1,pos:10430,+cov similarity index 100% rename from src/mint/afl-tests/id:001108,src:000004,op:flip1,pos:10430,+cov rename to src/exchange/afl-tests/id:001108,src:000004,op:flip1,pos:10430,+cov diff --git a/src/mint/afl-tests/id:001109,src:000004,op:flip1,pos:10639 b/src/exchange/afl-tests/id:001109,src:000004,op:flip1,pos:10639 similarity index 100% rename from src/mint/afl-tests/id:001109,src:000004,op:flip1,pos:10639 rename to src/exchange/afl-tests/id:001109,src:000004,op:flip1,pos:10639 diff --git a/src/mint/afl-tests/id:001110,src:000004,op:flip1,pos:10846 b/src/exchange/afl-tests/id:001110,src:000004,op:flip1,pos:10846 similarity index 100% rename from src/mint/afl-tests/id:001110,src:000004,op:flip1,pos:10846 rename to src/exchange/afl-tests/id:001110,src:000004,op:flip1,pos:10846 diff --git a/src/mint/afl-tests/id:001111,src:000004,op:flip1,pos:10957,+cov b/src/exchange/afl-tests/id:001111,src:000004,op:flip1,pos:10957,+cov similarity index 100% rename from src/mint/afl-tests/id:001111,src:000004,op:flip1,pos:10957,+cov rename to src/exchange/afl-tests/id:001111,src:000004,op:flip1,pos:10957,+cov diff --git a/src/mint/afl-tests/id:001112,src:000004,op:flip1,pos:11055 b/src/exchange/afl-tests/id:001112,src:000004,op:flip1,pos:11055 similarity index 100% rename from src/mint/afl-tests/id:001112,src:000004,op:flip1,pos:11055 rename to src/exchange/afl-tests/id:001112,src:000004,op:flip1,pos:11055 diff --git a/src/mint/afl-tests/id:001113,src:000004,op:flip1,pos:11176,+cov b/src/exchange/afl-tests/id:001113,src:000004,op:flip1,pos:11176,+cov similarity index 100% rename from src/mint/afl-tests/id:001113,src:000004,op:flip1,pos:11176,+cov rename to src/exchange/afl-tests/id:001113,src:000004,op:flip1,pos:11176,+cov diff --git a/src/mint/afl-tests/id:001114,src:000004,op:flip1,pos:11262 b/src/exchange/afl-tests/id:001114,src:000004,op:flip1,pos:11262 similarity index 100% rename from src/mint/afl-tests/id:001114,src:000004,op:flip1,pos:11262 rename to src/exchange/afl-tests/id:001114,src:000004,op:flip1,pos:11262 diff --git a/src/mint/afl-tests/id:001115,src:000004,op:flip1,pos:11471 b/src/exchange/afl-tests/id:001115,src:000004,op:flip1,pos:11471 similarity index 100% rename from src/mint/afl-tests/id:001115,src:000004,op:flip1,pos:11471 rename to src/exchange/afl-tests/id:001115,src:000004,op:flip1,pos:11471 diff --git a/src/mint/afl-tests/id:001116,src:000004,op:flip1,pos:11887 b/src/exchange/afl-tests/id:001116,src:000004,op:flip1,pos:11887 similarity index 100% rename from src/mint/afl-tests/id:001116,src:000004,op:flip1,pos:11887 rename to src/exchange/afl-tests/id:001116,src:000004,op:flip1,pos:11887 diff --git a/src/mint/afl-tests/id:001117,src:000004,op:flip1,pos:11996,+cov b/src/exchange/afl-tests/id:001117,src:000004,op:flip1,pos:11996,+cov similarity index 100% rename from src/mint/afl-tests/id:001117,src:000004,op:flip1,pos:11996,+cov rename to src/exchange/afl-tests/id:001117,src:000004,op:flip1,pos:11996,+cov diff --git a/src/mint/afl-tests/id:001118,src:000004,op:flip1,pos:12094 b/src/exchange/afl-tests/id:001118,src:000004,op:flip1,pos:12094 similarity index 100% rename from src/mint/afl-tests/id:001118,src:000004,op:flip1,pos:12094 rename to src/exchange/afl-tests/id:001118,src:000004,op:flip1,pos:12094 diff --git a/src/mint/afl-tests/id:001119,src:000004,op:flip1,pos:12302 b/src/exchange/afl-tests/id:001119,src:000004,op:flip1,pos:12302 similarity index 100% rename from src/mint/afl-tests/id:001119,src:000004,op:flip1,pos:12302 rename to src/exchange/afl-tests/id:001119,src:000004,op:flip1,pos:12302 diff --git a/src/mint/afl-tests/id:001120,src:000004,op:flip1,pos:12511 b/src/exchange/afl-tests/id:001120,src:000004,op:flip1,pos:12511 similarity index 100% rename from src/mint/afl-tests/id:001120,src:000004,op:flip1,pos:12511 rename to src/exchange/afl-tests/id:001120,src:000004,op:flip1,pos:12511 diff --git a/src/mint/afl-tests/id:001121,src:000004,op:flip1,pos:12567,+cov b/src/exchange/afl-tests/id:001121,src:000004,op:flip1,pos:12567,+cov similarity index 100% rename from src/mint/afl-tests/id:001121,src:000004,op:flip1,pos:12567,+cov rename to src/exchange/afl-tests/id:001121,src:000004,op:flip1,pos:12567,+cov diff --git a/src/mint/afl-tests/id:001122,src:000004,op:flip1,pos:12660,+cov b/src/exchange/afl-tests/id:001122,src:000004,op:flip1,pos:12660,+cov similarity index 100% rename from src/mint/afl-tests/id:001122,src:000004,op:flip1,pos:12660,+cov rename to src/exchange/afl-tests/id:001122,src:000004,op:flip1,pos:12660,+cov diff --git a/src/mint/afl-tests/id:001123,src:000004,op:flip1,pos:13342 b/src/exchange/afl-tests/id:001123,src:000004,op:flip1,pos:13342 similarity index 100% rename from src/mint/afl-tests/id:001123,src:000004,op:flip1,pos:13342 rename to src/exchange/afl-tests/id:001123,src:000004,op:flip1,pos:13342 diff --git a/src/mint/afl-tests/id:001124,src:000004,op:flip1,pos:13550 b/src/exchange/afl-tests/id:001124,src:000004,op:flip1,pos:13550 similarity index 100% rename from src/mint/afl-tests/id:001124,src:000004,op:flip1,pos:13550 rename to src/exchange/afl-tests/id:001124,src:000004,op:flip1,pos:13550 diff --git a/src/mint/afl-tests/id:001125,src:000004,op:flip1,pos:13758 b/src/exchange/afl-tests/id:001125,src:000004,op:flip1,pos:13758 similarity index 100% rename from src/mint/afl-tests/id:001125,src:000004,op:flip1,pos:13758 rename to src/exchange/afl-tests/id:001125,src:000004,op:flip1,pos:13758 diff --git a/src/mint/afl-tests/id:001126,src:000004,op:flip1,pos:13968 b/src/exchange/afl-tests/id:001126,src:000004,op:flip1,pos:13968 similarity index 100% rename from src/mint/afl-tests/id:001126,src:000004,op:flip1,pos:13968 rename to src/exchange/afl-tests/id:001126,src:000004,op:flip1,pos:13968 diff --git a/src/mint/afl-tests/id:001127,src:000004,op:flip1,pos:14134,+cov b/src/exchange/afl-tests/id:001127,src:000004,op:flip1,pos:14134,+cov similarity index 100% rename from src/mint/afl-tests/id:001127,src:000004,op:flip1,pos:14134,+cov rename to src/exchange/afl-tests/id:001127,src:000004,op:flip1,pos:14134,+cov diff --git a/src/mint/afl-tests/id:001128,src:000004,op:flip1,pos:14599,+cov b/src/exchange/afl-tests/id:001128,src:000004,op:flip1,pos:14599,+cov similarity index 100% rename from src/mint/afl-tests/id:001128,src:000004,op:flip1,pos:14599,+cov rename to src/exchange/afl-tests/id:001128,src:000004,op:flip1,pos:14599,+cov diff --git a/src/mint/afl-tests/id:001129,src:000004,op:flip1,pos:14603 b/src/exchange/afl-tests/id:001129,src:000004,op:flip1,pos:14603 similarity index 100% rename from src/mint/afl-tests/id:001129,src:000004,op:flip1,pos:14603 rename to src/exchange/afl-tests/id:001129,src:000004,op:flip1,pos:14603 diff --git a/src/mint/afl-tests/id:001130,src:000004,op:flip1,pos:15122,+cov b/src/exchange/afl-tests/id:001130,src:000004,op:flip1,pos:15122,+cov similarity index 100% rename from src/mint/afl-tests/id:001130,src:000004,op:flip1,pos:15122,+cov rename to src/exchange/afl-tests/id:001130,src:000004,op:flip1,pos:15122,+cov diff --git a/src/mint/afl-tests/id:001131,src:000004,op:flip1,pos:15271,+cov b/src/exchange/afl-tests/id:001131,src:000004,op:flip1,pos:15271,+cov similarity index 100% rename from src/mint/afl-tests/id:001131,src:000004,op:flip1,pos:15271,+cov rename to src/exchange/afl-tests/id:001131,src:000004,op:flip1,pos:15271,+cov diff --git a/src/mint/afl-tests/id:001132,src:000004,op:flip1,pos:15295,+cov b/src/exchange/afl-tests/id:001132,src:000004,op:flip1,pos:15295,+cov similarity index 100% rename from src/mint/afl-tests/id:001132,src:000004,op:flip1,pos:15295,+cov rename to src/exchange/afl-tests/id:001132,src:000004,op:flip1,pos:15295,+cov diff --git a/src/mint/afl-tests/id:001133,src:000004,op:flip1,pos:16328,+cov b/src/exchange/afl-tests/id:001133,src:000004,op:flip1,pos:16328,+cov similarity index 100% rename from src/mint/afl-tests/id:001133,src:000004,op:flip1,pos:16328,+cov rename to src/exchange/afl-tests/id:001133,src:000004,op:flip1,pos:16328,+cov diff --git a/src/mint/afl-tests/id:001134,src:000004,op:flip1,pos:17507 b/src/exchange/afl-tests/id:001134,src:000004,op:flip1,pos:17507 similarity index 100% rename from src/mint/afl-tests/id:001134,src:000004,op:flip1,pos:17507 rename to src/exchange/afl-tests/id:001134,src:000004,op:flip1,pos:17507 diff --git a/src/mint/afl-tests/id:001135,src:000004,op:flip1,pos:17983,+cov b/src/exchange/afl-tests/id:001135,src:000004,op:flip1,pos:17983,+cov similarity index 100% rename from src/mint/afl-tests/id:001135,src:000004,op:flip1,pos:17983,+cov rename to src/exchange/afl-tests/id:001135,src:000004,op:flip1,pos:17983,+cov diff --git a/src/mint/afl-tests/id:001136,src:000004,op:flip1,pos:18109,+cov b/src/exchange/afl-tests/id:001136,src:000004,op:flip1,pos:18109,+cov similarity index 100% rename from src/mint/afl-tests/id:001136,src:000004,op:flip1,pos:18109,+cov rename to src/exchange/afl-tests/id:001136,src:000004,op:flip1,pos:18109,+cov diff --git a/src/mint/afl-tests/id:001137,src:000004,op:flip1,pos:19291,+cov b/src/exchange/afl-tests/id:001137,src:000004,op:flip1,pos:19291,+cov similarity index 100% rename from src/mint/afl-tests/id:001137,src:000004,op:flip1,pos:19291,+cov rename to src/exchange/afl-tests/id:001137,src:000004,op:flip1,pos:19291,+cov diff --git a/src/mint/afl-tests/id:001138,src:000004,op:flip1,pos:20068,+cov b/src/exchange/afl-tests/id:001138,src:000004,op:flip1,pos:20068,+cov similarity index 100% rename from src/mint/afl-tests/id:001138,src:000004,op:flip1,pos:20068,+cov rename to src/exchange/afl-tests/id:001138,src:000004,op:flip1,pos:20068,+cov diff --git a/src/mint/afl-tests/id:001139,src:000004,op:flip1,pos:20075,+cov b/src/exchange/afl-tests/id:001139,src:000004,op:flip1,pos:20075,+cov similarity index 100% rename from src/mint/afl-tests/id:001139,src:000004,op:flip1,pos:20075,+cov rename to src/exchange/afl-tests/id:001139,src:000004,op:flip1,pos:20075,+cov diff --git a/src/mint/afl-tests/id:001140,src:000004,op:flip1,pos:20264,+cov b/src/exchange/afl-tests/id:001140,src:000004,op:flip1,pos:20264,+cov similarity index 100% rename from src/mint/afl-tests/id:001140,src:000004,op:flip1,pos:20264,+cov rename to src/exchange/afl-tests/id:001140,src:000004,op:flip1,pos:20264,+cov diff --git a/src/mint/afl-tests/id:001141,src:000004,op:flip1,pos:20372,+cov b/src/exchange/afl-tests/id:001141,src:000004,op:flip1,pos:20372,+cov similarity index 100% rename from src/mint/afl-tests/id:001141,src:000004,op:flip1,pos:20372,+cov rename to src/exchange/afl-tests/id:001141,src:000004,op:flip1,pos:20372,+cov diff --git a/src/mint/afl-tests/id:001142,src:000004,op:flip1,pos:20845,+cov b/src/exchange/afl-tests/id:001142,src:000004,op:flip1,pos:20845,+cov similarity index 100% rename from src/mint/afl-tests/id:001142,src:000004,op:flip1,pos:20845,+cov rename to src/exchange/afl-tests/id:001142,src:000004,op:flip1,pos:20845,+cov diff --git a/src/mint/afl-tests/id:001143,src:000004,op:flip1,pos:21044 b/src/exchange/afl-tests/id:001143,src:000004,op:flip1,pos:21044 similarity index 100% rename from src/mint/afl-tests/id:001143,src:000004,op:flip1,pos:21044 rename to src/exchange/afl-tests/id:001143,src:000004,op:flip1,pos:21044 diff --git a/src/mint/afl-tests/id:001144,src:000004,op:flip1,pos:21072,+cov b/src/exchange/afl-tests/id:001144,src:000004,op:flip1,pos:21072,+cov similarity index 100% rename from src/mint/afl-tests/id:001144,src:000004,op:flip1,pos:21072,+cov rename to src/exchange/afl-tests/id:001144,src:000004,op:flip1,pos:21072,+cov diff --git a/src/mint/afl-tests/id:001145,src:000004,op:flip1,pos:22111,+cov b/src/exchange/afl-tests/id:001145,src:000004,op:flip1,pos:22111,+cov similarity index 100% rename from src/mint/afl-tests/id:001145,src:000004,op:flip1,pos:22111,+cov rename to src/exchange/afl-tests/id:001145,src:000004,op:flip1,pos:22111,+cov diff --git a/src/mint/afl-tests/id:001146,src:000004,op:flip1,pos:22404,+cov b/src/exchange/afl-tests/id:001146,src:000004,op:flip1,pos:22404,+cov similarity index 100% rename from src/mint/afl-tests/id:001146,src:000004,op:flip1,pos:22404,+cov rename to src/exchange/afl-tests/id:001146,src:000004,op:flip1,pos:22404,+cov diff --git a/src/mint/afl-tests/id:001147,src:000004,op:flip1,pos:23777,+cov b/src/exchange/afl-tests/id:001147,src:000004,op:flip1,pos:23777,+cov similarity index 100% rename from src/mint/afl-tests/id:001147,src:000004,op:flip1,pos:23777,+cov rename to src/exchange/afl-tests/id:001147,src:000004,op:flip1,pos:23777,+cov diff --git a/src/mint/afl-tests/id:001148,src:000004,op:flip1,pos:24046,+cov b/src/exchange/afl-tests/id:001148,src:000004,op:flip1,pos:24046,+cov similarity index 100% rename from src/mint/afl-tests/id:001148,src:000004,op:flip1,pos:24046,+cov rename to src/exchange/afl-tests/id:001148,src:000004,op:flip1,pos:24046,+cov diff --git a/src/mint/afl-tests/id:001149,src:000004,op:flip1,pos:27360,+cov b/src/exchange/afl-tests/id:001149,src:000004,op:flip1,pos:27360,+cov similarity index 100% rename from src/mint/afl-tests/id:001149,src:000004,op:flip1,pos:27360,+cov rename to src/exchange/afl-tests/id:001149,src:000004,op:flip1,pos:27360,+cov diff --git a/src/mint/afl-tests/id:001150,src:000004,op:flip1,pos:27547,+cov b/src/exchange/afl-tests/id:001150,src:000004,op:flip1,pos:27547,+cov similarity index 100% rename from src/mint/afl-tests/id:001150,src:000004,op:flip1,pos:27547,+cov rename to src/exchange/afl-tests/id:001150,src:000004,op:flip1,pos:27547,+cov diff --git a/src/mint/afl-tests/id:001151,src:000004,op:flip1,pos:28206,+cov b/src/exchange/afl-tests/id:001151,src:000004,op:flip1,pos:28206,+cov similarity index 100% rename from src/mint/afl-tests/id:001151,src:000004,op:flip1,pos:28206,+cov rename to src/exchange/afl-tests/id:001151,src:000004,op:flip1,pos:28206,+cov diff --git a/src/mint/afl-tests/id:001152,src:000004,op:flip1,pos:29132,+cov b/src/exchange/afl-tests/id:001152,src:000004,op:flip1,pos:29132,+cov similarity index 100% rename from src/mint/afl-tests/id:001152,src:000004,op:flip1,pos:29132,+cov rename to src/exchange/afl-tests/id:001152,src:000004,op:flip1,pos:29132,+cov diff --git a/src/mint/afl-tests/id:001153,src:000004,op:flip1,pos:29181,+cov b/src/exchange/afl-tests/id:001153,src:000004,op:flip1,pos:29181,+cov similarity index 100% rename from src/mint/afl-tests/id:001153,src:000004,op:flip1,pos:29181,+cov rename to src/exchange/afl-tests/id:001153,src:000004,op:flip1,pos:29181,+cov diff --git a/src/mint/afl-tests/id:001154,src:000004,op:flip1,pos:30141,+cov b/src/exchange/afl-tests/id:001154,src:000004,op:flip1,pos:30141,+cov similarity index 100% rename from src/mint/afl-tests/id:001154,src:000004,op:flip1,pos:30141,+cov rename to src/exchange/afl-tests/id:001154,src:000004,op:flip1,pos:30141,+cov diff --git a/src/mint/afl-tests/id:001155,src:000004,op:flip1,pos:30860,+cov b/src/exchange/afl-tests/id:001155,src:000004,op:flip1,pos:30860,+cov similarity index 100% rename from src/mint/afl-tests/id:001155,src:000004,op:flip1,pos:30860,+cov rename to src/exchange/afl-tests/id:001155,src:000004,op:flip1,pos:30860,+cov diff --git a/src/mint/afl-tests/id:001156,src:000004,op:flip1,pos:31016,+cov b/src/exchange/afl-tests/id:001156,src:000004,op:flip1,pos:31016,+cov similarity index 100% rename from src/mint/afl-tests/id:001156,src:000004,op:flip1,pos:31016,+cov rename to src/exchange/afl-tests/id:001156,src:000004,op:flip1,pos:31016,+cov diff --git a/src/mint/afl-tests/id:001157,src:000004,op:flip1,pos:31260,+cov b/src/exchange/afl-tests/id:001157,src:000004,op:flip1,pos:31260,+cov similarity index 100% rename from src/mint/afl-tests/id:001157,src:000004,op:flip1,pos:31260,+cov rename to src/exchange/afl-tests/id:001157,src:000004,op:flip1,pos:31260,+cov diff --git a/src/mint/afl-tests/id:001158,src:000004,op:flip1,pos:32301,+cov b/src/exchange/afl-tests/id:001158,src:000004,op:flip1,pos:32301,+cov similarity index 100% rename from src/mint/afl-tests/id:001158,src:000004,op:flip1,pos:32301,+cov rename to src/exchange/afl-tests/id:001158,src:000004,op:flip1,pos:32301,+cov diff --git a/src/mint/afl-tests/id:001159,src:000004,op:flip1,pos:32476,+cov b/src/exchange/afl-tests/id:001159,src:000004,op:flip1,pos:32476,+cov similarity index 100% rename from src/mint/afl-tests/id:001159,src:000004,op:flip1,pos:32476,+cov rename to src/exchange/afl-tests/id:001159,src:000004,op:flip1,pos:32476,+cov diff --git a/src/mint/afl-tests/id:001160,src:000004,op:flip1,pos:33475,+cov b/src/exchange/afl-tests/id:001160,src:000004,op:flip1,pos:33475,+cov similarity index 100% rename from src/mint/afl-tests/id:001160,src:000004,op:flip1,pos:33475,+cov rename to src/exchange/afl-tests/id:001160,src:000004,op:flip1,pos:33475,+cov diff --git a/src/mint/afl-tests/id:001161,src:000004,op:flip2,pos:108 b/src/exchange/afl-tests/id:001161,src:000004,op:flip2,pos:108 similarity index 100% rename from src/mint/afl-tests/id:001161,src:000004,op:flip2,pos:108 rename to src/exchange/afl-tests/id:001161,src:000004,op:flip2,pos:108 diff --git a/src/mint/afl-tests/id:001162,src:000004,op:flip2,pos:272,+cov b/src/exchange/afl-tests/id:001162,src:000004,op:flip2,pos:272,+cov similarity index 100% rename from src/mint/afl-tests/id:001162,src:000004,op:flip2,pos:272,+cov rename to src/exchange/afl-tests/id:001162,src:000004,op:flip2,pos:272,+cov diff --git a/src/mint/afl-tests/id:001163,src:000004,op:flip2,pos:501,+cov b/src/exchange/afl-tests/id:001163,src:000004,op:flip2,pos:501,+cov similarity index 100% rename from src/mint/afl-tests/id:001163,src:000004,op:flip2,pos:501,+cov rename to src/exchange/afl-tests/id:001163,src:000004,op:flip2,pos:501,+cov diff --git a/src/mint/afl-tests/id:001164,src:000004,op:flip2,pos:1593,+cov b/src/exchange/afl-tests/id:001164,src:000004,op:flip2,pos:1593,+cov similarity index 100% rename from src/mint/afl-tests/id:001164,src:000004,op:flip2,pos:1593,+cov rename to src/exchange/afl-tests/id:001164,src:000004,op:flip2,pos:1593,+cov diff --git a/src/mint/afl-tests/id:001165,src:000004,op:flip2,pos:1877,+cov b/src/exchange/afl-tests/id:001165,src:000004,op:flip2,pos:1877,+cov similarity index 100% rename from src/mint/afl-tests/id:001165,src:000004,op:flip2,pos:1877,+cov rename to src/exchange/afl-tests/id:001165,src:000004,op:flip2,pos:1877,+cov diff --git a/src/mint/afl-tests/id:001166,src:000004,op:flip2,pos:2863,+cov b/src/exchange/afl-tests/id:001166,src:000004,op:flip2,pos:2863,+cov similarity index 100% rename from src/mint/afl-tests/id:001166,src:000004,op:flip2,pos:2863,+cov rename to src/exchange/afl-tests/id:001166,src:000004,op:flip2,pos:2863,+cov diff --git a/src/mint/afl-tests/id:001167,src:000004,op:flip2,pos:3189,+cov b/src/exchange/afl-tests/id:001167,src:000004,op:flip2,pos:3189,+cov similarity index 100% rename from src/mint/afl-tests/id:001167,src:000004,op:flip2,pos:3189,+cov rename to src/exchange/afl-tests/id:001167,src:000004,op:flip2,pos:3189,+cov diff --git a/src/mint/afl-tests/id:001168,src:000004,op:flip2,pos:5916,+cov b/src/exchange/afl-tests/id:001168,src:000004,op:flip2,pos:5916,+cov similarity index 100% rename from src/mint/afl-tests/id:001168,src:000004,op:flip2,pos:5916,+cov rename to src/exchange/afl-tests/id:001168,src:000004,op:flip2,pos:5916,+cov diff --git a/src/mint/afl-tests/id:001169,src:000004,op:flip2,pos:6474,+cov b/src/exchange/afl-tests/id:001169,src:000004,op:flip2,pos:6474,+cov similarity index 100% rename from src/mint/afl-tests/id:001169,src:000004,op:flip2,pos:6474,+cov rename to src/exchange/afl-tests/id:001169,src:000004,op:flip2,pos:6474,+cov diff --git a/src/mint/afl-tests/id:001170,src:000004,op:flip2,pos:8695,+cov b/src/exchange/afl-tests/id:001170,src:000004,op:flip2,pos:8695,+cov similarity index 100% rename from src/mint/afl-tests/id:001170,src:000004,op:flip2,pos:8695,+cov rename to src/exchange/afl-tests/id:001170,src:000004,op:flip2,pos:8695,+cov diff --git a/src/mint/afl-tests/id:001171,src:000004,op:flip2,pos:9101,+cov b/src/exchange/afl-tests/id:001171,src:000004,op:flip2,pos:9101,+cov similarity index 100% rename from src/mint/afl-tests/id:001171,src:000004,op:flip2,pos:9101,+cov rename to src/exchange/afl-tests/id:001171,src:000004,op:flip2,pos:9101,+cov diff --git a/src/mint/afl-tests/id:001172,src:000004,op:flip2,pos:9350,+cov b/src/exchange/afl-tests/id:001172,src:000004,op:flip2,pos:9350,+cov similarity index 100% rename from src/mint/afl-tests/id:001172,src:000004,op:flip2,pos:9350,+cov rename to src/exchange/afl-tests/id:001172,src:000004,op:flip2,pos:9350,+cov diff --git a/src/mint/afl-tests/id:001173,src:000004,op:flip2,pos:9675,+cov b/src/exchange/afl-tests/id:001173,src:000004,op:flip2,pos:9675,+cov similarity index 100% rename from src/mint/afl-tests/id:001173,src:000004,op:flip2,pos:9675,+cov rename to src/exchange/afl-tests/id:001173,src:000004,op:flip2,pos:9675,+cov diff --git a/src/mint/afl-tests/id:001174,src:000004,op:flip2,pos:9779,+cov b/src/exchange/afl-tests/id:001174,src:000004,op:flip2,pos:9779,+cov similarity index 100% rename from src/mint/afl-tests/id:001174,src:000004,op:flip2,pos:9779,+cov rename to src/exchange/afl-tests/id:001174,src:000004,op:flip2,pos:9779,+cov diff --git a/src/mint/afl-tests/id:001175,src:000004,op:flip2,pos:10123,+cov b/src/exchange/afl-tests/id:001175,src:000004,op:flip2,pos:10123,+cov similarity index 100% rename from src/mint/afl-tests/id:001175,src:000004,op:flip2,pos:10123,+cov rename to src/exchange/afl-tests/id:001175,src:000004,op:flip2,pos:10123,+cov diff --git a/src/mint/afl-tests/id:001176,src:000004,op:flip2,pos:10486,+cov b/src/exchange/afl-tests/id:001176,src:000004,op:flip2,pos:10486,+cov similarity index 100% rename from src/mint/afl-tests/id:001176,src:000004,op:flip2,pos:10486,+cov rename to src/exchange/afl-tests/id:001176,src:000004,op:flip2,pos:10486,+cov diff --git a/src/mint/afl-tests/id:001177,src:000004,op:flip2,pos:11222,+cov b/src/exchange/afl-tests/id:001177,src:000004,op:flip2,pos:11222,+cov similarity index 100% rename from src/mint/afl-tests/id:001177,src:000004,op:flip2,pos:11222,+cov rename to src/exchange/afl-tests/id:001177,src:000004,op:flip2,pos:11222,+cov diff --git a/src/mint/afl-tests/id:001178,src:000004,op:flip2,pos:11504,+cov b/src/exchange/afl-tests/id:001178,src:000004,op:flip2,pos:11504,+cov similarity index 100% rename from src/mint/afl-tests/id:001178,src:000004,op:flip2,pos:11504,+cov rename to src/exchange/afl-tests/id:001178,src:000004,op:flip2,pos:11504,+cov diff --git a/src/mint/afl-tests/id:001179,src:000004,op:flip2,pos:13892,+cov b/src/exchange/afl-tests/id:001179,src:000004,op:flip2,pos:13892,+cov similarity index 100% rename from src/mint/afl-tests/id:001179,src:000004,op:flip2,pos:13892,+cov rename to src/exchange/afl-tests/id:001179,src:000004,op:flip2,pos:13892,+cov diff --git a/src/mint/afl-tests/id:001180,src:000004,op:flip2,pos:14104,+cov b/src/exchange/afl-tests/id:001180,src:000004,op:flip2,pos:14104,+cov similarity index 100% rename from src/mint/afl-tests/id:001180,src:000004,op:flip2,pos:14104,+cov rename to src/exchange/afl-tests/id:001180,src:000004,op:flip2,pos:14104,+cov diff --git a/src/mint/afl-tests/id:001181,src:000004,op:flip2,pos:16451,+cov b/src/exchange/afl-tests/id:001181,src:000004,op:flip2,pos:16451,+cov similarity index 100% rename from src/mint/afl-tests/id:001181,src:000004,op:flip2,pos:16451,+cov rename to src/exchange/afl-tests/id:001181,src:000004,op:flip2,pos:16451,+cov diff --git a/src/mint/afl-tests/id:001182,src:000004,op:flip2,pos:17186,+cov b/src/exchange/afl-tests/id:001182,src:000004,op:flip2,pos:17186,+cov similarity index 100% rename from src/mint/afl-tests/id:001182,src:000004,op:flip2,pos:17186,+cov rename to src/exchange/afl-tests/id:001182,src:000004,op:flip2,pos:17186,+cov diff --git a/src/mint/afl-tests/id:001183,src:000004,op:flip2,pos:18869,+cov b/src/exchange/afl-tests/id:001183,src:000004,op:flip2,pos:18869,+cov similarity index 100% rename from src/mint/afl-tests/id:001183,src:000004,op:flip2,pos:18869,+cov rename to src/exchange/afl-tests/id:001183,src:000004,op:flip2,pos:18869,+cov diff --git a/src/mint/afl-tests/id:001184,src:000004,op:flip2,pos:20039,+cov b/src/exchange/afl-tests/id:001184,src:000004,op:flip2,pos:20039,+cov similarity index 100% rename from src/mint/afl-tests/id:001184,src:000004,op:flip2,pos:20039,+cov rename to src/exchange/afl-tests/id:001184,src:000004,op:flip2,pos:20039,+cov diff --git a/src/mint/afl-tests/id:001185,src:000004,op:flip2,pos:20319,+cov b/src/exchange/afl-tests/id:001185,src:000004,op:flip2,pos:20319,+cov similarity index 100% rename from src/mint/afl-tests/id:001185,src:000004,op:flip2,pos:20319,+cov rename to src/exchange/afl-tests/id:001185,src:000004,op:flip2,pos:20319,+cov diff --git a/src/mint/afl-tests/id:001186,src:000004,op:flip2,pos:20987,+cov b/src/exchange/afl-tests/id:001186,src:000004,op:flip2,pos:20987,+cov similarity index 100% rename from src/mint/afl-tests/id:001186,src:000004,op:flip2,pos:20987,+cov rename to src/exchange/afl-tests/id:001186,src:000004,op:flip2,pos:20987,+cov diff --git a/src/mint/afl-tests/id:001187,src:000004,op:flip2,pos:22115,+cov b/src/exchange/afl-tests/id:001187,src:000004,op:flip2,pos:22115,+cov similarity index 100% rename from src/mint/afl-tests/id:001187,src:000004,op:flip2,pos:22115,+cov rename to src/exchange/afl-tests/id:001187,src:000004,op:flip2,pos:22115,+cov diff --git a/src/mint/afl-tests/id:001188,src:000004,op:flip2,pos:22139,+cov b/src/exchange/afl-tests/id:001188,src:000004,op:flip2,pos:22139,+cov similarity index 100% rename from src/mint/afl-tests/id:001188,src:000004,op:flip2,pos:22139,+cov rename to src/exchange/afl-tests/id:001188,src:000004,op:flip2,pos:22139,+cov diff --git a/src/mint/afl-tests/id:001189,src:000004,op:flip2,pos:22530,+cov b/src/exchange/afl-tests/id:001189,src:000004,op:flip2,pos:22530,+cov similarity index 100% rename from src/mint/afl-tests/id:001189,src:000004,op:flip2,pos:22530,+cov rename to src/exchange/afl-tests/id:001189,src:000004,op:flip2,pos:22530,+cov diff --git a/src/mint/afl-tests/id:001190,src:000004,op:flip2,pos:22871,+cov b/src/exchange/afl-tests/id:001190,src:000004,op:flip2,pos:22871,+cov similarity index 100% rename from src/mint/afl-tests/id:001190,src:000004,op:flip2,pos:22871,+cov rename to src/exchange/afl-tests/id:001190,src:000004,op:flip2,pos:22871,+cov diff --git a/src/mint/afl-tests/id:001191,src:000004,op:flip2,pos:22878,+cov b/src/exchange/afl-tests/id:001191,src:000004,op:flip2,pos:22878,+cov similarity index 100% rename from src/mint/afl-tests/id:001191,src:000004,op:flip2,pos:22878,+cov rename to src/exchange/afl-tests/id:001191,src:000004,op:flip2,pos:22878,+cov diff --git a/src/mint/afl-tests/id:001192,src:000004,op:flip2,pos:23586,+cov b/src/exchange/afl-tests/id:001192,src:000004,op:flip2,pos:23586,+cov similarity index 100% rename from src/mint/afl-tests/id:001192,src:000004,op:flip2,pos:23586,+cov rename to src/exchange/afl-tests/id:001192,src:000004,op:flip2,pos:23586,+cov diff --git a/src/mint/afl-tests/id:001193,src:000004,op:flip2,pos:24806,+cov b/src/exchange/afl-tests/id:001193,src:000004,op:flip2,pos:24806,+cov similarity index 100% rename from src/mint/afl-tests/id:001193,src:000004,op:flip2,pos:24806,+cov rename to src/exchange/afl-tests/id:001193,src:000004,op:flip2,pos:24806,+cov diff --git a/src/mint/afl-tests/id:001194,src:000004,op:flip2,pos:25248,+cov b/src/exchange/afl-tests/id:001194,src:000004,op:flip2,pos:25248,+cov similarity index 100% rename from src/mint/afl-tests/id:001194,src:000004,op:flip2,pos:25248,+cov rename to src/exchange/afl-tests/id:001194,src:000004,op:flip2,pos:25248,+cov diff --git a/src/mint/afl-tests/id:001195,src:000004,op:flip2,pos:26529,+cov b/src/exchange/afl-tests/id:001195,src:000004,op:flip2,pos:26529,+cov similarity index 100% rename from src/mint/afl-tests/id:001195,src:000004,op:flip2,pos:26529,+cov rename to src/exchange/afl-tests/id:001195,src:000004,op:flip2,pos:26529,+cov diff --git a/src/mint/afl-tests/id:001196,src:000004,op:flip2,pos:28158,+cov b/src/exchange/afl-tests/id:001196,src:000004,op:flip2,pos:28158,+cov similarity index 100% rename from src/mint/afl-tests/id:001196,src:000004,op:flip2,pos:28158,+cov rename to src/exchange/afl-tests/id:001196,src:000004,op:flip2,pos:28158,+cov diff --git a/src/mint/afl-tests/id:001197,src:000004,op:flip2,pos:29113,+cov b/src/exchange/afl-tests/id:001197,src:000004,op:flip2,pos:29113,+cov similarity index 100% rename from src/mint/afl-tests/id:001197,src:000004,op:flip2,pos:29113,+cov rename to src/exchange/afl-tests/id:001197,src:000004,op:flip2,pos:29113,+cov diff --git a/src/mint/afl-tests/id:001198,src:000004,op:flip2,pos:29233,+cov b/src/exchange/afl-tests/id:001198,src:000004,op:flip2,pos:29233,+cov similarity index 100% rename from src/mint/afl-tests/id:001198,src:000004,op:flip2,pos:29233,+cov rename to src/exchange/afl-tests/id:001198,src:000004,op:flip2,pos:29233,+cov diff --git a/src/mint/afl-tests/id:001199,src:000004,op:flip2,pos:31755,+cov b/src/exchange/afl-tests/id:001199,src:000004,op:flip2,pos:31755,+cov similarity index 100% rename from src/mint/afl-tests/id:001199,src:000004,op:flip2,pos:31755,+cov rename to src/exchange/afl-tests/id:001199,src:000004,op:flip2,pos:31755,+cov diff --git a/src/mint/afl-tests/id:001200,src:000004,op:flip2,pos:32441,+cov b/src/exchange/afl-tests/id:001200,src:000004,op:flip2,pos:32441,+cov similarity index 100% rename from src/mint/afl-tests/id:001200,src:000004,op:flip2,pos:32441,+cov rename to src/exchange/afl-tests/id:001200,src:000004,op:flip2,pos:32441,+cov diff --git a/src/mint/afl-tests/id:001201,src:000004,op:flip2,pos:32888,+cov b/src/exchange/afl-tests/id:001201,src:000004,op:flip2,pos:32888,+cov similarity index 100% rename from src/mint/afl-tests/id:001201,src:000004,op:flip2,pos:32888,+cov rename to src/exchange/afl-tests/id:001201,src:000004,op:flip2,pos:32888,+cov diff --git a/src/mint/afl-tests/id:001202,src:000004,op:flip2,pos:33869,+cov b/src/exchange/afl-tests/id:001202,src:000004,op:flip2,pos:33869,+cov similarity index 100% rename from src/mint/afl-tests/id:001202,src:000004,op:flip2,pos:33869,+cov rename to src/exchange/afl-tests/id:001202,src:000004,op:flip2,pos:33869,+cov diff --git a/src/mint/afl-tests/id:001203,src:000004,op:flip4,pos:399,+cov b/src/exchange/afl-tests/id:001203,src:000004,op:flip4,pos:399,+cov similarity index 100% rename from src/mint/afl-tests/id:001203,src:000004,op:flip4,pos:399,+cov rename to src/exchange/afl-tests/id:001203,src:000004,op:flip4,pos:399,+cov diff --git a/src/mint/afl-tests/id:001204,src:000004,op:flip4,pos:1377,+cov b/src/exchange/afl-tests/id:001204,src:000004,op:flip4,pos:1377,+cov similarity index 100% rename from src/mint/afl-tests/id:001204,src:000004,op:flip4,pos:1377,+cov rename to src/exchange/afl-tests/id:001204,src:000004,op:flip4,pos:1377,+cov diff --git a/src/mint/afl-tests/id:001205,src:000004,op:flip4,pos:1830,+cov b/src/exchange/afl-tests/id:001205,src:000004,op:flip4,pos:1830,+cov similarity index 100% rename from src/mint/afl-tests/id:001205,src:000004,op:flip4,pos:1830,+cov rename to src/exchange/afl-tests/id:001205,src:000004,op:flip4,pos:1830,+cov diff --git a/src/mint/afl-tests/id:001206,src:000004,op:flip4,pos:3239,+cov b/src/exchange/afl-tests/id:001206,src:000004,op:flip4,pos:3239,+cov similarity index 100% rename from src/mint/afl-tests/id:001206,src:000004,op:flip4,pos:3239,+cov rename to src/exchange/afl-tests/id:001206,src:000004,op:flip4,pos:3239,+cov diff --git a/src/mint/afl-tests/id:001207,src:000004,op:flip4,pos:3591,+cov b/src/exchange/afl-tests/id:001207,src:000004,op:flip4,pos:3591,+cov similarity index 100% rename from src/mint/afl-tests/id:001207,src:000004,op:flip4,pos:3591,+cov rename to src/exchange/afl-tests/id:001207,src:000004,op:flip4,pos:3591,+cov diff --git a/src/mint/afl-tests/id:001208,src:000004,op:flip4,pos:3708,+cov b/src/exchange/afl-tests/id:001208,src:000004,op:flip4,pos:3708,+cov similarity index 100% rename from src/mint/afl-tests/id:001208,src:000004,op:flip4,pos:3708,+cov rename to src/exchange/afl-tests/id:001208,src:000004,op:flip4,pos:3708,+cov diff --git a/src/mint/afl-tests/id:001209,src:000004,op:flip4,pos:4350,+cov b/src/exchange/afl-tests/id:001209,src:000004,op:flip4,pos:4350,+cov similarity index 100% rename from src/mint/afl-tests/id:001209,src:000004,op:flip4,pos:4350,+cov rename to src/exchange/afl-tests/id:001209,src:000004,op:flip4,pos:4350,+cov diff --git a/src/mint/afl-tests/id:001210,src:000004,op:flip4,pos:4487,+cov b/src/exchange/afl-tests/id:001210,src:000004,op:flip4,pos:4487,+cov similarity index 100% rename from src/mint/afl-tests/id:001210,src:000004,op:flip4,pos:4487,+cov rename to src/exchange/afl-tests/id:001210,src:000004,op:flip4,pos:4487,+cov diff --git a/src/mint/afl-tests/id:001211,src:000004,op:flip4,pos:4584,+cov b/src/exchange/afl-tests/id:001211,src:000004,op:flip4,pos:4584,+cov similarity index 100% rename from src/mint/afl-tests/id:001211,src:000004,op:flip4,pos:4584,+cov rename to src/exchange/afl-tests/id:001211,src:000004,op:flip4,pos:4584,+cov diff --git a/src/mint/afl-tests/id:001212,src:000004,op:flip4,pos:5470,+cov b/src/exchange/afl-tests/id:001212,src:000004,op:flip4,pos:5470,+cov similarity index 100% rename from src/mint/afl-tests/id:001212,src:000004,op:flip4,pos:5470,+cov rename to src/exchange/afl-tests/id:001212,src:000004,op:flip4,pos:5470,+cov diff --git a/src/mint/afl-tests/id:001213,src:000004,op:flip4,pos:6559,+cov b/src/exchange/afl-tests/id:001213,src:000004,op:flip4,pos:6559,+cov similarity index 100% rename from src/mint/afl-tests/id:001213,src:000004,op:flip4,pos:6559,+cov rename to src/exchange/afl-tests/id:001213,src:000004,op:flip4,pos:6559,+cov diff --git a/src/mint/afl-tests/id:001214,src:000004,op:flip4,pos:6626,+cov b/src/exchange/afl-tests/id:001214,src:000004,op:flip4,pos:6626,+cov similarity index 100% rename from src/mint/afl-tests/id:001214,src:000004,op:flip4,pos:6626,+cov rename to src/exchange/afl-tests/id:001214,src:000004,op:flip4,pos:6626,+cov diff --git a/src/mint/afl-tests/id:001215,src:000004,op:flip4,pos:7110,+cov b/src/exchange/afl-tests/id:001215,src:000004,op:flip4,pos:7110,+cov similarity index 100% rename from src/mint/afl-tests/id:001215,src:000004,op:flip4,pos:7110,+cov rename to src/exchange/afl-tests/id:001215,src:000004,op:flip4,pos:7110,+cov diff --git a/src/mint/afl-tests/id:001216,src:000004,op:flip4,pos:7148,+cov b/src/exchange/afl-tests/id:001216,src:000004,op:flip4,pos:7148,+cov similarity index 100% rename from src/mint/afl-tests/id:001216,src:000004,op:flip4,pos:7148,+cov rename to src/exchange/afl-tests/id:001216,src:000004,op:flip4,pos:7148,+cov diff --git a/src/mint/afl-tests/id:001217,src:000004,op:flip4,pos:7168,+cov b/src/exchange/afl-tests/id:001217,src:000004,op:flip4,pos:7168,+cov similarity index 100% rename from src/mint/afl-tests/id:001217,src:000004,op:flip4,pos:7168,+cov rename to src/exchange/afl-tests/id:001217,src:000004,op:flip4,pos:7168,+cov diff --git a/src/mint/afl-tests/id:001218,src:000004,op:flip4,pos:7715,+cov b/src/exchange/afl-tests/id:001218,src:000004,op:flip4,pos:7715,+cov similarity index 100% rename from src/mint/afl-tests/id:001218,src:000004,op:flip4,pos:7715,+cov rename to src/exchange/afl-tests/id:001218,src:000004,op:flip4,pos:7715,+cov diff --git a/src/mint/afl-tests/id:001219,src:000004,op:flip4,pos:9108,+cov b/src/exchange/afl-tests/id:001219,src:000004,op:flip4,pos:9108,+cov similarity index 100% rename from src/mint/afl-tests/id:001219,src:000004,op:flip4,pos:9108,+cov rename to src/exchange/afl-tests/id:001219,src:000004,op:flip4,pos:9108,+cov diff --git a/src/mint/afl-tests/id:001220,src:000004,op:flip4,pos:9386,+cov b/src/exchange/afl-tests/id:001220,src:000004,op:flip4,pos:9386,+cov similarity index 100% rename from src/mint/afl-tests/id:001220,src:000004,op:flip4,pos:9386,+cov rename to src/exchange/afl-tests/id:001220,src:000004,op:flip4,pos:9386,+cov diff --git a/src/mint/afl-tests/id:001221,src:000004,op:flip4,pos:9592,+cov b/src/exchange/afl-tests/id:001221,src:000004,op:flip4,pos:9592,+cov similarity index 100% rename from src/mint/afl-tests/id:001221,src:000004,op:flip4,pos:9592,+cov rename to src/exchange/afl-tests/id:001221,src:000004,op:flip4,pos:9592,+cov diff --git a/src/mint/afl-tests/id:001222,src:000004,op:flip4,pos:9878,+cov b/src/exchange/afl-tests/id:001222,src:000004,op:flip4,pos:9878,+cov similarity index 100% rename from src/mint/afl-tests/id:001222,src:000004,op:flip4,pos:9878,+cov rename to src/exchange/afl-tests/id:001222,src:000004,op:flip4,pos:9878,+cov diff --git a/src/mint/afl-tests/id:001223,src:000004,op:flip4,pos:9972,+cov b/src/exchange/afl-tests/id:001223,src:000004,op:flip4,pos:9972,+cov similarity index 100% rename from src/mint/afl-tests/id:001223,src:000004,op:flip4,pos:9972,+cov rename to src/exchange/afl-tests/id:001223,src:000004,op:flip4,pos:9972,+cov diff --git a/src/mint/afl-tests/id:001224,src:000004,op:flip4,pos:10287,+cov b/src/exchange/afl-tests/id:001224,src:000004,op:flip4,pos:10287,+cov similarity index 100% rename from src/mint/afl-tests/id:001224,src:000004,op:flip4,pos:10287,+cov rename to src/exchange/afl-tests/id:001224,src:000004,op:flip4,pos:10287,+cov diff --git a/src/mint/afl-tests/id:001225,src:000004,op:flip4,pos:10737,+cov b/src/exchange/afl-tests/id:001225,src:000004,op:flip4,pos:10737,+cov similarity index 100% rename from src/mint/afl-tests/id:001225,src:000004,op:flip4,pos:10737,+cov rename to src/exchange/afl-tests/id:001225,src:000004,op:flip4,pos:10737,+cov diff --git a/src/mint/afl-tests/id:001226,src:000004,op:flip4,pos:12260,+cov b/src/exchange/afl-tests/id:001226,src:000004,op:flip4,pos:12260,+cov similarity index 100% rename from src/mint/afl-tests/id:001226,src:000004,op:flip4,pos:12260,+cov rename to src/exchange/afl-tests/id:001226,src:000004,op:flip4,pos:12260,+cov diff --git a/src/mint/afl-tests/id:001227,src:000004,op:flip4,pos:15195,+cov b/src/exchange/afl-tests/id:001227,src:000004,op:flip4,pos:15195,+cov similarity index 100% rename from src/mint/afl-tests/id:001227,src:000004,op:flip4,pos:15195,+cov rename to src/exchange/afl-tests/id:001227,src:000004,op:flip4,pos:15195,+cov diff --git a/src/mint/afl-tests/id:001228,src:000004,op:flip4,pos:15571,+cov b/src/exchange/afl-tests/id:001228,src:000004,op:flip4,pos:15571,+cov similarity index 100% rename from src/mint/afl-tests/id:001228,src:000004,op:flip4,pos:15571,+cov rename to src/exchange/afl-tests/id:001228,src:000004,op:flip4,pos:15571,+cov diff --git a/src/mint/afl-tests/id:001229,src:000004,op:flip4,pos:19500,+cov b/src/exchange/afl-tests/id:001229,src:000004,op:flip4,pos:19500,+cov similarity index 100% rename from src/mint/afl-tests/id:001229,src:000004,op:flip4,pos:19500,+cov rename to src/exchange/afl-tests/id:001229,src:000004,op:flip4,pos:19500,+cov diff --git a/src/mint/afl-tests/id:001230,src:000004,op:flip4,pos:20444,+cov b/src/exchange/afl-tests/id:001230,src:000004,op:flip4,pos:20444,+cov similarity index 100% rename from src/mint/afl-tests/id:001230,src:000004,op:flip4,pos:20444,+cov rename to src/exchange/afl-tests/id:001230,src:000004,op:flip4,pos:20444,+cov diff --git a/src/mint/afl-tests/id:001231,src:000004,op:flip4,pos:22249,+cov b/src/exchange/afl-tests/id:001231,src:000004,op:flip4,pos:22249,+cov similarity index 100% rename from src/mint/afl-tests/id:001231,src:000004,op:flip4,pos:22249,+cov rename to src/exchange/afl-tests/id:001231,src:000004,op:flip4,pos:22249,+cov diff --git a/src/mint/afl-tests/id:001232,src:000004,op:flip4,pos:22380,+cov b/src/exchange/afl-tests/id:001232,src:000004,op:flip4,pos:22380,+cov similarity index 100% rename from src/mint/afl-tests/id:001232,src:000004,op:flip4,pos:22380,+cov rename to src/exchange/afl-tests/id:001232,src:000004,op:flip4,pos:22380,+cov diff --git a/src/mint/afl-tests/id:001233,src:000004,op:flip4,pos:25459,+cov b/src/exchange/afl-tests/id:001233,src:000004,op:flip4,pos:25459,+cov similarity index 100% rename from src/mint/afl-tests/id:001233,src:000004,op:flip4,pos:25459,+cov rename to src/exchange/afl-tests/id:001233,src:000004,op:flip4,pos:25459,+cov diff --git a/src/mint/afl-tests/id:001234,src:000004,op:flip4,pos:27094,+cov b/src/exchange/afl-tests/id:001234,src:000004,op:flip4,pos:27094,+cov similarity index 100% rename from src/mint/afl-tests/id:001234,src:000004,op:flip4,pos:27094,+cov rename to src/exchange/afl-tests/id:001234,src:000004,op:flip4,pos:27094,+cov diff --git a/src/mint/afl-tests/id:001235,src:000004,op:flip4,pos:28097,+cov b/src/exchange/afl-tests/id:001235,src:000004,op:flip4,pos:28097,+cov similarity index 100% rename from src/mint/afl-tests/id:001235,src:000004,op:flip4,pos:28097,+cov rename to src/exchange/afl-tests/id:001235,src:000004,op:flip4,pos:28097,+cov diff --git a/src/mint/afl-tests/id:001236,src:000004,op:flip4,pos:28763,+cov b/src/exchange/afl-tests/id:001236,src:000004,op:flip4,pos:28763,+cov similarity index 100% rename from src/mint/afl-tests/id:001236,src:000004,op:flip4,pos:28763,+cov rename to src/exchange/afl-tests/id:001236,src:000004,op:flip4,pos:28763,+cov diff --git a/src/mint/afl-tests/id:001237,src:000004,op:flip4,pos:28897,+cov b/src/exchange/afl-tests/id:001237,src:000004,op:flip4,pos:28897,+cov similarity index 100% rename from src/mint/afl-tests/id:001237,src:000004,op:flip4,pos:28897,+cov rename to src/exchange/afl-tests/id:001237,src:000004,op:flip4,pos:28897,+cov diff --git a/src/mint/afl-tests/id:001238,src:000004,op:flip4,pos:29158,+cov b/src/exchange/afl-tests/id:001238,src:000004,op:flip4,pos:29158,+cov similarity index 100% rename from src/mint/afl-tests/id:001238,src:000004,op:flip4,pos:29158,+cov rename to src/exchange/afl-tests/id:001238,src:000004,op:flip4,pos:29158,+cov diff --git a/src/mint/afl-tests/id:001239,src:000004,op:flip4,pos:29314,+cov b/src/exchange/afl-tests/id:001239,src:000004,op:flip4,pos:29314,+cov similarity index 100% rename from src/mint/afl-tests/id:001239,src:000004,op:flip4,pos:29314,+cov rename to src/exchange/afl-tests/id:001239,src:000004,op:flip4,pos:29314,+cov diff --git a/src/mint/afl-tests/id:001240,src:000004,op:flip4,pos:29379,+cov b/src/exchange/afl-tests/id:001240,src:000004,op:flip4,pos:29379,+cov similarity index 100% rename from src/mint/afl-tests/id:001240,src:000004,op:flip4,pos:29379,+cov rename to src/exchange/afl-tests/id:001240,src:000004,op:flip4,pos:29379,+cov diff --git a/src/mint/afl-tests/id:001241,src:000004,op:flip4,pos:30828,+cov b/src/exchange/afl-tests/id:001241,src:000004,op:flip4,pos:30828,+cov similarity index 100% rename from src/mint/afl-tests/id:001241,src:000004,op:flip4,pos:30828,+cov rename to src/exchange/afl-tests/id:001241,src:000004,op:flip4,pos:30828,+cov diff --git a/src/mint/afl-tests/id:001242,src:000004,op:flip4,pos:31450,+cov b/src/exchange/afl-tests/id:001242,src:000004,op:flip4,pos:31450,+cov similarity index 100% rename from src/mint/afl-tests/id:001242,src:000004,op:flip4,pos:31450,+cov rename to src/exchange/afl-tests/id:001242,src:000004,op:flip4,pos:31450,+cov diff --git a/src/mint/afl-tests/id:001243,src:000004,op:flip4,pos:32113,+cov b/src/exchange/afl-tests/id:001243,src:000004,op:flip4,pos:32113,+cov similarity index 100% rename from src/mint/afl-tests/id:001243,src:000004,op:flip4,pos:32113,+cov rename to src/exchange/afl-tests/id:001243,src:000004,op:flip4,pos:32113,+cov diff --git a/src/mint/afl-tests/id:001244,src:000004,op:flip4,pos:32563,+cov b/src/exchange/afl-tests/id:001244,src:000004,op:flip4,pos:32563,+cov similarity index 100% rename from src/mint/afl-tests/id:001244,src:000004,op:flip4,pos:32563,+cov rename to src/exchange/afl-tests/id:001244,src:000004,op:flip4,pos:32563,+cov diff --git a/src/mint/afl-tests/id:001245,src:000004,op:flip4,pos:32844,+cov b/src/exchange/afl-tests/id:001245,src:000004,op:flip4,pos:32844,+cov similarity index 100% rename from src/mint/afl-tests/id:001245,src:000004,op:flip4,pos:32844,+cov rename to src/exchange/afl-tests/id:001245,src:000004,op:flip4,pos:32844,+cov diff --git a/src/mint/afl-tests/id:001246,src:000004,op:flip4,pos:33202,+cov b/src/exchange/afl-tests/id:001246,src:000004,op:flip4,pos:33202,+cov similarity index 100% rename from src/mint/afl-tests/id:001246,src:000004,op:flip4,pos:33202,+cov rename to src/exchange/afl-tests/id:001246,src:000004,op:flip4,pos:33202,+cov diff --git a/src/mint/taler-mint-aggregator.c b/src/exchange/taler-exchange-aggregator.c similarity index 90% rename from src/mint/taler-mint-aggregator.c rename to src/exchange/taler-exchange-aggregator.c index 5e05c8673..3ffce1d3f 100644 --- a/src/mint/taler-mint-aggregator.c +++ b/src/exchange/taler-exchange-aggregator.c @@ -15,7 +15,7 @@ */ /** - * @file taler-mint-aggregator.c + * @file taler-exchange-aggregator.c * @brief Process that aggregates outgoing transactions and executes them * @author Christian Grothoff * @@ -27,34 +27,34 @@ #include #include #include -#include "taler_mintdb_lib.h" -#include "taler_mintdb_plugin.h" +#include "taler_exchangedb_lib.h" +#include "taler_exchangedb_plugin.h" #include "taler_wire_lib.h" /** - * Which currency is used by this mint? + * Which currency is used by this exchange? */ -static char *mint_currency_string; +static char *exchange_currency_string; /** * Which wireformat should be supported by this aggregator? */ -static char *mint_wireformat; +static char *exchange_wireformat; /** - * Base directory of the mint (global) + * Base directory of the exchange (global) */ -static char *mint_directory; +static char *exchange_directory; /** - * The mint's configuration (global) + * The exchange's configuration (global) */ static struct GNUNET_CONFIGURATION_Handle *cfg; /** * Our DB plugin. */ -static struct TALER_MINTDB_Plugin *db_plugin; +static struct TALER_EXCHANGEDB_Plugin *db_plugin; /** * Our wire plugin. @@ -78,62 +78,62 @@ static unsigned int aggregation_limit = 10000; /** - * Load configuration parameters for the mint + * Load configuration parameters for the exchange * server into the corresponding global variables. * - * @param mint_directory the mint's directory + * @param exchange_directory the exchange's directory * @return #GNUNET_OK on success */ static int -mint_serve_process_config (const char *mint_directory) +exchange_serve_process_config (const char *exchange_directory) { char *type; - cfg = TALER_config_load (mint_directory); + cfg = TALER_config_load (exchange_directory); if (NULL == cfg) { fprintf (stderr, - "Failed to load mint configuration\n"); + "Failed to load exchange configuration\n"); return GNUNET_SYSERR; } if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, - "mint", + "exchange", "currency", - &mint_currency_string)) + &exchange_currency_string)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "mint", + "exchange", "currency"); return GNUNET_SYSERR; } - if (strlen (mint_currency_string) >= TALER_CURRENCY_LEN) + if (strlen (exchange_currency_string) >= TALER_CURRENCY_LEN) { fprintf (stderr, "Currency `%s' longer than the allowed limit of %u characters.", - mint_currency_string, + exchange_currency_string, (unsigned int) TALER_CURRENCY_LEN); return GNUNET_SYSERR; } - if (NULL != mint_wireformat) + if (NULL != exchange_wireformat) GNUNET_CONFIGURATION_set_value_string (cfg, - "mint", + "exchange", "wireformat", - mint_wireformat); + exchange_wireformat); if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, - "mint", + "exchange", "wireformat", &type)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "mint", + "exchange", "wireformat"); return GNUNET_SYSERR; } if (NULL == - (db_plugin = TALER_MINTDB_plugin_load (cfg))) + (db_plugin = TALER_EXCHANGEDB_plugin_load (cfg))) { fprintf (stderr, "Failed to initialize DB subsystem\n"); @@ -201,7 +201,7 @@ struct AggregationUnit /** * Database session for all of our transactions. */ - struct TALER_MINTDB_Session *session; + struct TALER_EXCHANGEDB_Session *session; /** * Wire preparation handle. @@ -241,7 +241,7 @@ struct AggregationUnit * @param merchant_pub public key of the merchant * @param coin_pub public key of the coin * @param amount_with_fee amount that was deposited including fee - * @param deposit_fee amount the mint gets to keep as transaction fees + * @param deposit_fee amount the exchange gets to keep as transaction fees * @param transaction_id unique transaction ID chosen by the merchant * @param h_contract hash of the contract between merchant and customer * @param wire_deadline by which the merchant adviced that he would like the @@ -322,7 +322,7 @@ deposit_cb (void *cls, * @param merchant_pub public key of the merchant * @param coin_pub public key of the coin * @param amount_with_fee amount that was deposited including fee - * @param deposit_fee amount the mint gets to keep as transaction fees + * @param deposit_fee amount the exchange gets to keep as transaction fees * @param transaction_id unique transaction ID chosen by the merchant * @param h_contract hash of the contract between merchant and customer * @param wire_deadline by which the merchant adviced that he would like the @@ -439,7 +439,7 @@ run_aggregation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { int *global_ret = cls; - struct TALER_MINTDB_Session *session; + struct TALER_EXCHANGEDB_Session *session; struct AggregationUnit *au; unsigned int i; int ret; @@ -613,7 +613,7 @@ prepare_cb (void *cls, { struct AggregationUnit *au = cls; int *global_ret = au->global_ret; - struct TALER_MINTDB_Session *session = au->session; + struct TALER_EXCHANGEDB_Session *session = au->session; GNUNET_free_non_null (au->additional_rows); GNUNET_free (au); @@ -632,7 +632,7 @@ prepare_cb (void *cls, if (GNUNET_OK != db_plugin->wire_prepare_data_insert (db_plugin->cls, session, - mint_wireformat, + exchange_wireformat, buf, buf_size)) { @@ -674,7 +674,7 @@ struct WirePrepareData /** * Database session for all of our transactions. */ - struct TALER_MINTDB_Session *session; + struct TALER_EXCHANGEDB_Session *session; /** * Wire execution handle. @@ -709,7 +709,7 @@ wire_confirm_cb (void *cls, { struct WirePrepareData *wpd = cls; int *global_ret = wpd->global_ret; - struct TALER_MINTDB_Session *session = wpd->session; + struct TALER_EXCHANGEDB_Session *session = wpd->session; wpd->eh = NULL; if (GNUNET_SYSERR == success) @@ -807,7 +807,7 @@ run_transfers (void *cls, int *global_ret = cls; int ret; struct WirePrepareData *wpd; - struct TALER_MINTDB_Session *session; + struct TALER_EXCHANGEDB_Session *session; if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) return; @@ -833,7 +833,7 @@ run_transfers (void *cls, wpd->global_ret = global_ret; ret = db_plugin->wire_prepare_data_get (db_plugin->cls, session, - mint_wireformat, + exchange_wireformat, &wire_prepare_cb, wpd); if (GNUNET_SYSERR == ret) @@ -860,7 +860,7 @@ run_transfers (void *cls, /** - * The main function of the taler-mint-httpd server ("the mint"). + * The main function of the taler-exchange-httpd server ("the exchange"). * * @param argc number of arguments from the command line * @param argv command line arguments @@ -871,12 +871,12 @@ main (int argc, char *const *argv) { static const struct GNUNET_GETOPT_CommandLineOption options[] = { - {'d', "mint-dir", "DIR", - "mint directory with configuration and keys for operating the mint", 1, - &GNUNET_GETOPT_set_filename, &mint_directory}, + {'d', "exchange-dir", "DIR", + "exchange directory with configuration and keys for operating the exchange", 1, + &GNUNET_GETOPT_set_filename, &exchange_directory}, {'f', "format", "WIREFORMAT", - "wireformat to use, overrides WIREFORMAT option in [mint] section", 1, - &GNUNET_GETOPT_set_filename, &mint_wireformat}, + "wireformat to use, overrides WIREFORMAT option in [exchange] section", 1, + &GNUNET_GETOPT_set_filename, &exchange_wireformat}, TALER_GETOPT_OPTION_HELP ("background process that aggregates and executes wire transfers to merchants"), GNUNET_GETOPT_OPTION_VERSION (VERSION "-" VCS_VERSION), GNUNET_GETOPT_OPTION_END @@ -884,31 +884,31 @@ main (int argc, int ret = GNUNET_OK; GNUNET_assert (GNUNET_OK == - GNUNET_log_setup ("taler-mint-aggregator", + GNUNET_log_setup ("taler-exchange-aggregator", "INFO", NULL)); if (0 >= - GNUNET_GETOPT_run ("taler-mint-aggregator", + GNUNET_GETOPT_run ("taler-exchange-aggregator", options, argc, argv)) return 1; - if (NULL == mint_directory) + if (NULL == exchange_directory) { fprintf (stderr, - "Mint directory not specified\n"); + "Exchange directory not specified\n"); return 1; } if (GNUNET_OK != - mint_serve_process_config (mint_directory)) + exchange_serve_process_config (exchange_directory)) { return 1; } GNUNET_SCHEDULER_run (&run_transfers, &ret); - TALER_MINTDB_plugin_unload (db_plugin); + TALER_EXCHANGEDB_plugin_unload (db_plugin); TALER_WIRE_plugin_unload (wire_plugin); return (GNUNET_SYSERR == ret) ? 1 : 0; } -/* end of taler-mint-aggregator.c */ +/* end of taler-exchange-aggregator.c */ diff --git a/src/mint/taler-mint-httpd.c b/src/exchange/taler-exchange-httpd.c similarity index 88% rename from src/mint/taler-mint-httpd.c rename to src/exchange/taler-exchange-httpd.c index 5d6aa0589..c16e26409 100644 --- a/src/mint/taler-mint-httpd.c +++ b/src/exchange/taler-exchange-httpd.c @@ -15,8 +15,8 @@ */ /** - * @file taler-mint-httpd.c - * @brief Serve the HTTP interface of the mint + * @file taler-exchange-httpd.c + * @brief Serve the HTTP interface of the exchange * @author Florian Dold * @author Benedikt Mueller * @author Christian Grothoff @@ -26,51 +26,51 @@ #include #include #include -#include "taler-mint-httpd_parsing.h" -#include "taler-mint-httpd_mhd.h" -#include "taler-mint-httpd_admin.h" -#include "taler-mint-httpd_deposit.h" -#include "taler-mint-httpd_reserve.h" -#include "taler-mint-httpd_wire.h" -#include "taler-mint-httpd_refresh.h" -#include "taler-mint-httpd_tracking.h" -#include "taler-mint-httpd_keystate.h" +#include "taler-exchange-httpd_parsing.h" +#include "taler-exchange-httpd_mhd.h" +#include "taler-exchange-httpd_admin.h" +#include "taler-exchange-httpd_deposit.h" +#include "taler-exchange-httpd_reserve.h" +#include "taler-exchange-httpd_wire.h" +#include "taler-exchange-httpd_refresh.h" +#include "taler-exchange-httpd_tracking.h" +#include "taler-exchange-httpd_keystate.h" #if HAVE_DEVELOPER -#include "taler-mint-httpd_test.h" +#include "taler-exchange-httpd_test.h" #endif -#include "taler_mintdb_plugin.h" -#include "taler-mint-httpd_validation.h" +#include "taler_exchangedb_plugin.h" +#include "taler-exchange-httpd_validation.h" /** - * Which currency is used by this mint? + * Which currency is used by this exchange? */ -char *TMH_mint_currency_string; +char *TMH_exchange_currency_string; /** * Should we return "Connection: close" in each response? */ -int TMH_mint_connection_close; +int TMH_exchange_connection_close; /** - * Base directory of the mint (global) + * Base directory of the exchange (global) */ -char *TMH_mint_directory; +char *TMH_exchange_directory; /** - * The mint's configuration (global) + * The exchange's configuration (global) */ struct GNUNET_CONFIGURATION_Handle *cfg; /** * Master public key (according to the - * configuration in the mint directory). + * configuration in the exchange directory). */ struct GNUNET_CRYPTO_EddsaPublicKey TMH_master_public_key; /** * Our DB plugin. */ -struct TALER_MINTDB_Plugin *TMH_plugin; +struct TALER_EXCHANGEDB_Plugin *TMH_plugin; /** * Are we running in test mode? @@ -147,7 +147,7 @@ handle_mhd_request (void *cls, { /* Landing page, tell humans to go away. */ { "/", MHD_HTTP_METHOD_GET, "text/plain", - "Hello, I'm the Taler mint. This HTTP server is not for humans.\n", 0, + "Hello, I'm the Taler exchange. This HTTP server is not for humans.\n", 0, &TMH_MHD_handler_static_response, MHD_HTTP_OK }, /* /robots.txt: disallow everything */ { "/robots.txt", MHD_HTTP_METHOD_GET, "text/plain", @@ -161,7 +161,7 @@ handle_mhd_request (void *cls, NULL, 0, &TMH_MHD_handler_agpl_redirect, MHD_HTTP_FOUND }, - /* Return key material and fundamental properties for this mint */ + /* Return key material and fundamental properties for this exchange */ { "/keys", MHD_HTTP_METHOD_GET, "application/json", NULL, 0, &TMH_KS_handler_keys, MHD_HTTP_OK }, @@ -367,41 +367,41 @@ handle_mhd_request (void *cls, /** - * Load configuration parameters for the mint + * Load configuration parameters for the exchange * server into the corresponding global variables. * - * @param mint_directory the mint's directory + * @param exchange_directory the exchange's directory * @return #GNUNET_OK on success */ static int -mint_serve_process_config (const char *mint_directory) +exchange_serve_process_config (const char *exchange_directory) { unsigned long long port; char *TMH_master_public_key_str; - cfg = TALER_config_load (mint_directory); + cfg = TALER_config_load (exchange_directory); if (NULL == cfg) { fprintf (stderr, - "Failed to load mint configuration\n"); + "Failed to load exchange configuration\n"); return GNUNET_SYSERR; } if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, - "mint", + "exchange", "currency", - &TMH_mint_currency_string)) + &TMH_exchange_currency_string)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "mint", + "exchange", "currency"); return GNUNET_SYSERR; } - if (strlen (TMH_mint_currency_string) >= TALER_CURRENCY_LEN) + if (strlen (TMH_exchange_currency_string) >= TALER_CURRENCY_LEN) { fprintf (stderr, "Currency `%s' longer than the allowed limit of %u characters.", - TMH_mint_currency_string, + TMH_exchange_currency_string, (unsigned int) TALER_CURRENCY_LEN); return GNUNET_SYSERR; } @@ -411,12 +411,12 @@ mint_serve_process_config (const char *mint_directory) if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, - "mint", + "exchange", "master_public_key", &TMH_master_public_key_str)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "mint", + "exchange", "master_public_key"); TMH_VALIDATION_done (); return GNUNET_SYSERR; @@ -427,7 +427,7 @@ mint_serve_process_config (const char *mint_directory) &TMH_master_public_key)) { fprintf (stderr, - "Invalid master public key given in mint configuration."); + "Invalid master public key given in exchange configuration."); GNUNET_free (TMH_master_public_key_str); TMH_VALIDATION_done (); return GNUNET_SYSERR; @@ -435,7 +435,7 @@ mint_serve_process_config (const char *mint_directory) GNUNET_free (TMH_master_public_key_str); if (NULL == - (TMH_plugin = TALER_MINTDB_plugin_load (cfg))) + (TMH_plugin = TALER_EXCHANGEDB_plugin_load (cfg))) { fprintf (stderr, "Failed to initialize DB subsystem\n"); @@ -444,7 +444,7 @@ mint_serve_process_config (const char *mint_directory) } if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (cfg, - "mint", + "exchange", "TESTRUN")) { GNUNET_log (GNUNET_ERROR_TYPE_INFO, @@ -456,12 +456,12 @@ mint_serve_process_config (const char *mint_directory) if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (cfg, - "mint", + "exchange", "port", &port)) { GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR, - "mint", + "exchange", "port", "port number required"); TMH_VALIDATION_done (); @@ -619,7 +619,7 @@ handle_mhd_logs (void *cls, /** - * The main function of the taler-mint-httpd server ("the mint"). + * The main function of the taler-exchange-httpd server ("the exchange"). * * @param argc number of arguments from the command line * @param argv command line arguments @@ -632,10 +632,10 @@ main (int argc, static const struct GNUNET_GETOPT_CommandLineOption options[] = { {'C', "connection-close", NULL, "force HTTP connections to be closed after each request", 0, - &GNUNET_GETOPT_set_one, &TMH_mint_connection_close}, - {'d', "mint-dir", "DIR", - "mint directory with configuration and keys for operating the mint", 1, - &GNUNET_GETOPT_set_filename, &TMH_mint_directory}, + &GNUNET_GETOPT_set_one, &TMH_exchange_connection_close}, + {'d', "exchange-dir", "DIR", + "exchange directory with configuration and keys for operating the exchange", 1, + &GNUNET_GETOPT_set_filename, &TMH_exchange_directory}, {'t', "timeout", "SECONDS", "after how long do connections timeout by default (in seconds)", 1, &GNUNET_GETOPT_set_uint, &connection_timeout}, @@ -644,30 +644,30 @@ main (int argc, "run in test-mode using FILENAME as the HTTP request to process", 1, &GNUNET_GETOPT_set_filename, &input_filename}, #endif - TALER_GETOPT_OPTION_HELP ("HTTP server providing a RESTful API to access a Taler mint"), + TALER_GETOPT_OPTION_HELP ("HTTP server providing a RESTful API to access a Taler exchange"), GNUNET_GETOPT_OPTION_VERSION (VERSION "-" VCS_VERSION), GNUNET_GETOPT_OPTION_END }; int ret; GNUNET_assert (GNUNET_OK == - GNUNET_log_setup ("taler-mint-httpd", + GNUNET_log_setup ("taler-exchange-httpd", "INFO", NULL)); if (0 >= - GNUNET_GETOPT_run ("taler-mint-httpd", + GNUNET_GETOPT_run ("taler-exchange-httpd", options, argc, argv)) return 1; - if (NULL == TMH_mint_directory) + if (NULL == TMH_exchange_directory) { fprintf (stderr, - "Mint directory not specified\n"); + "Exchange directory not specified\n"); return 1; } if (GNUNET_OK != - mint_serve_process_config (TMH_mint_directory)) + exchange_serve_process_config (TMH_exchange_directory)) return 1; mydaemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, @@ -731,7 +731,7 @@ main (int argc, if (GNUNET_YES == TMH_test_mode) { - struct TALER_MINTDB_Session *session; + struct TALER_EXCHANGEDB_Session *session; session = TMH_plugin->get_session (TMH_plugin->cls, GNUNET_YES); @@ -741,9 +741,9 @@ main (int argc, TMH_plugin->drop_temporary (TMH_plugin->cls, session); } - TALER_MINTDB_plugin_unload (TMH_plugin); + TALER_EXCHANGEDB_plugin_unload (TMH_plugin); TMH_VALIDATION_done (); return (GNUNET_SYSERR == ret) ? 1 : 0; } -/* end of taler-mint-httpd.c */ +/* end of taler-exchange-httpd.c */ diff --git a/src/mint/taler-mint-httpd.h b/src/exchange/taler-exchange-httpd.h similarity index 80% rename from src/mint/taler-mint-httpd.h rename to src/exchange/taler-exchange-httpd.h index d45325aa6..5f17eac5b 100644 --- a/src/mint/taler-mint-httpd.h +++ b/src/exchange/taler-exchange-httpd.h @@ -14,32 +14,32 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-httpd.h - * @brief Global declarations for the mint + * @file taler-exchange-httpd.h + * @brief Global declarations for the exchange * @author Florian Dold * @author Benedikt Mueller * @author Christian Grothoff * * FIXME: Consider which of these need to really be globals... */ -#ifndef TALER_MINT_HTTPD_H -#define TALER_MINT_HTTPD_H +#ifndef TALER_EXCHANGE_HTTPD_H +#define TALER_EXCHANGE_HTTPD_H #include /** - * Which currency is used by this mint? + * Which currency is used by this exchange? */ -extern char *TMH_mint_currency_string; +extern char *TMH_exchange_currency_string; /** * Should we return "Connection: close" in each response? */ -extern int TMH_mint_connection_close; +extern int TMH_exchange_connection_close; /** - * The mint's configuration. + * The exchange's configuration. */ extern struct GNUNET_CONFIGURATION_Handle *cfg; @@ -49,25 +49,25 @@ extern struct GNUNET_CONFIGURATION_Handle *cfg; extern int TMH_test_mode; /** - * Main directory with mint data. + * Main directory with exchange data. */ -extern char *TMH_mint_directory; +extern char *TMH_exchange_directory; /** * Master public key (according to the - * configuration in the mint directory). + * configuration in the exchange directory). */ extern struct GNUNET_CRYPTO_EddsaPublicKey TMH_master_public_key; /** - * Private key of the mint we use to sign messages. + * Private key of the exchange we use to sign messages. */ -extern struct GNUNET_CRYPTO_EddsaPrivateKey TMH_mint_private_signing_key; +extern struct GNUNET_CRYPTO_EddsaPrivateKey TMH_exchange_private_signing_key; /** * Our DB plugin. */ -extern struct TALER_MINTDB_Plugin *TMH_plugin; +extern struct TALER_EXCHANGEDB_Plugin *TMH_plugin; /** diff --git a/src/mint/taler-mint-httpd_admin.c b/src/exchange/taler-exchange-httpd_admin.c similarity index 95% rename from src/mint/taler-mint-httpd_admin.c rename to src/exchange/taler-exchange-httpd_admin.c index e6f186f0b..575df7bb0 100644 --- a/src/mint/taler-mint-httpd_admin.c +++ b/src/exchange/taler-exchange-httpd_admin.c @@ -14,17 +14,17 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-httpd_admin.c + * @file taler-exchange-httpd_admin.c * @brief Handle /admin/ requests * @author Christian Grothoff */ #include "platform.h" #include #include -#include "taler-mint-httpd_admin.h" -#include "taler-mint-httpd_parsing.h" -#include "taler-mint-httpd_responses.h" -#include "taler-mint-httpd_validation.h" +#include "taler-exchange-httpd_admin.h" +#include "taler-exchange-httpd_parsing.h" +#include "taler-exchange-httpd_responses.h" +#include "taler-exchange-httpd_validation.h" /** @@ -161,4 +161,4 @@ TMH_ADMIN_handler_admin_add_incoming (struct TMH_RequestHandler *rh, return res; } -/* end of taler-mint-httpd_admin.c */ +/* end of taler-exchange-httpd_admin.c */ diff --git a/src/mint/taler-mint-httpd_admin.h b/src/exchange/taler-exchange-httpd_admin.h similarity index 91% rename from src/mint/taler-mint-httpd_admin.h rename to src/exchange/taler-exchange-httpd_admin.h index b8ca3ce59..d720d61d3 100644 --- a/src/mint/taler-mint-httpd_admin.h +++ b/src/exchange/taler-exchange-httpd_admin.h @@ -14,15 +14,15 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-httpd_admin.h + * @file taler-exchange-httpd_admin.h * @brief Handle /admin/ requests * @author Christian Grothoff */ -#ifndef TALER_MINT_HTTPD_ADMIN_H -#define TALER_MINT_HTTPD_ADMIN_H +#ifndef TALER_EXCHANGE_HTTPD_ADMIN_H +#define TALER_EXCHANGE_HTTPD_ADMIN_H #include -#include "taler-mint-httpd.h" +#include "taler-exchange-httpd.h" /** * Handle a "/admin/add/incoming" request. Parses the diff --git a/src/mint/taler-mint-httpd_db.c b/src/exchange/taler-exchange-httpd_db.c similarity index 94% rename from src/mint/taler-mint-httpd_db.c rename to src/exchange/taler-exchange-httpd_db.c index 8c22a0a2a..9d04efa9b 100644 --- a/src/mint/taler-mint-httpd_db.c +++ b/src/exchange/taler-exchange-httpd_db.c @@ -14,15 +14,15 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-httpd_db.c - * @brief High-level (transactional-layer) database operations for the mint. + * @file taler-exchange-httpd_db.c + * @brief High-level (transactional-layer) database operations for the exchange. * @author Christian Grothoff */ #include "platform.h" #include #include -#include "taler-mint-httpd_responses.h" -#include "taler-mint-httpd_keystate.h" +#include "taler-exchange-httpd_responses.h" +#include "taler-exchange-httpd_keystate.h" /** * How often should we retry a transaction before giving up @@ -97,18 +97,18 @@ transaction_start_label: /* we will use goto for retries */ \ * @return #GNUNET_OK on success, #GNUNET_SYSERR on errors */ static int -calculate_transaction_list_totals (struct TALER_MINTDB_TransactionList *tl, +calculate_transaction_list_totals (struct TALER_EXCHANGEDB_TransactionList *tl, const struct TALER_Amount *off, struct TALER_Amount *ret) { struct TALER_Amount spent = *off; - struct TALER_MINTDB_TransactionList *pos; + struct TALER_EXCHANGEDB_TransactionList *pos; for (pos = tl; NULL != pos; pos = pos->next) { switch (pos->type) { - case TALER_MINTDB_TT_DEPOSIT: + case TALER_EXCHANGEDB_TT_DEPOSIT: if (GNUNET_OK != TALER_amount_add (&spent, &spent, @@ -118,7 +118,7 @@ calculate_transaction_list_totals (struct TALER_MINTDB_TransactionList *tl, return GNUNET_SYSERR; } break; - case TALER_MINTDB_TT_REFRESH_MELT: + case TALER_EXCHANGEDB_TT_REFRESH_MELT: if (GNUNET_OK != TALER_amount_add (&spent, &spent, @@ -147,15 +147,15 @@ calculate_transaction_list_totals (struct TALER_MINTDB_TransactionList *tl, */ int TMH_DB_execute_deposit (struct MHD_Connection *connection, - const struct TALER_MINTDB_Deposit *deposit) + const struct TALER_EXCHANGEDB_Deposit *deposit) { - struct TALER_MINTDB_Session *session; - struct TALER_MINTDB_TransactionList *tl; + struct TALER_EXCHANGEDB_Session *session; + struct TALER_EXCHANGEDB_TransactionList *tl; struct TALER_Amount spent; struct TALER_Amount value; struct TALER_Amount amount_without_fee; struct TMH_KS_StateHandle *mks; - struct TALER_MINTDB_DenominationKeyIssueInformation *dki; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki; int ret; if (NULL == (session = TMH_plugin->get_session (TMH_plugin->cls, @@ -270,8 +270,8 @@ int TMH_DB_execute_reserve_status (struct MHD_Connection *connection, const struct TALER_ReservePublicKeyP *reserve_pub) { - struct TALER_MINTDB_Session *session; - struct TALER_MINTDB_ReserveHistory *rh; + struct TALER_EXCHANGEDB_Session *session; + struct TALER_EXCHANGEDB_ReserveHistory *rh; int res; if (NULL == (session = TMH_plugin->get_session (TMH_plugin->cls, @@ -316,21 +316,21 @@ TMH_DB_execute_reserve_status (struct MHD_Connection *connection, */ static int execute_reserve_withdraw_transaction (struct MHD_Connection *connection, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, struct TMH_KS_StateHandle *key_state, const struct TALER_ReservePublicKeyP *reserve, const struct TALER_DenominationPublicKey *denomination_pub, - const struct TALER_MINTDB_DenominationKeyIssueInformation *dki, + const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki, const char *blinded_msg, size_t blinded_msg_len, const struct GNUNET_HashCode *h_blind, const struct TALER_ReserveSignatureP *signature, struct TALER_DenominationSignature *denom_sig) { - struct TALER_MINTDB_ReserveHistory *rh; - const struct TALER_MINTDB_ReserveHistory *pos; - struct TALER_MINTDB_DenominationKeyIssueInformation *tdki; - struct TALER_MINTDB_CollectableBlindcoin collectable; + struct TALER_EXCHANGEDB_ReserveHistory *rh; + const struct TALER_EXCHANGEDB_ReserveHistory *pos; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *tdki; + struct TALER_EXCHANGEDB_CollectableBlindcoin collectable; struct TALER_Amount amount_required; struct TALER_Amount deposit_total; struct TALER_Amount withdraw_total; @@ -374,7 +374,7 @@ execute_reserve_withdraw_transaction (struct MHD_Connection *connection, { switch (pos->type) { - case TALER_MINTDB_RO_BANK_TO_MINT: + case TALER_EXCHANGEDB_RO_BANK_TO_EXCHANGE: if (0 == (res & 1)) deposit_total = pos->details.bank->amount; else @@ -389,7 +389,7 @@ execute_reserve_withdraw_transaction (struct MHD_Connection *connection, } res |= 1; break; - case TALER_MINTDB_RO_WITHDRAW_COIN: + case TALER_EXCHANGEDB_RO_WITHDRAW_COIN: tdki = TMH_KS_denomination_key_lookup (key_state, &pos->details.withdraw->denom_pub, TMH_KS_DKU_WITHDRAW); @@ -509,10 +509,10 @@ TMH_DB_execute_reserve_withdraw (struct MHD_Connection *connection, size_t blinded_msg_len, const struct TALER_ReserveSignatureP *signature) { - struct TALER_MINTDB_Session *session; + struct TALER_EXCHANGEDB_Session *session; struct TMH_KS_StateHandle *key_state; - struct TALER_MINTDB_DenominationKeyIssueInformation *dki; - struct TALER_MINTDB_CollectableBlindcoin collectable; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki; + struct TALER_EXCHANGEDB_CollectableBlindcoin collectable; struct TALER_DenominationSignature denom_sig; struct GNUNET_HashCode h_blind; int res; @@ -585,7 +585,7 @@ TMH_DB_execute_reserve_withdraw (struct MHD_Connection *connection, * * @param connection the connection to send errors to * @param session the database connection - * @param key_state the mint's key state + * @param key_state the exchange's key state * @param session_hash hash identifying the refresh session * @param coin_details details about the coin being melted * @param oldcoin_index what is the number assigned to this coin @@ -595,19 +595,19 @@ TMH_DB_execute_reserve_withdraw (struct MHD_Connection *connection, */ static int refresh_accept_melts (struct MHD_Connection *connection, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TMH_KS_StateHandle *key_state, const struct GNUNET_HashCode *session_hash, const struct TMH_DB_MeltDetails *coin_details, uint16_t oldcoin_index) { - struct TALER_MINTDB_DenominationKeyIssueInformation *dk; - struct TALER_MINTDB_DenominationKeyInformationP *dki; - struct TALER_MINTDB_TransactionList *tl; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dk; + struct TALER_EXCHANGEDB_DenominationKeyInformationP *dki; + struct TALER_EXCHANGEDB_TransactionList *tl; struct TALER_Amount coin_value; struct TALER_Amount coin_residual; struct TALER_Amount spent; - struct TALER_MINTDB_RefreshMelt melt; + struct TALER_EXCHANGEDB_RefreshMelt melt; int res; dk = TMH_KS_denomination_key_lookup (key_state, @@ -696,10 +696,10 @@ refresh_accept_melts (struct MHD_Connection *connection, * @param denom_pubs public keys of the coins we want to withdraw in the end * @param coin_count number of entries in @a coin_melt_details, size of y-dimension of @a commit_link array * @param coin_melt_details signatures and (residual) value of the respective coin should be melted - * @param commit_coin 2d array of coin commitments (what the mint is to sign + * @param commit_coin 2d array of coin commitments (what the exchange is to sign * once the "/refres/reveal" of cut and choose is done), * x-dimension must be #TALER_CNC_KAPPA - * @param commit_link 2d array of coin link commitments (what the mint is + * @param commit_link 2d array of coin link commitments (what the exchange is * to return via "/refresh/link" to enable linkage in the * future) * x-dimension must be #TALER_CNC_KAPPA @@ -712,12 +712,12 @@ TMH_DB_execute_refresh_melt (struct MHD_Connection *connection, const struct TALER_DenominationPublicKey *denom_pubs, unsigned int coin_count, const struct TMH_DB_MeltDetails *coin_melt_details, - struct TALER_MINTDB_RefreshCommitCoin *const* commit_coin, + struct TALER_EXCHANGEDB_RefreshCommitCoin *const* commit_coin, struct TALER_RefreshCommitLinkP *const* commit_link) { struct TMH_KS_StateHandle *key_state; - struct TALER_MINTDB_RefreshSession refresh_session; - struct TALER_MINTDB_Session *session; + struct TALER_EXCHANGEDB_RefreshSession refresh_session; + struct TALER_EXCHANGEDB_Session *session; int res; unsigned int i; @@ -851,13 +851,13 @@ TMH_DB_execute_refresh_melt (struct MHD_Connection *connection, */ static int send_melt_commitment_error (struct MHD_Connection *connection, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, unsigned int off, unsigned int index, const char *object_name) { - struct TALER_MINTDB_MeltCommitment *mc; + struct TALER_EXCHANGEDB_MeltCommitment *mc; int ret; mc = TMH_plugin->get_melt_commitment (TMH_plugin->cls, @@ -905,12 +905,12 @@ send_melt_commitment_error (struct MHD_Connection *connection, */ static int check_commitment (struct MHD_Connection *connection, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, unsigned int off, unsigned int num_oldcoins, const struct TALER_TransferPrivateKeyP *transfer_privs, - const struct TALER_MINTDB_RefreshMelt *melts, + const struct TALER_EXCHANGEDB_RefreshMelt *melts, unsigned int num_newcoins, const struct TALER_DenominationPublicKey *denom_pubs) { @@ -918,7 +918,7 @@ check_commitment (struct MHD_Connection *connection, struct TALER_LinkSecretP last_shared_secret; int secret_initialized = GNUNET_NO; struct TALER_RefreshCommitLinkP *commit_links; - struct TALER_MINTDB_RefreshCommitCoin *commit_coins; + struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coins; commit_links = GNUNET_malloc (num_oldcoins * sizeof (struct TALER_RefreshCommitLinkP)); @@ -996,7 +996,7 @@ check_commitment (struct MHD_Connection *connection, /* Check that the commitments for all new coins were correct */ commit_coins = GNUNET_malloc (num_newcoins * - sizeof (struct TALER_MINTDB_RefreshCommitCoin)); + sizeof (struct TALER_EXCHANGEDB_RefreshCommitCoin)); if (GNUNET_OK != TMH_plugin->get_refresh_commit_coins (TMH_plugin->cls, @@ -1076,7 +1076,7 @@ check_commitment (struct MHD_Connection *connection, /** - * Mint a coin as part of a refresh operation. Obtains the + * Exchange a coin as part of a refresh operation. Obtains the * envelope from the database and performs the signing operation. * * @param connection the MHD connection to handle @@ -1089,15 +1089,15 @@ check_commitment (struct MHD_Connection *connection, * @return NULL on error, otherwise signature over the coin */ static struct TALER_DenominationSignature -refresh_mint_coin (struct MHD_Connection *connection, - struct TALER_MINTDB_Session *session, +refresh_exchange_coin (struct MHD_Connection *connection, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, struct TMH_KS_StateHandle *key_state, const struct TALER_DenominationPublicKey *denom_pub, - const struct TALER_MINTDB_RefreshCommitCoin *commit_coin, + const struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coin, unsigned int coin_off) { - struct TALER_MINTDB_DenominationKeyIssueInformation *dki; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki; struct TALER_DenominationSignature ev_sig; dki = TMH_KS_denomination_key_lookup (key_state, @@ -1154,13 +1154,13 @@ refresh_mint_coin (struct MHD_Connection *connection, */ static int execute_refresh_reveal_transaction (struct MHD_Connection *connection, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, - const struct TALER_MINTDB_RefreshSession *refresh_session, - const struct TALER_MINTDB_RefreshMelt *melts, + const struct TALER_EXCHANGEDB_RefreshSession *refresh_session, + const struct TALER_EXCHANGEDB_RefreshMelt *melts, const struct TALER_DenominationPublicKey *denom_pubs, struct TALER_DenominationSignature *ev_sigs, - struct TALER_MINTDB_RefreshCommitCoin *commit_coins) + struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coins) { unsigned int j; struct TMH_KS_StateHandle *key_state; @@ -1181,7 +1181,7 @@ execute_refresh_reveal_transaction (struct MHD_Connection *connection, for (j=0;jnum_newcoins;j++) { if (NULL == ev_sigs[j].rsa_signature) /* could be non-NULL during retries */ - ev_sigs[j] = refresh_mint_coin (connection, + ev_sigs[j] = refresh_exchange_coin (connection, session, session_hash, key_state, @@ -1223,12 +1223,12 @@ TMH_DB_execute_refresh_reveal (struct MHD_Connection *connection, struct TALER_TransferPrivateKeyP **transfer_privs) { int res; - struct TALER_MINTDB_Session *session; - struct TALER_MINTDB_RefreshSession refresh_session; - struct TALER_MINTDB_RefreshMelt *melts; + struct TALER_EXCHANGEDB_Session *session; + struct TALER_EXCHANGEDB_RefreshSession refresh_session; + struct TALER_EXCHANGEDB_RefreshMelt *melts; struct TALER_DenominationPublicKey *denom_pubs; struct TALER_DenominationSignature *ev_sigs; - struct TALER_MINTDB_RefreshCommitCoin *commit_coins; + struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coins; unsigned int i; unsigned int j; unsigned int off; @@ -1256,7 +1256,7 @@ TMH_DB_execute_refresh_reveal (struct MHD_Connection *connection, } melts = GNUNET_malloc (refresh_session.num_oldcoins * - sizeof (struct TALER_MINTDB_RefreshMelt)); + sizeof (struct TALER_EXCHANGEDB_RefreshMelt)); for (j=0;jstatus) @@ -1521,7 +1521,7 @@ TMH_DB_execute_admin_add_incoming (struct MHD_Connection *connection, struct GNUNET_TIME_Absolute execution_time, json_t *wire) { - struct TALER_MINTDB_Session *session; + struct TALER_EXCHANGEDB_Session *session; int ret; if (NULL == (session = TMH_plugin->get_session (TMH_plugin->cls, @@ -1605,7 +1605,7 @@ struct WtidTransactionContext * @param transaction_id merchant's transaction ID for the payment * @param coin_pub which public key was this payment about * @param deposit_value amount contributed by this coin in total - * @param deposit_fee deposit fee charged by mint for this coin + * @param deposit_fee deposit fee charged by exchange for this coin */ static void handle_transaction_data (void *cls, @@ -1697,7 +1697,7 @@ TMH_DB_execute_wire_deposits (struct MHD_Connection *connection, { int ret; struct WtidTransactionContext ctx; - struct TALER_MINTDB_Session *session; + struct TALER_EXCHANGEDB_Session *session; if (NULL == (session = TMH_plugin->get_session (TMH_plugin->cls, TMH_test_mode))) @@ -1785,11 +1785,11 @@ struct DepositWtidContext * if the transaction was not yet done * @param coin_contribution how much did the coin we asked about * contribute to the total transfer value? (deposit value including fee) - * @param coin_fee how much did the mint charge for the deposit fee + * @param coin_fee how much did the exchange charge for the deposit fee * @param execution_time when was the transaction done, or * when we expect it to be done (if @a wtid was NULL); * #GNUNET_TIME_UNIT_FOREVER_ABS if the /deposit is unknown - * to the mint + * to the exchange */ static void handle_wtid_data (void *cls, @@ -1853,7 +1853,7 @@ TMH_DB_execute_deposit_wtid (struct MHD_Connection *connection, { int ret; struct DepositWtidContext ctx; - struct TALER_MINTDB_Session *session; + struct TALER_EXCHANGEDB_Session *session; if (NULL == (session = TMH_plugin->get_session (TMH_plugin->cls, TMH_test_mode))) @@ -1897,4 +1897,4 @@ TMH_DB_execute_deposit_wtid (struct MHD_Connection *connection, } -/* end of taler-mint-httpd_db.c */ +/* end of taler-exchange-httpd_db.c */ diff --git a/src/mint/taler-mint-httpd_db.h b/src/exchange/taler-exchange-httpd_db.h similarity index 93% rename from src/mint/taler-mint-httpd_db.h rename to src/exchange/taler-exchange-httpd_db.h index 0327bef2a..d6245a702 100644 --- a/src/mint/taler-mint-httpd_db.h +++ b/src/exchange/taler-exchange-httpd_db.h @@ -14,15 +14,15 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file mint/taler-mint-httpd_db.h - * @brief High-level (transactional-layer) database operations for the mint + * @file exchange/taler-exchange-httpd_db.h + * @brief High-level (transactional-layer) database operations for the exchange * @author Chrisitan Grothoff */ -#ifndef TALER_MINT_HTTPD_DB_H -#define TALER_MINT_HTTPD_DB_H +#ifndef TALER_EXCHANGE_HTTPD_DB_H +#define TALER_EXCHANGE_HTTPD_DB_H #include -#include "taler_mintdb_plugin.h" +#include "taler_exchangedb_plugin.h" /** @@ -37,7 +37,7 @@ */ int TMH_DB_execute_deposit (struct MHD_Connection *connection, - const struct TALER_MINTDB_Deposit *deposit); + const struct TALER_EXCHANGEDB_Deposit *deposit); /** @@ -89,7 +89,7 @@ struct TMH_DB_MeltDetails /** * Signature allowing the melt (using - * a `struct TALER_MINTDB_RefreshMeltConfirmSignRequestBody`) to sign over. + * a `struct TALER_EXCHANGEDB_RefreshMeltConfirmSignRequestBody`) to sign over. */ struct TALER_CoinSpendSignatureP melt_sig; @@ -101,7 +101,7 @@ struct TMH_DB_MeltDetails struct TALER_Amount melt_amount_with_fee; /** - * What fee is earned by the mint? Set delayed during + * What fee is earned by the exchange? Set delayed during * #verify_coin_public_info(). */ struct TALER_Amount melt_fee; @@ -121,9 +121,9 @@ struct TMH_DB_MeltDetails * @param denom_pubs array of public denomination keys for the refresh (?) * @param coin_count number of entries in @ a coin_melt_details, size of y-dimension of @a commit_link array * @param coin_melt_details signatures and (residual) value of and information about the respective coin to be melted - * @param commit_coin 2d array of coin commitments (what the mint is to sign + * @param commit_coin 2d array of coin commitments (what the exchange is to sign * once the "/refres/reveal" of cut and choose is done) - * @param commit_link 2d array of coin link commitments (what the mint is + * @param commit_link 2d array of coin link commitments (what the exchange is * to return via "/refresh/link" to enable linkage in the * future) * @return MHD result code @@ -135,7 +135,7 @@ TMH_DB_execute_refresh_melt (struct MHD_Connection *connection, const struct TALER_DenominationPublicKey *denom_pubs, unsigned int coin_count, const struct TMH_DB_MeltDetails *coin_melt_details, - struct TALER_MINTDB_RefreshCommitCoin *const* commit_coin, + struct TALER_EXCHANGEDB_RefreshCommitCoin *const* commit_coin, struct TALER_RefreshCommitLinkP *const* commit_link); @@ -227,4 +227,4 @@ TMH_DB_execute_deposit_wtid (struct MHD_Connection *connection, #endif -/* TALER_MINT_HTTPD_DB_H */ +/* TALER_EXCHANGE_HTTPD_DB_H */ diff --git a/src/mint/taler-mint-httpd_deposit.c b/src/exchange/taler-exchange-httpd_deposit.c similarity index 94% rename from src/mint/taler-mint-httpd_deposit.c rename to src/exchange/taler-exchange-httpd_deposit.c index 40c5a4db7..629d6f8b5 100644 --- a/src/mint/taler-mint-httpd_deposit.c +++ b/src/exchange/taler-exchange-httpd_deposit.c @@ -14,7 +14,7 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-httpd_deposit.c + * @file taler-exchange-httpd_deposit.c * @brief Handle /deposit requests; parses the POST and JSON and * verifies the coin signature before handing things off * to the database. @@ -30,11 +30,11 @@ #include #include #include -#include "taler-mint-httpd_parsing.h" -#include "taler-mint-httpd_deposit.h" -#include "taler-mint-httpd_responses.h" -#include "taler-mint-httpd_keystate.h" -#include "taler-mint-httpd_validation.h" +#include "taler-exchange-httpd_parsing.h" +#include "taler-exchange-httpd_deposit.h" +#include "taler-exchange-httpd_responses.h" +#include "taler-exchange-httpd_keystate.h" +#include "taler-exchange-httpd_validation.h" /** @@ -49,11 +49,11 @@ */ static int verify_and_execute_deposit (struct MHD_Connection *connection, - const struct TALER_MINTDB_Deposit *deposit) + const struct TALER_EXCHANGEDB_Deposit *deposit) { struct TMH_KS_StateHandle *key_state; struct TALER_DepositRequestPS dr; - struct TALER_MINTDB_DenominationKeyIssueInformation *dki; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki; struct TALER_Amount fee_deposit; dr.purpose.purpose = htonl (TALER_SIGNATURE_WALLET_COIN_DEPOSIT); @@ -134,8 +134,8 @@ parse_and_handle_deposit_request (struct MHD_Connection *connection, json_t *wire) { int res; - struct TALER_MINTDB_Deposit deposit; - struct TALER_MINTDB_DenominationKeyIssueInformation *dki; + struct TALER_EXCHANGEDB_Deposit deposit; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki; struct TMH_KS_StateHandle *ks; struct GNUNET_HashCode my_h_wire; struct TMH_PARSE_FieldSpecification spec[] = { @@ -278,4 +278,4 @@ TMH_DEPOSIT_handler_deposit (struct TMH_RequestHandler *rh, } -/* end of taler-mint-httpd_deposit.c */ +/* end of taler-exchange-httpd_deposit.c */ diff --git a/src/mint/taler-mint-httpd_deposit.h b/src/exchange/taler-exchange-httpd_deposit.h similarity index 92% rename from src/mint/taler-mint-httpd_deposit.h rename to src/exchange/taler-exchange-httpd_deposit.h index c2d3fe13c..6e84573e5 100644 --- a/src/mint/taler-mint-httpd_deposit.h +++ b/src/exchange/taler-exchange-httpd_deposit.h @@ -14,18 +14,18 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-httpd_deposit.h + * @file taler-exchange-httpd_deposit.h * @brief Handle /deposit requests * @author Florian Dold * @author Benedikt Mueller * @author Christian Grothoff */ -#ifndef TALER_MINT_HTTPD_DEPOSIT_H -#define TALER_MINT_HTTPD_DEPOSIT_H +#ifndef TALER_EXCHANGE_HTTPD_DEPOSIT_H +#define TALER_EXCHANGE_HTTPD_DEPOSIT_H #include #include -#include "taler-mint-httpd.h" +#include "taler-exchange-httpd.h" /** diff --git a/src/mint/taler-mint-httpd_keystate.c b/src/exchange/taler-exchange-httpd_keystate.c similarity index 91% rename from src/mint/taler-mint-httpd_keystate.c rename to src/exchange/taler-exchange-httpd_keystate.c index f1856e673..e278882fe 100644 --- a/src/mint/taler-mint-httpd_keystate.c +++ b/src/exchange/taler-exchange-httpd_keystate.c @@ -14,7 +14,7 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-httpd_keystate.c + * @file taler-exchange-httpd_keystate.c * @brief management of our coin signing keys * @author Florian Dold * @author Benedikt Mueller @@ -22,14 +22,14 @@ */ #include "platform.h" #include -#include "taler-mint-httpd_keystate.h" -#include "taler-mint-httpd_responses.h" -#include "taler_mintdb_plugin.h" +#include "taler-exchange-httpd_keystate.h" +#include "taler-exchange-httpd_responses.h" +#include "taler_exchangedb_plugin.h" /** * Snapshot of the (coin and signing) keys (including private keys) of - * the mint. There can be multiple instances of this struct, as it is + * the exchange. There can be multiple instances of this struct, as it is * reference counted and only destroyed once the last user is done * with it. The current instance is acquired using * #TMH_KS_acquire(). Using this function increases the @@ -58,7 +58,7 @@ struct TMH_KS_StateHandle json_t *auditors_array; /** - * Cached JSON text that the mint will send for a "/keys" request. + * Cached JSON text that the exchange will send for a "/keys" request. * Includes our @e TMH_master_public_key public key, the signing and * denomination keys as well as the @e reload_time. */ @@ -88,9 +88,9 @@ struct TMH_KS_StateHandle struct GNUNET_TIME_Absolute next_reload; /** - * Mint signing key that should be used currently. + * Exchange signing key that should be used currently. */ - struct TALER_MINTDB_PrivateSigningKeyInformationP current_sign_key_issue; + struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP current_sign_key_issue; /** * Reference count. The struct is released when the RC hits zero. @@ -100,7 +100,7 @@ struct TMH_KS_StateHandle /** - * Mint key state. Never use directly, instead access via + * Exchange key state. Never use directly, instead access via * #TMH_KS_acquire() and #TMH_KS_release(). */ static struct TMH_KS_StateHandle *internal_key_state; @@ -126,7 +126,7 @@ static int reload_pipe[2]; */ static json_t * denom_key_issue_to_json (const struct TALER_DenominationPublicKey *pk, - const struct TALER_MINTDB_DenominationKeyInformationP *dki) + const struct TALER_EXCHANGEDB_DenominationKeyInformationP *dki) { struct TALER_Amount value; struct TALER_Amount fee_withdraw; @@ -174,18 +174,18 @@ denom_key_issue_to_json (const struct TALER_DenominationPublicKey *pk, * @return the provide duration */ static struct GNUNET_TIME_Relative -TALER_MINT_conf_duration_provide () +TALER_EXCHANGE_conf_duration_provide () { struct GNUNET_TIME_Relative rel; if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_time (cfg, - "mint_keys", + "exchange_keys", "lookahead_provide", &rel)) { GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR, - "mint_keys", + "exchange_keys", "lookahead_provide", "time value required"); GNUNET_assert (0); @@ -207,20 +207,20 @@ TALER_MINT_conf_duration_provide () static int reload_keys_denom_iter (void *cls, const char *alias, - const struct TALER_MINTDB_DenominationKeyIssueInformation *dki) + const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki) { struct TMH_KS_StateHandle *ctx = cls; struct GNUNET_TIME_Absolute now; struct GNUNET_TIME_Absolute horizon; struct GNUNET_HashCode denom_key_hash; - struct TALER_MINTDB_DenominationKeyIssueInformation *d2; - struct TALER_MINTDB_Session *session; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *d2; + struct TALER_EXCHANGEDB_Session *session; int res; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Loading denomination key `%s'\n", alias); - horizon = GNUNET_TIME_relative_to_absolute (TALER_MINT_conf_duration_provide ()); + horizon = GNUNET_TIME_relative_to_absolute (TALER_EXCHANGE_conf_duration_provide ()); if (GNUNET_TIME_absolute_ntoh (dki->issue.properties.start).abs_value_us > horizon.abs_value_us) { @@ -303,7 +303,7 @@ reload_keys_denom_iter (void *cls, as it is possible we just retry until we succeed. */ } - d2 = GNUNET_new (struct TALER_MINTDB_DenominationKeyIssueInformation); + d2 = GNUNET_new (struct TALER_EXCHANGEDB_DenominationKeyIssueInformation); d2->issue = dki->issue; d2->denom_priv.rsa_private_key = GNUNET_CRYPTO_rsa_private_key_dup (dki->denom_priv.rsa_private_key); @@ -337,7 +337,7 @@ reload_keys_denom_iter (void *cls, * @return a JSON object describing the sign key issue (public part) */ static json_t * -sign_key_issue_to_json (const struct TALER_MintSigningKeyValidityPS *ski) +sign_key_issue_to_json (const struct TALER_ExchangeSigningKeyValidityPS *ski) { return json_pack ("{s:o, s:o, s:o, s:o, s:o, s:o}", @@ -355,7 +355,7 @@ sign_key_issue_to_json (const struct TALER_MintSigningKeyValidityPS *ski) sizeof (struct TALER_MasterSignatureP)), "key", TALER_json_from_data (&ski->signkey_pub, - sizeof (struct TALER_MintPublicKeyP))); + sizeof (struct TALER_ExchangePublicKeyP))); } @@ -372,13 +372,13 @@ sign_key_issue_to_json (const struct TALER_MintSigningKeyValidityPS *ski) static int reload_keys_sign_iter (void *cls, const char *filename, - const struct TALER_MINTDB_PrivateSigningKeyInformationP *ski) + const struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP *ski) { struct TMH_KS_StateHandle *ctx = cls; struct GNUNET_TIME_Absolute now; struct GNUNET_TIME_Absolute horizon; - horizon = GNUNET_TIME_relative_to_absolute (TALER_MINT_conf_duration_provide ()); + horizon = GNUNET_TIME_relative_to_absolute (TALER_EXCHANGE_conf_duration_provide ()); if (GNUNET_TIME_absolute_ntoh (ski->issue.start).abs_value_us > horizon.abs_value_us) { @@ -453,13 +453,13 @@ auditor_to_json (const struct TALER_AuditorPublicKeyP *apub, /** * @brief Iterator called with auditor information. - * Check that the @a mpub actually matches this mint, and then + * Check that the @a mpub actually matches this exchange, and then * add the auditor information to our /keys response (if it is * (still) applicable). * * @param cls closure with the `struct TMH_KS_StateHandle *` * @param apub the auditor's public key - * @param mpub the mint's public key (as expected by the auditor) + * @param mpub the exchange's public key (as expected by the auditor) * @param dki_len length of @a dki and @a asigs * @param asigs array with the auditor's signatures, of length @a dki_len * @param dki array of denomination coin data signed by the auditor @@ -481,13 +481,13 @@ reload_auditor_iter (void *cls, const struct TALER_AuditorSignatureP *kept_asigs[dki_len]; const struct TALER_DenominationKeyValidityPS *kept_dkis[dki_len]; - /* Check if the signature is at least for this mint. */ + /* Check if the signature is at least for this exchange. */ if (0 != memcmp (&mpub->eddsa_pub, &TMH_master_public_key, sizeof (struct GNUNET_CRYPTO_EddsaPublicKey))) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Auditing information provided for a different mint, ignored\n"); + "Auditing information provided for a different exchange, ignored\n"); return GNUNET_OK; } /* Filter the auditor information for those for which the @@ -529,7 +529,7 @@ free_denom_key (void *cls, const struct GNUNET_HashCode *key, void *value) { - struct TALER_MINTDB_DenominationKeyIssueInformation *dki = value; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki = value; GNUNET_CRYPTO_rsa_private_key_free (dki->denom_priv.rsa_private_key); GNUNET_CRYPTO_rsa_public_key_free (dki->denom_pub.rsa_public_key); @@ -592,7 +592,7 @@ TMH_KS_release_ (const char *location, /** - * Acquire the key state of the mint. Updates keys if necessary. + * Acquire the key state of the exchange. Updates keys if necessary. * For every call to #TMH_KS_acquire(), a matching call * to #TMH_KS_release() must be made. * @@ -605,8 +605,8 @@ TMH_KS_acquire_ (const char *location) struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get (); struct TMH_KS_StateHandle *key_state; json_t *keys; - struct TALER_MintKeySetPS ks; - struct TALER_MintSignatureP sig; + struct TALER_ExchangeKeySetPS ks; + struct TALER_ExchangeSignatureP sig; GNUNET_assert (0 == pthread_mutex_lock (&internal_key_state_mutex)); if ( (NULL != internal_key_state) && @@ -636,18 +636,18 @@ TMH_KS_acquire_ (const char *location) TALER_round_abs_time (&key_state->reload_time); GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Loading keys from `%s'\n", - TMH_mint_directory); - TALER_MINTDB_denomination_keys_iterate (TMH_mint_directory, + TMH_exchange_directory); + TALER_EXCHANGEDB_denomination_keys_iterate (TMH_exchange_directory, &reload_keys_denom_iter, key_state); - TALER_MINTDB_signing_keys_iterate (TMH_mint_directory, + TALER_EXCHANGEDB_signing_keys_iterate (TMH_exchange_directory, &reload_keys_sign_iter, key_state); - TALER_MINTDB_auditor_iterate (TMH_mint_directory, + TALER_EXCHANGEDB_auditor_iterate (TMH_exchange_directory, &reload_auditor_iter, key_state); ks.purpose.size = htonl (sizeof (ks)); - ks.purpose.purpose = htonl (TALER_SIGNATURE_MINT_KEY_SET); + ks.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_KEY_SET); ks.list_issue_date = GNUNET_TIME_absolute_hton (key_state->reload_time); GNUNET_CRYPTO_hash_context_finish (key_state->hash_context, &ks.hc); @@ -670,9 +670,9 @@ TMH_KS_acquire_ (const char *location) "auditors", key_state->auditors_array, "list_issue_date", TALER_json_from_abs (key_state->reload_time), "eddsa_pub", TALER_json_from_data (&key_state->current_sign_key_issue.issue.signkey_pub, - sizeof (struct TALER_MintPublicKeyP)), + sizeof (struct TALER_ExchangePublicKeyP)), "eddsa_sig", TALER_json_from_data (&sig, - sizeof (struct TALER_MintSignatureP))); + sizeof (struct TALER_ExchangeSignatureP))); key_state->auditors_array = NULL; key_state->sign_keys_array = NULL; key_state->denom_keys_array = NULL; @@ -698,13 +698,13 @@ TMH_KS_acquire_ (const char *location) * @return the denomination key issue, * or NULL if denom_pub could not be found */ -struct TALER_MINTDB_DenominationKeyIssueInformation * +struct TALER_EXCHANGEDB_DenominationKeyIssueInformation * TMH_KS_denomination_key_lookup (const struct TMH_KS_StateHandle *key_state, const struct TALER_DenominationPublicKey *denom_pub, enum TMH_KS_DenominationKeyUse use) { struct GNUNET_HashCode hc; - struct TALER_MINTDB_DenominationKeyIssueInformation *dki; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki; struct GNUNET_TIME_Absolute now; GNUNET_CRYPTO_rsa_public_key_hash (denom_pub->rsa_public_key, @@ -940,16 +940,16 @@ read_again: /** - * Sign the message in @a purpose with the mint's signing key. + * Sign the message in @a purpose with the exchange's signing key. * * @param purpose the message to sign - * @param[out] pub set to the current public signing key of the mint + * @param[out] pub set to the current public signing key of the exchange * @param[out] sig signature over purpose using current signing key */ void TMH_KS_sign (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose, - struct TALER_MintPublicKeyP *pub, - struct TALER_MintSignatureP *sig) + struct TALER_ExchangePublicKeyP *pub, + struct TALER_ExchangeSignatureP *sig) { struct TMH_KS_StateHandle *key_state; @@ -1008,4 +1008,4 @@ TMH_KS_handler_keys (struct TMH_RequestHandler *rh, } -/* end of taler-mint-httpd_keystate.c */ +/* end of taler-exchange-httpd_keystate.c */ diff --git a/src/mint/taler-mint-httpd_keystate.h b/src/exchange/taler-exchange-httpd_keystate.h similarity index 87% rename from src/mint/taler-mint-httpd_keystate.h rename to src/exchange/taler-exchange-httpd_keystate.h index 0e20ef588..56151a878 100644 --- a/src/mint/taler-mint-httpd_keystate.h +++ b/src/exchange/taler-exchange-httpd_keystate.h @@ -14,30 +14,30 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file mint/taler-mint-httpd_keystate.h + * @file exchange/taler-exchange-httpd_keystate.h * @brief management of our private signing keys (denomination keys) * @author Florian Dold * @author Benedikt Mueller * @author Christian Grothoff */ -#ifndef TALER_MINT_HTTPD_KEYSTATE_H -#define TALER_MINT_HTTPD_KEYSTATE_H +#ifndef TALER_EXCHANGE_HTTPD_KEYSTATE_H +#define TALER_EXCHANGE_HTTPD_KEYSTATE_H #include #include -#include "taler-mint-httpd.h" -#include "taler_mintdb_lib.h" +#include "taler-exchange-httpd.h" +#include "taler_exchangedb_lib.h" /** * Snapshot of the (coin and signing) - * keys (including private keys) of the mint. + * keys (including private keys) of the exchange. */ struct TMH_KS_StateHandle; /** - * Acquire the key state of the mint. Updates keys if necessary. + * Acquire the key state of the exchange. Updates keys if necessary. * For every call to #TMH_KS_acquire(), a matching call * to #TMH_KS_release() must be made. * @@ -60,7 +60,7 @@ TMH_KS_release_ (const char *location, /** - * Acquire the key state of the mint. Updates keys if necessary. + * Acquire the key state of the exchange. Updates keys if necessary. * For every call to #TMH_KS_acquire(), a matching call * to #TMH_KS_release() must be made. * @@ -86,7 +86,7 @@ TMH_KS_release_ (const char *location, enum TMH_KS_DenominationKeyUse { /** - * The key is to be used for a /reserve/withdraw or /refresh (mint) + * The key is to be used for a /reserve/withdraw or /refresh (exchange) * operation. */ TMH_KS_DKU_WITHDRAW, @@ -109,7 +109,7 @@ enum TMH_KS_DenominationKeyUse { * @return the denomination key issue, * or NULL if denom_pub could not be found (or is not valid at this time for the given @a use) */ -struct TALER_MINTDB_DenominationKeyIssueInformation * +struct TALER_EXCHANGEDB_DenominationKeyIssueInformation * TMH_KS_denomination_key_lookup (const struct TMH_KS_StateHandle *key_state, const struct TALER_DenominationPublicKey *denom_pub, enum TMH_KS_DenominationKeyUse use); @@ -129,17 +129,17 @@ TMH_KS_loop (void); /** - * Sign the message in @a purpose with the mint's signing + * Sign the message in @a purpose with the exchange's signing * key. * * @param purpose the message to sign - * @param[out] pub set to the current public signing key of the mint + * @param[out] pub set to the current public signing key of the exchange * @param[out] sig signature over purpose using current signing key */ void TMH_KS_sign (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose, - struct TALER_MintPublicKeyP *pub, - struct TALER_MintSignatureP *sig); + struct TALER_ExchangePublicKeyP *pub, + struct TALER_ExchangeSignatureP *sig); /** diff --git a/src/mint/taler-mint-httpd_mhd.c b/src/exchange/taler-exchange-httpd_mhd.c similarity index 93% rename from src/mint/taler-mint-httpd_mhd.c rename to src/exchange/taler-exchange-httpd_mhd.c index 5719d921a..b7ad437aa 100644 --- a/src/mint/taler-mint-httpd_mhd.c +++ b/src/exchange/taler-exchange-httpd_mhd.c @@ -15,8 +15,8 @@ */ /** - * @file taler-mint-httpd_mhd.c - * @brief helpers for MHD interaction; these are TALER_MINT_handler_ functions + * @file taler-exchange-httpd_mhd.c + * @brief helpers for MHD interaction; these are TALER_EXCHANGE_handler_ functions * that generate simple MHD replies that do not require any real operations * to be performed (error handling, static pages, etc.) * @author Florian Dold @@ -28,9 +28,9 @@ #include #include #include -#include "taler-mint-httpd_responses.h" -#include "taler-mint-httpd.h" -#include "taler-mint-httpd_mhd.h" +#include "taler-exchange-httpd_responses.h" +#include "taler-exchange-httpd.h" +#include "taler-exchange-httpd_mhd.h" /** * Function to call to handle the request by sending @@ -114,7 +114,7 @@ TMH_MHD_handler_agpl_redirect (struct TMH_RequestHandler *rh, rh->mime_type); MHD_add_response_header (response, MHD_HTTP_HEADER_LOCATION, - "http://www.git.taler.net/?p=mint.git"); + "http://www.git.taler.net/?p=exchange.git"); ret = MHD_queue_response (connection, rh->response_code, response); @@ -149,4 +149,4 @@ TMH_MHD_handler_send_json_pack_error (struct TMH_RequestHandler *rh, } -/* end of taler-mint-httpd_mhd.c */ +/* end of taler-exchange-httpd_mhd.c */ diff --git a/src/mint/taler-mint-httpd_mhd.h b/src/exchange/taler-exchange-httpd_mhd.h similarity index 96% rename from src/mint/taler-mint-httpd_mhd.h rename to src/exchange/taler-exchange-httpd_mhd.h index a9f575df0..3e825c559 100644 --- a/src/mint/taler-mint-httpd_mhd.h +++ b/src/exchange/taler-exchange-httpd_mhd.h @@ -15,17 +15,17 @@ */ /** - * @file taler-mint-httpd_mhd.h + * @file taler-exchange-httpd_mhd.h * @brief helpers for MHD interaction, used to generate simple responses * @author Florian Dold * @author Benedikt Mueller * @author Christian Grothoff */ -#ifndef TALER_MINT_HTTPD_MHD_H -#define TALER_MINT_HTTPD_MHD_H +#ifndef TALER_EXCHANGE_HTTPD_MHD_H +#define TALER_EXCHANGE_HTTPD_MHD_H #include #include -#include "taler-mint-httpd.h" +#include "taler-exchange-httpd.h" /** diff --git a/src/mint/taler-mint-httpd_parsing.c b/src/exchange/taler-exchange-httpd_parsing.c similarity index 99% rename from src/mint/taler-mint-httpd_parsing.c rename to src/exchange/taler-exchange-httpd_parsing.c index 365202905..25539aeb7 100644 --- a/src/mint/taler-mint-httpd_parsing.c +++ b/src/exchange/taler-exchange-httpd_parsing.c @@ -15,7 +15,7 @@ */ /** - * @file taler-mint-httpd_parsing.c + * @file taler-exchange-httpd_parsing.c * @brief functions to parse incoming requests (MHD arguments and JSON snippets) * @author Florian Dold * @author Benedikt Mueller @@ -24,8 +24,8 @@ #include "platform.h" #include -#include "taler-mint-httpd_parsing.h" -#include "taler-mint-httpd_responses.h" +#include "taler-exchange-httpd_parsing.h" +#include "taler-exchange-httpd_responses.h" /** @@ -802,7 +802,7 @@ TMH_PARSE_navigate_json (struct MHD_Connection *connection, break; } if (0 != strcmp (where->currency, - TMH_mint_currency_string)) + TMH_exchange_currency_string)) { GNUNET_break_op (0); ret = (MHD_YES != @@ -1134,4 +1134,4 @@ TMH_PARSE_member_variable (const char *field, return ret; } -/* end of taler-mint-httpd_parsing.c */ +/* end of taler-exchange-httpd_parsing.c */ diff --git a/src/mint/taler-mint-httpd_parsing.h b/src/exchange/taler-exchange-httpd_parsing.h similarity index 98% rename from src/mint/taler-mint-httpd_parsing.h rename to src/exchange/taler-exchange-httpd_parsing.h index a2cf4c469..a39235685 100644 --- a/src/mint/taler-mint-httpd_parsing.h +++ b/src/exchange/taler-exchange-httpd_parsing.h @@ -14,14 +14,14 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-httpd_parsing.h + * @file taler-exchange-httpd_parsing.h * @brief functions to parse incoming requests * @author Florian Dold * @author Benedikt Mueller * @author Christian Grothoff */ -#ifndef TALER_MINT_HTTPD_PARSING_H -#define TALER_MINT_HTTPD_PARSING_H +#ifndef TALER_EXCHANGE_HTTPD_PARSING_H +#define TALER_EXCHANGE_HTTPD_PARSING_H #include #include @@ -405,4 +405,4 @@ TMH_PARSE_mhd_request_var_arg_data (struct MHD_Connection *connection, -#endif /* TALER_MINT_HTTPD_PARSING_H */ +#endif /* TALER_EXCHANGE_HTTPD_PARSING_H */ diff --git a/src/mint/taler-mint-httpd_refresh.c b/src/exchange/taler-exchange-httpd_refresh.c similarity index 96% rename from src/mint/taler-mint-httpd_refresh.c rename to src/exchange/taler-exchange-httpd_refresh.c index 4d89fe892..45bbf3d4d 100644 --- a/src/mint/taler-mint-httpd_refresh.c +++ b/src/exchange/taler-exchange-httpd_refresh.c @@ -14,7 +14,7 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-httpd_refresh.c + * @file taler-exchange-httpd_refresh.c * @brief Handle /refresh/ requests * @author Florian Dold * @author Benedikt Mueller @@ -24,11 +24,11 @@ #include #include #include -#include "taler-mint-httpd_parsing.h" -#include "taler-mint-httpd_mhd.h" -#include "taler-mint-httpd_refresh.h" -#include "taler-mint-httpd_responses.h" -#include "taler-mint-httpd_keystate.h" +#include "taler-exchange-httpd_parsing.h" +#include "taler-exchange-httpd_mhd.h" +#include "taler-exchange-httpd_refresh.h" +#include "taler-exchange-httpd_responses.h" +#include "taler-exchange-httpd_keystate.h" /** @@ -42,9 +42,9 @@ * @param coin_count number of coins to be melted, size of y-dimension of @a commit_coin array * @param coin_melt_details array with @a coin_count entries with melting details * @param session_hash hash over the data that the client commits to - * @param commit_coin 2d array of coin commitments (what the mint is to sign + * @param commit_coin 2d array of coin commitments (what the exchange is to sign * once the "/refres/reveal" of cut and choose is done) - * @param commit_link 2d array of coin link commitments (what the mint is + * @param commit_link 2d array of coin link commitments (what the exchange is * to return via "/refresh/link" to enable linkage in the * future) * @return MHD result code @@ -56,13 +56,13 @@ handle_refresh_melt_binary (struct MHD_Connection *connection, unsigned int coin_count, const struct TMH_DB_MeltDetails *coin_melt_details, const struct GNUNET_HashCode *session_hash, - struct TALER_MINTDB_RefreshCommitCoin *const* commit_coin, + struct TALER_EXCHANGEDB_RefreshCommitCoin *const* commit_coin, struct TALER_RefreshCommitLinkP *const* commit_link) { unsigned int i; struct TMH_KS_StateHandle *key_state; - struct TALER_MINTDB_DenominationKeyIssueInformation *dk; - struct TALER_MINTDB_DenominationKeyInformationP *dki; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dk; + struct TALER_EXCHANGEDB_DenominationKeyInformationP *dki; struct TALER_Amount cost; struct TALER_Amount total_cost; struct TALER_Amount melt; @@ -72,7 +72,7 @@ handle_refresh_melt_binary (struct MHD_Connection *connection, struct TALER_Amount total_melt; GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TMH_mint_currency_string, + TALER_amount_get_zero (TMH_exchange_currency_string, &total_cost)); key_state = TMH_KS_acquire (); for (i=0;icoin_info.denom_sig = sig; r_melt_detail->coin_info.denom_pub = pk; if (GNUNET_OK != @@ -252,7 +252,7 @@ verify_coin_public_info (struct MHD_Connection *connection, { struct TALER_RefreshMeltCoinAffirmationPS body; struct TMH_KS_StateHandle *key_state; - struct TALER_MINTDB_DenominationKeyIssueInformation *dki; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki; struct TALER_Amount fee_refresh; key_state = TMH_KS_acquire (); @@ -314,7 +314,7 @@ verify_coin_public_info (struct MHD_Connection *connection, * @param num_new_coins size of 2nd dimension */ static void -free_commit_coins (struct TALER_MINTDB_RefreshCommitCoin **commit_coin, +free_commit_coins (struct TALER_EXCHANGEDB_RefreshCommitCoin **commit_coin, unsigned int kappa, unsigned int num_new_coins) { @@ -396,7 +396,7 @@ handle_refresh_melt_json (struct MHD_Connection *connection, unsigned int coin_count; struct GNUNET_HashCode session_hash; struct GNUNET_HashContext *hash_context; - struct TALER_MINTDB_RefreshCommitCoin *commit_coin[TALER_CNC_KAPPA]; + struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coin[TALER_CNC_KAPPA]; struct TALER_RefreshCommitLinkP *commit_link[TALER_CNC_KAPPA]; /* For the signature check, we hash most of the inputs together @@ -476,12 +476,12 @@ handle_refresh_melt_json (struct MHD_Connection *connection, for (i = 0; i < TALER_CNC_KAPPA; i++) { commit_coin[i] = GNUNET_malloc (num_newcoins * - sizeof (struct TALER_MINTDB_RefreshCommitCoin)); + sizeof (struct TALER_EXCHANGEDB_RefreshCommitCoin)); for (j = 0; j < num_newcoins; j++) { char *link_enc; size_t link_enc_size; - struct TALER_MINTDB_RefreshCommitCoin *rcc = &commit_coin[i][j]; + struct TALER_EXCHANGEDB_RefreshCommitCoin *rcc = &commit_coin[i][j]; res = TMH_PARSE_navigate_json (connection, coin_evs, @@ -908,4 +908,4 @@ TMH_REFRESH_handler_refresh_link (struct TMH_RequestHandler *rh, } -/* end of taler-mint-httpd_refresh.c */ +/* end of taler-exchange-httpd_refresh.c */ diff --git a/src/mint/taler-mint-httpd_refresh.h b/src/exchange/taler-exchange-httpd_refresh.h similarity index 95% rename from src/mint/taler-mint-httpd_refresh.h rename to src/exchange/taler-exchange-httpd_refresh.h index 8fe12a272..aae9c4c6c 100644 --- a/src/mint/taler-mint-httpd_refresh.h +++ b/src/exchange/taler-exchange-httpd_refresh.h @@ -14,18 +14,18 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-httpd_refresh.h + * @file taler-exchange-httpd_refresh.h * @brief Handle /refresh/ requests * @author Florian Dold * @author Benedikt Mueller * @author Christian Grothoff */ -#ifndef TALER_MINT_HTTPD_REFRESH_H -#define TALER_MINT_HTTPD_REFRESH_H +#ifndef TALER_EXCHANGE_HTTPD_REFRESH_H +#define TALER_EXCHANGE_HTTPD_REFRESH_H #include #include -#include "taler-mint-httpd.h" +#include "taler-exchange-httpd.h" /** diff --git a/src/mint/taler-mint-httpd_reserve.c b/src/exchange/taler-exchange-httpd_reserve.c similarity index 95% rename from src/mint/taler-mint-httpd_reserve.c rename to src/exchange/taler-exchange-httpd_reserve.c index c887ee750..45f073107 100644 --- a/src/mint/taler-mint-httpd_reserve.c +++ b/src/exchange/taler-exchange-httpd_reserve.c @@ -14,7 +14,7 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-httpd_reserve.c + * @file taler-exchange-httpd_reserve.c * @brief Handle /reserve/ requests * @author Florian Dold * @author Benedikt Mueller @@ -23,10 +23,10 @@ #include "platform.h" #include #include -#include "taler-mint-httpd_reserve.h" -#include "taler-mint-httpd_parsing.h" -#include "taler-mint-httpd_responses.h" -#include "taler-mint-httpd_keystate.h" +#include "taler-exchange-httpd_reserve.h" +#include "taler-exchange-httpd_parsing.h" +#include "taler-exchange-httpd_responses.h" +#include "taler-exchange-httpd_keystate.h" /** @@ -98,7 +98,7 @@ TMH_RESERVE_handler_reserve_withdraw (struct TMH_RequestHandler *rh, struct TALER_Amount amount_with_fee; struct TALER_Amount fee_withdraw; struct TALER_ReserveSignatureP signature; - struct TALER_MINTDB_DenominationKeyIssueInformation *dki; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki; struct TMH_KS_StateHandle *ks; struct TMH_PARSE_FieldSpecification spec[] = { @@ -183,4 +183,4 @@ TMH_RESERVE_handler_reserve_withdraw (struct TMH_RequestHandler *rh, return res; } -/* end of taler-mint-httpd_reserve.c */ +/* end of taler-exchange-httpd_reserve.c */ diff --git a/src/mint/taler-mint-httpd_reserve.h b/src/exchange/taler-exchange-httpd_reserve.h similarity index 94% rename from src/mint/taler-mint-httpd_reserve.h rename to src/exchange/taler-exchange-httpd_reserve.h index 71a779fe3..9a4960066 100644 --- a/src/mint/taler-mint-httpd_reserve.h +++ b/src/exchange/taler-exchange-httpd_reserve.h @@ -14,17 +14,17 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-httpd_reserve.h + * @file taler-exchange-httpd_reserve.h * @brief Handle /reserve/ requests * @author Florian Dold * @author Benedikt Mueller * @author Christian Grothoff */ -#ifndef TALER_MINT_HTTPD_RESERVE_H -#define TALER_MINT_HTTPD_RESERVE_H +#ifndef TALER_EXCHANGE_HTTPD_RESERVE_H +#define TALER_EXCHANGE_HTTPD_RESERVE_H #include -#include "taler-mint-httpd.h" +#include "taler-exchange-httpd.h" /** * Handle a "/reserve/status" request. Parses the diff --git a/src/mint/taler-mint-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c similarity index 94% rename from src/mint/taler-mint-httpd_responses.c rename to src/exchange/taler-exchange-httpd_responses.c index 2ebd0d331..d6cf81bb7 100644 --- a/src/mint/taler-mint-httpd_responses.c +++ b/src/exchange/taler-exchange-httpd_responses.c @@ -14,8 +14,8 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-httpd_responses.c - * @brief API for generating the various replies of the mint; these + * @file taler-exchange-httpd_responses.c + * @brief API for generating the various replies of the exchange; these * functions are called TMH_RESPONSE_reply_ and they generate * and queue MHD response objects for a given connection. * @author Florian Dold @@ -23,10 +23,10 @@ * @author Christian Grothoff */ #include "platform.h" -#include "taler-mint-httpd_responses.h" +#include "taler-exchange-httpd_responses.h" #include "taler_util.h" #include -#include "taler-mint-httpd_keystate.h" +#include "taler-exchange-httpd_keystate.h" /** @@ -39,7 +39,7 @@ void TMH_RESPONSE_add_global_headers (struct MHD_Response *response) { - if (TMH_mint_connection_close) + if (TMH_exchange_connection_close) (void) MHD_add_response_header (response, MHD_HTTP_HEADER_CONNECTION, "close"); @@ -147,7 +147,7 @@ TMH_RESPONSE_reply_arg_invalid (struct MHD_Connection *connection, /** * Send a response indicating an argument refering to a - * resource unknown to the mint (i.e. unknown reserve or + * resource unknown to the exchange (i.e. unknown reserve or * denomination key). * * @param connection the MHD connection to use @@ -279,7 +279,7 @@ TMH_RESPONSE_reply_commit_error (struct MHD_Connection *connection) /** - * Send a response indicating a failure to talk to the Mint's + * Send a response indicating a failure to talk to the Exchange's * database. * * @param connection the MHD connection to use @@ -339,7 +339,7 @@ TMH_RESPONSE_reply_invalid_json (struct MHD_Connection *connection) /** * Send confirmation of deposit success to client. This function * will create a signed message affirming the given information - * and return it to the client. By this, the mint affirms that + * and return it to the client. By this, the exchange affirms that * the coin had sufficient (residual) value for the specified * transaction and that it will execute the requested deposit * operation with the given wiring details. @@ -367,10 +367,10 @@ TMH_RESPONSE_reply_deposit_success (struct MHD_Connection *connection, const struct TALER_Amount *amount_without_fee) { struct TALER_DepositConfirmationPS dc; - struct TALER_MintPublicKeyP pub; - struct TALER_MintSignatureP sig; + struct TALER_ExchangePublicKeyP pub; + struct TALER_ExchangeSignatureP sig; - dc.purpose.purpose = htonl (TALER_SIGNATURE_MINT_CONFIRM_DEPOSIT); + dc.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_DEPOSIT); dc.purpose.size = htonl (sizeof (struct TALER_DepositConfirmationPS)); dc.h_contract = *h_contract; dc.h_wire = *h_wire; @@ -402,24 +402,24 @@ TMH_RESPONSE_reply_deposit_success (struct MHD_Connection *connection, * @return json representation of the @a rh */ static json_t * -compile_transaction_history (const struct TALER_MINTDB_TransactionList *tl) +compile_transaction_history (const struct TALER_EXCHANGEDB_TransactionList *tl) { json_t *details; const char *type; struct TALER_Amount value; json_t *history; const struct TALER_CoinSpendSignatureP *sig; - const struct TALER_MINTDB_TransactionList *pos; + const struct TALER_EXCHANGEDB_TransactionList *pos; history = json_array (); for (pos = tl; NULL != pos; pos = pos->next) { switch (pos->type) { - case TALER_MINTDB_TT_DEPOSIT: + case TALER_EXCHANGEDB_TT_DEPOSIT: { struct TALER_DepositRequestPS dr; - const struct TALER_MINTDB_Deposit *deposit = pos->details.deposit; + const struct TALER_EXCHANGEDB_Deposit *deposit = pos->details.deposit; type = "DEPOSIT"; value = deposit->amount_with_fee; @@ -453,10 +453,10 @@ compile_transaction_history (const struct TALER_MINTDB_TransactionList *tl) sizeof (struct TALER_DepositRequestPS)); break; } - case TALER_MINTDB_TT_REFRESH_MELT: + case TALER_EXCHANGEDB_TT_REFRESH_MELT: { struct TALER_RefreshMeltCoinAffirmationPS ms; - const struct TALER_MINTDB_RefreshMelt *melt = pos->details.melt; + const struct TALER_EXCHANGEDB_RefreshMelt *melt = pos->details.melt; type = "MELT"; value = melt->amount_with_fee; @@ -511,7 +511,7 @@ compile_transaction_history (const struct TALER_MINTDB_TransactionList *tl) */ int TMH_RESPONSE_reply_deposit_insufficient_funds (struct MHD_Connection *connection, - const struct TALER_MINTDB_TransactionList *tl) + const struct TALER_EXCHANGEDB_TransactionList *tl) { json_t *history; @@ -535,7 +535,7 @@ TMH_RESPONSE_reply_deposit_insufficient_funds (struct MHD_Connection *connection * @return json representation of the @a rh, NULL on error */ static json_t * -compile_reserve_history (const struct TALER_MINTDB_ReserveHistory *rh, +compile_reserve_history (const struct TALER_EXCHANGEDB_ReserveHistory *rh, struct TALER_Amount *balance) { struct TALER_Amount deposit_total; @@ -543,7 +543,7 @@ compile_reserve_history (const struct TALER_MINTDB_ReserveHistory *rh, struct TALER_Amount value; json_t *json_history; int ret; - const struct TALER_MINTDB_ReserveHistory *pos; + const struct TALER_EXCHANGEDB_ReserveHistory *pos; struct TALER_WithdrawRequestPS wr; json_history = json_array (); @@ -552,7 +552,7 @@ compile_reserve_history (const struct TALER_MINTDB_ReserveHistory *rh, { switch (pos->type) { - case TALER_MINTDB_RO_BANK_TO_MINT: + case TALER_EXCHANGEDB_RO_BANK_TO_EXCHANGE: if (0 == ret) deposit_total = pos->details.bank->amount; else @@ -571,7 +571,7 @@ compile_reserve_history (const struct TALER_MINTDB_ReserveHistory *rh, "wire", pos->details.bank->wire, "amount", TALER_json_from_amount (&pos->details.bank->amount))); break; - case TALER_MINTDB_RO_WITHDRAW_COIN: + case TALER_EXCHANGEDB_RO_WITHDRAW_COIN: break; } } @@ -581,9 +581,9 @@ compile_reserve_history (const struct TALER_MINTDB_ReserveHistory *rh, { switch (pos->type) { - case TALER_MINTDB_RO_BANK_TO_MINT: + case TALER_EXCHANGEDB_RO_BANK_TO_EXCHANGE: break; - case TALER_MINTDB_RO_WITHDRAW_COIN: + case TALER_EXCHANGEDB_RO_WITHDRAW_COIN: value = pos->details.withdraw->amount_with_fee; if (0 == ret) { @@ -651,7 +651,7 @@ compile_reserve_history (const struct TALER_MINTDB_ReserveHistory *rh, */ int TMH_RESPONSE_reply_reserve_status_success (struct MHD_Connection *connection, - const struct TALER_MINTDB_ReserveHistory *rh) + const struct TALER_EXCHANGEDB_ReserveHistory *rh) { json_t *json_balance; json_t *json_history; @@ -682,7 +682,7 @@ TMH_RESPONSE_reply_reserve_status_success (struct MHD_Connection *connection, */ int TMH_RESPONSE_reply_reserve_withdraw_insufficient_funds (struct MHD_Connection *connection, - const struct TALER_MINTDB_ReserveHistory *rh) + const struct TALER_EXCHANGEDB_ReserveHistory *rh) { json_t *json_balance; json_t *json_history; @@ -712,7 +712,7 @@ TMH_RESPONSE_reply_reserve_withdraw_insufficient_funds (struct MHD_Connection *c */ int TMH_RESPONSE_reply_reserve_withdraw_success (struct MHD_Connection *connection, - const struct TALER_MINTDB_CollectableBlindcoin *collectable) + const struct TALER_EXCHANGEDB_CollectableBlindcoin *collectable) { json_t *sig_json; @@ -728,7 +728,7 @@ TMH_RESPONSE_reply_reserve_withdraw_success (struct MHD_Connection *connection, * Send a response for a failed "/refresh/melt" request. The * transaction history of the given coin demonstrates that the * @a residual value of the coin is below the @a requested - * contribution of the coin for the melt. Thus, the mint + * contribution of the coin for the melt. Thus, the exchange * refuses the melt operation. * * @param connection the connection to send the response to @@ -743,7 +743,7 @@ int TMH_RESPONSE_reply_refresh_melt_insufficient_funds (struct MHD_Connection *connection, const struct TALER_CoinSpendPublicKeyP *coin_pub, struct TALER_Amount coin_value, - struct TALER_MINTDB_TransactionList *tl, + struct TALER_EXCHANGEDB_TransactionList *tl, struct TALER_Amount requested, struct TALER_Amount residual) { @@ -785,12 +785,12 @@ TMH_RESPONSE_reply_refresh_melt_success (struct MHD_Connection *connection, uint16_t noreveal_index) { struct TALER_RefreshMeltConfirmationPS body; - struct TALER_MintPublicKeyP pub; - struct TALER_MintSignatureP sig; + struct TALER_ExchangePublicKeyP pub; + struct TALER_ExchangeSignatureP sig; json_t *sig_json; body.purpose.size = htonl (sizeof (struct TALER_RefreshMeltConfirmationPS)); - body.purpose.purpose = htonl (TALER_SIGNATURE_MINT_CONFIRM_MELT); + body.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_MELT); body.session_hash = *session_hash; body.noreveal_index = htons (noreveal_index); body.reserved = htons (0); @@ -804,8 +804,8 @@ TMH_RESPONSE_reply_refresh_melt_success (struct MHD_Connection *connection, MHD_HTTP_OK, "{s:i, s:o, s:o}", "noreveal_index", (int) noreveal_index, - "mint_sig", sig_json, - "mint_pub", TALER_json_from_data (&pub, + "exchange_sig", sig_json, + "exchange_pub", TALER_json_from_data (&pub, sizeof (pub))); } @@ -867,7 +867,7 @@ TMH_RESPONSE_reply_refresh_reveal_success (struct MHD_Connection *connection, */ int TMH_RESPONSE_reply_refresh_reveal_missmatch (struct MHD_Connection *connection, - const struct TALER_MINTDB_MeltCommitment *mc, + const struct TALER_EXCHANGEDB_MeltCommitment *mc, unsigned int off, unsigned int j, const char *missmatch_object) @@ -882,7 +882,7 @@ TMH_RESPONSE_reply_refresh_reveal_missmatch (struct MHD_Connection *connection, info_old = json_array (); for (i=0;inum_oldcoins;i++) { - const struct TALER_MINTDB_RefreshMelt *rm; + const struct TALER_EXCHANGEDB_RefreshMelt *rm; json_t *rm_json; rm = &mc->melts[i]; @@ -924,7 +924,7 @@ TMH_RESPONSE_reply_refresh_reveal_missmatch (struct MHD_Connection *connection, info_commit_k = json_array (); for (i=0;inum_newcoins;i++) { - const struct TALER_MINTDB_RefreshCommitCoin *cc; + const struct TALER_EXCHANGEDB_RefreshCommitCoin *cc; json_t *cc_json; cc = &mc->commit_coins[k][i]; @@ -1005,7 +1005,7 @@ TMH_RESPONSE_reply_refresh_link_success (struct MHD_Connection *connection, mlist = json_array (); for (i=0;inext) @@ -1113,10 +1113,10 @@ TMH_RESPONSE_reply_deposit_wtid (struct MHD_Connection *connection, struct GNUNET_TIME_Absolute exec_time) { struct TALER_ConfirmWirePS cw; - struct TALER_MintPublicKeyP pub; - struct TALER_MintSignatureP sig; + struct TALER_ExchangePublicKeyP pub; + struct TALER_ExchangeSignatureP sig; - cw.purpose.purpose = htonl (TALER_SIGNATURE_MINT_CONFIRM_WIRE); + cw.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE); cw.purpose.size = htonl (sizeof (struct TALER_ConfirmWirePS)); cw.h_wire = *h_wire; cw.h_contract = *h_contract; @@ -1136,9 +1136,9 @@ TMH_RESPONSE_reply_deposit_wtid (struct MHD_Connection *connection, sizeof (*wtid)), "execution_time", TALER_json_from_abs (exec_time), "coin_contribution", TALER_json_from_amount (coin_contribution), - "mint_sig", TALER_json_from_data (&sig, + "exchange_sig", TALER_json_from_data (&sig, sizeof (sig)), - "mint_pub", TALER_json_from_data (&pub, + "exchange_pub", TALER_json_from_data (&pub, sizeof (pub))); } @@ -1174,4 +1174,4 @@ TMH_RESPONSE_reply_wire_deposit_details (struct MHD_Connection *connection, } -/* end of taler-mint-httpd_responses.c */ +/* end of taler-exchange-httpd_responses.c */ diff --git a/src/mint/taler-mint-httpd_responses.h b/src/exchange/taler-exchange-httpd_responses.h similarity index 94% rename from src/mint/taler-mint-httpd_responses.h rename to src/exchange/taler-exchange-httpd_responses.h index a0396c8a1..817273a58 100644 --- a/src/mint/taler-mint-httpd_responses.h +++ b/src/exchange/taler-exchange-httpd_responses.h @@ -15,22 +15,22 @@ */ /** - * @file taler-mint-httpd_responses.h - * @brief API for generating the various replies of the mint; these + * @file taler-exchange-httpd_responses.h + * @brief API for generating the various replies of the exchange; these * functions are called TMH_RESPONSE_reply_ and they generate * and queue MHD response objects for a given connection. * @author Florian Dold * @author Benedikt Mueller * @author Christian Grothoff */ -#ifndef TALER_MINT_HTTPD_RESPONSES_H -#define TALER_MINT_HTTPD_RESPONSES_H +#ifndef TALER_EXCHANGE_HTTPD_RESPONSES_H +#define TALER_EXCHANGE_HTTPD_RESPONSES_H #include #include #include #include -#include "taler-mint-httpd.h" -#include "taler-mint-httpd_db.h" +#include "taler-exchange-httpd.h" +#include "taler-exchange-httpd_db.h" /** * Add headers we want to return in every response. @@ -100,7 +100,7 @@ TMH_RESPONSE_reply_arg_invalid (struct MHD_Connection *connection, /** * Send a response indicating an argument refering to a - * resource unknown to the mint (i.e. unknown reserve or + * resource unknown to the exchange (i.e. unknown reserve or * denomination key). * * @param connection the MHD connection to use @@ -172,7 +172,7 @@ TMH_RESPONSE_reply_commit_error (struct MHD_Connection *connection); /** - * Send a response indicating a failure to talk to the Mint's + * Send a response indicating a failure to talk to the Exchange's * database. * * @param connection the MHD connection to use @@ -205,7 +205,7 @@ TMH_RESPONSE_reply_invalid_json (struct MHD_Connection *connection); /** * Send confirmation of deposit success to client. This function * will create a signed message affirming the given information - * and return it to the client. By this, the mint affirms that + * and return it to the client. By this, the exchange affirms that * the coin had sufficient (residual) value for the specified * transaction and that it will execute the requested deposit * operation with the given wiring details. @@ -244,7 +244,7 @@ TMH_RESPONSE_reply_deposit_success (struct MHD_Connection *connection, */ int TMH_RESPONSE_reply_deposit_insufficient_funds (struct MHD_Connection *connection, - const struct TALER_MINTDB_TransactionList *tl); + const struct TALER_EXCHANGEDB_TransactionList *tl); /** @@ -325,7 +325,7 @@ TMH_RESPONSE_reply_wire_deposit_details (struct MHD_Connection *connection, */ int TMH_RESPONSE_reply_reserve_status_success (struct MHD_Connection *connection, - const struct TALER_MINTDB_ReserveHistory *rh); + const struct TALER_EXCHANGEDB_ReserveHistory *rh); /** @@ -339,7 +339,7 @@ TMH_RESPONSE_reply_reserve_status_success (struct MHD_Connection *connection, */ int TMH_RESPONSE_reply_reserve_withdraw_insufficient_funds (struct MHD_Connection *connection, - const struct TALER_MINTDB_ReserveHistory *rh); + const struct TALER_EXCHANGEDB_ReserveHistory *rh); /** @@ -351,7 +351,7 @@ TMH_RESPONSE_reply_reserve_withdraw_insufficient_funds (struct MHD_Connection *c */ int TMH_RESPONSE_reply_reserve_withdraw_success (struct MHD_Connection *connection, - const struct TALER_MINTDB_CollectableBlindcoin *collectable); + const struct TALER_EXCHANGEDB_CollectableBlindcoin *collectable); /** @@ -372,7 +372,7 @@ TMH_RESPONSE_reply_refresh_melt_success (struct MHD_Connection *connection, * Send a response for a failed "/refresh/melt" request. The * transaction history of the given coin demonstrates that the * @a residual value of the coin is below the @a requested - * contribution of the coin for the melt. Thus, the mint + * contribution of the coin for the melt. Thus, the exchange * refuses the melt operation. * * @param connection the connection to send the response to @@ -387,7 +387,7 @@ int TMH_RESPONSE_reply_refresh_melt_insufficient_funds (struct MHD_Connection *connection, const struct TALER_CoinSpendPublicKeyP *coin_pub, struct TALER_Amount coin_value, - struct TALER_MINTDB_TransactionList *tl, + struct TALER_EXCHANGEDB_TransactionList *tl, struct TALER_Amount requested, struct TALER_Amount residual); @@ -422,7 +422,7 @@ TMH_RESPONSE_reply_refresh_reveal_success (struct MHD_Connection *connection, */ int TMH_RESPONSE_reply_refresh_reveal_missmatch (struct MHD_Connection *connection, - const struct TALER_MINTDB_MeltCommitment *mc, + const struct TALER_EXCHANGEDB_MeltCommitment *mc, unsigned int off, unsigned int j, const char *missmatch_object); @@ -446,7 +446,7 @@ struct TMH_RESPONSE_LinkSessionInfo /** * Linked data of coins being created in the session. */ - struct TALER_MINTDB_LinkDataList *ldl; + struct TALER_EXCHANGEDB_LinkDataList *ldl; }; diff --git a/src/mint/taler-mint-httpd_test.c b/src/exchange/taler-exchange-httpd_test.c similarity index 98% rename from src/mint/taler-mint-httpd_test.c rename to src/exchange/taler-exchange-httpd_test.c index b894854f3..876869d86 100644 --- a/src/mint/taler-mint-httpd_test.c +++ b/src/exchange/taler-exchange-httpd_test.c @@ -14,7 +14,7 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-httpd_test.c + * @file taler-exchange-httpd_test.c * @brief Handle /test requests; parses the POST and JSON and * checks that the client is binary-compatible * @author Christian Grothoff @@ -24,9 +24,9 @@ #include #include #include "taler_signatures.h" -#include "taler-mint-httpd_test.h" -#include "taler-mint-httpd_parsing.h" -#include "taler-mint-httpd_responses.h" +#include "taler-exchange-httpd_test.h" +#include "taler-exchange-httpd_parsing.h" +#include "taler-exchange-httpd_responses.h" /** @@ -312,7 +312,7 @@ TMH_TEST_handler_test_ecdhe (struct TMH_RequestHandler *rh, * which must contain a "eddsa_pub" with a public key and an *"eddsa_sig" with the corresponding signature for a purpose * of #TALER_SIGNATURE_CLIENT_TEST_EDDSA. If the signature is - * valid, a reply with a #TALER_SIGNATURE_MINT_TEST_EDDSA is + * valid, a reply with a #TALER_SIGNATURE_EXCHANGE_TEST_EDDSA is * returned using the same JSON format. * * @param rh context of the handler @@ -370,7 +370,7 @@ TMH_TEST_handler_test_eddsa (struct TMH_RequestHandler *rh, } TMH_PARSE_release_data (spec); pk = GNUNET_CRYPTO_eddsa_key_create (); - purpose.purpose = htonl (TALER_SIGNATURE_MINT_TEST_EDDSA); + purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_TEST_EDDSA); if (GNUNET_OK != GNUNET_CRYPTO_eddsa_sign (pk, &purpose, @@ -618,4 +618,4 @@ TMH_TEST_handler_test (struct TMH_RequestHandler *rh, } -/* end of taler-mint-httpd_test.c */ +/* end of taler-exchange-httpd_test.c */ diff --git a/src/mint/taler-mint-httpd_test.h b/src/exchange/taler-exchange-httpd_test.h similarity index 97% rename from src/mint/taler-mint-httpd_test.h rename to src/exchange/taler-exchange-httpd_test.h index 33844aab1..30535f54f 100644 --- a/src/mint/taler-mint-httpd_test.h +++ b/src/exchange/taler-exchange-httpd_test.h @@ -14,16 +14,16 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-httpd_test.h + * @file taler-exchange-httpd_test.h * @brief Handle /test requests * @author Christian Grothoff */ -#ifndef TALER_MINT_HTTPD_TEST_H -#define TALER_MINT_HTTPD_TEST_H +#ifndef TALER_EXCHANGE_HTTPD_TEST_H +#define TALER_EXCHANGE_HTTPD_TEST_H #include #include -#include "taler-mint-httpd.h" +#include "taler-exchange-httpd.h" /** @@ -126,7 +126,7 @@ TMH_TEST_handler_test_ecdhe (struct TMH_RequestHandler *rh, * which must contain a "eddsa_pub" with a public key and an *"ecdsa_sig" with the corresponding signature for a purpose * of #TALER_SIGNATURE_CLIENT_TEST_EDDSA. If the signature is - * valid, a reply with a #TALER_SIGNATURE_MINT_TEST_EDDSA is + * valid, a reply with a #TALER_SIGNATURE_EXCHANGE_TEST_EDDSA is * returned using the same JSON format. * * @param rh context of the handler diff --git a/src/mint/taler-mint-httpd_tracking.c b/src/exchange/taler-exchange-httpd_tracking.c similarity index 96% rename from src/mint/taler-mint-httpd_tracking.c rename to src/exchange/taler-exchange-httpd_tracking.c index a6b41cf86..afb821cb9 100644 --- a/src/mint/taler-mint-httpd_tracking.c +++ b/src/exchange/taler-exchange-httpd_tracking.c @@ -14,7 +14,7 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-httpd_tracking.c + * @file taler-exchange-httpd_tracking.c * @brief Handle wire transfer tracking-related requests * @author Christian Grothoff */ @@ -24,9 +24,9 @@ #include #include #include "taler_signatures.h" -#include "taler-mint-httpd_parsing.h" -#include "taler-mint-httpd_tracking.h" -#include "taler-mint-httpd_responses.h" +#include "taler-exchange-httpd_parsing.h" +#include "taler-exchange-httpd_tracking.h" +#include "taler-exchange-httpd_responses.h" /** @@ -162,4 +162,4 @@ TMH_TRACKING_handler_deposit_wtid (struct TMH_RequestHandler *rh, } -/* end of taler-mint-httpd_tracking.c */ +/* end of taler-exchange-httpd_tracking.c */ diff --git a/src/mint/taler-mint-httpd_tracking.h b/src/exchange/taler-exchange-httpd_tracking.h similarity index 93% rename from src/mint/taler-mint-httpd_tracking.h rename to src/exchange/taler-exchange-httpd_tracking.h index 9ec4c6827..d77de460a 100644 --- a/src/mint/taler-mint-httpd_tracking.h +++ b/src/exchange/taler-exchange-httpd_tracking.h @@ -14,16 +14,16 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-httpd_tracking.h + * @file taler-exchange-httpd_tracking.h * @brief Handle wire transfer tracking-related requests * @author Christian Grothoff */ -#ifndef TALER_MINT_HTTPD_TRACKING_H -#define TALER_MINT_HTTPD_TRACKING_H +#ifndef TALER_EXCHANGE_HTTPD_TRACKING_H +#define TALER_EXCHANGE_HTTPD_TRACKING_H #include #include -#include "taler-mint-httpd.h" +#include "taler-exchange-httpd.h" /** diff --git a/src/mint/taler-mint-httpd_validation.c b/src/exchange/taler-exchange-httpd_validation.c similarity index 95% rename from src/mint/taler-mint-httpd_validation.c rename to src/exchange/taler-exchange-httpd_validation.c index 8f8ab415e..9132e3e02 100644 --- a/src/mint/taler-mint-httpd_validation.c +++ b/src/exchange/taler-exchange-httpd_validation.c @@ -15,13 +15,13 @@ */ /** - * @file taler-mint-httpd_validation.c + * @file taler-exchange-httpd_validation.c * @brief helpers for calling the wire plugins to validate addresses * @author Christian Grothoff */ #include "platform.h" #include -#include "taler-mint-httpd_validation.h" +#include "taler-exchange-httpd_validation.h" #include "taler_wire_plugin.h" @@ -81,12 +81,12 @@ TMH_VALIDATION_init (const struct GNUNET_CONFIGURATION_Handle *cfg) /* Find out list of supported wire formats */ if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, - "mint", + "exchange", "wireformat", &wireformats)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "mint", + "exchange", "wireformat"); return GNUNET_SYSERR; } @@ -228,4 +228,4 @@ TMH_VALIDATION_get_methods (struct GNUNET_HashCode *h) } -/* end of taler-mint-httpd_validation.c */ +/* end of taler-exchange-httpd_validation.c */ diff --git a/src/mint/taler-mint-httpd_validation.h b/src/exchange/taler-exchange-httpd_validation.h similarity index 93% rename from src/mint/taler-mint-httpd_validation.h rename to src/exchange/taler-exchange-httpd_validation.h index f5fb19003..f41e2ee5f 100644 --- a/src/mint/taler-mint-httpd_validation.h +++ b/src/exchange/taler-exchange-httpd_validation.h @@ -15,12 +15,12 @@ */ /** - * @file taler-mint-httpd_validation.h + * @file taler-exchange-httpd_validation.h * @brief helpers for calling the wire plugins to validate addresses * @author Christian Grothoff */ -#ifndef TALER_MINT_HTTPD_VALIDATION_H -#define TALER_MINT_HTTPD_VALIDATION_H +#ifndef TALER_EXCHANGE_HTTPD_VALIDATION_H +#define TALER_EXCHANGE_HTTPD_VALIDATION_H #include #include diff --git a/src/mint/taler-mint-httpd_wire.c b/src/exchange/taler-exchange-httpd_wire.c similarity index 92% rename from src/mint/taler-mint-httpd_wire.c rename to src/exchange/taler-exchange-httpd_wire.c index 020a7e108..ba763b64d 100644 --- a/src/mint/taler-mint-httpd_wire.c +++ b/src/exchange/taler-exchange-httpd_wire.c @@ -14,15 +14,15 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-httpd_wire.c + * @file taler-exchange-httpd_wire.c * @brief Handle /wire requests * @author Christian Grothoff */ #include "platform.h" -#include "taler-mint-httpd_keystate.h" -#include "taler-mint-httpd_responses.h" -#include "taler-mint-httpd_validation.h" -#include "taler-mint-httpd_wire.h" +#include "taler-exchange-httpd_keystate.h" +#include "taler-exchange-httpd_responses.h" +#include "taler-exchange-httpd_validation.h" +#include "taler-exchange-httpd_wire.h" #include /** @@ -42,13 +42,13 @@ TMH_WIRE_handler_wire (struct TMH_RequestHandler *rh, const char *upload_data, size_t *upload_data_size) { - struct TALER_MintWireSupportMethodsPS wsm; - struct TALER_MintPublicKeyP pub; - struct TALER_MintSignatureP sig; + struct TALER_ExchangeWireSupportMethodsPS wsm; + struct TALER_ExchangePublicKeyP pub; + struct TALER_ExchangeSignatureP sig; json_t *methods; wsm.purpose.size = htonl (sizeof (wsm)); - wsm.purpose.purpose = htonl (TALER_SIGNATURE_MINT_WIRE_TYPES); + wsm.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_WIRE_TYPES); methods = TMH_VALIDATION_get_methods (&wsm.h_wire_types); TMH_KS_sign (&wsm.purpose, &pub, @@ -104,7 +104,7 @@ TMH_WIRE_handler_wire_test (struct TMH_RequestHandler *rh, } if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, - "mint-wire-test", + "exchange-wire-test", "REDIRECT_URL", &wire_test_redirect)) { @@ -168,7 +168,7 @@ TMH_WIRE_handler_wire_sepa (struct TMH_RequestHandler *rh, /* Fetch reply */ if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, - "mint-wire-sepa", + "exchange-wire-sepa", "SEPA_RESPONSE_FILE", &sepa_wire_file)) { @@ -217,4 +217,4 @@ TMH_WIRE_handler_wire_sepa (struct TMH_RequestHandler *rh, return ret; } -/* end of taler-mint-httpd_wire.c */ +/* end of taler-exchange-httpd_wire.c */ diff --git a/src/mint/taler-mint-httpd_wire.h b/src/exchange/taler-exchange-httpd_wire.h similarity index 94% rename from src/mint/taler-mint-httpd_wire.h rename to src/exchange/taler-exchange-httpd_wire.h index e77daf019..dc6dcc0f4 100644 --- a/src/mint/taler-mint-httpd_wire.h +++ b/src/exchange/taler-exchange-httpd_wire.h @@ -14,16 +14,16 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file taler-mint-httpd_wire.h + * @file taler-exchange-httpd_wire.h * @brief Handle /wire requests * @author Christian Grothoff */ -#ifndef TALER_MINT_HTTPD_WIRE_H -#define TALER_MINT_HTTPD_WIRE_H +#ifndef TALER_EXCHANGE_HTTPD_WIRE_H +#define TALER_EXCHANGE_HTTPD_WIRE_H #include #include -#include "taler-mint-httpd.h" +#include "taler-exchange-httpd.h" /** diff --git a/src/mint/test-mint-home/master.priv b/src/exchange/test-exchange-home/master.priv similarity index 100% rename from src/mint/test-mint-home/master.priv rename to src/exchange/test-exchange-home/master.priv diff --git a/src/mint/test_taler_mint_httpd.sh b/src/exchange/test_taler_exchange_httpd.sh old mode 100755 new mode 100644 similarity index 70% rename from src/mint/test_taler_mint_httpd.sh rename to src/exchange/test_taler_exchange_httpd.sh index 05d26620b..c8df7cb9f --- a/src/mint/test_taler_mint_httpd.sh +++ b/src/exchange/test_taler_exchange_httpd.sh @@ -16,19 +16,19 @@ # # # This script uses 'curl' to POST various ill-formed requests to the -# taler-mint-httpd. Basically, the goal is to make sure that the +# taler-exchange-httpd. Basically, the goal is to make sure that the # HTTP server survives (and produces the 'correct' error code). # -# We read the JSON snippets to POST from test_taler_mint_httpd.data +# We read the JSON snippets to POST from test_taler_exchange_httpd.data # # Setup keys. -taler-mint-keyup -d test-mint-home -m test-mint-home/master.priv -# Run Mint HTTPD (in background) -taler-mint-httpd -d test-mint-home & +taler-exchange-keyup -d test-exchange-home -m test-exchange-home/master.priv +# Run Exchange HTTPD (in background) +taler-exchange-httpd -d test-exchange-home & # Give HTTP time to start sleep 2 # Run test... -cat test_taler_mint_httpd.data | grep -v ^\# | awk '{ print "curl -d '\''" $2 "'\'' http://localhost:8081"$1 }' | bash +cat test_taler_exchange_httpd.data | grep -v ^\# | awk '{ print "curl -d '\''" $2 "'\'' http://localhost:8081"$1 }' | bash # Stop HTTP server kill -TERM %% # FIXME: not sure this is the 'correct' return code... diff --git a/src/mint/test_taler_mint_httpd_afl.sh b/src/exchange/test_taler_exchange_httpd_afl.sh old mode 100755 new mode 100644 similarity index 70% rename from src/mint/test_taler_mint_httpd_afl.sh rename to src/exchange/test_taler_exchange_httpd_afl.sh index d2c40c216..48beda722 --- a/src/mint/test_taler_mint_httpd_afl.sh +++ b/src/exchange/test_taler_exchange_httpd_afl.sh @@ -16,7 +16,7 @@ # # # This script uses 'curl' to POST various ill-formed requests to the -# taler-mint-httpd. Basically, the goal is to make sure that the +# taler-exchange-httpd. Basically, the goal is to make sure that the # HTTP server survives (and produces the 'correct' error code). # # We read the JSON snippets from afl-tests/ @@ -25,17 +25,17 @@ PREFIX= # Uncomment this line to run with valgrind... PREFIX="valgrind --leak-check=yes --log-file=valgrind.%p" # Setup keys. -taler-mint-keyup -d test-mint-home -m test-mint-home/master.priv +taler-exchange-keyup -d test-exchange-home -m test-exchange-home/master.priv # Setup database (just to be sure) -taler-mint-dbinit -d test-mint-home &> /dev/null || true +taler-exchange-dbinit -d test-exchange-home &> /dev/null || true # Only log hard errors, we expect lots of warnings... -export GNUNET_FORCE_LOG="taler-mint-httpd;;;;ERROR/libmicrohttpd;;;;ERROR/util;;;;ERROR/" +export GNUNET_FORCE_LOG="taler-exchange-httpd;;;;ERROR/libmicrohttpd;;;;ERROR/util;;;;ERROR/" # Run test... for n in afl-tests/* do echo -n "Test $n " - $PREFIX taler-mint-httpd -d test-mint-home/ -t 1 -f $n -C > /dev/null || { echo "FAIL!"; } -# $PREFIX taler-mint-httpd -d test-mint-home/ -t 1 -f $n -C > /dev/null || { echo "FAIL!"; exit 1; } + $PREFIX taler-exchange-httpd -d test-exchange-home/ -t 1 -f $n -C > /dev/null || { echo "FAIL!"; } +# $PREFIX taler-exchange-httpd -d test-exchange-home/ -t 1 -f $n -C > /dev/null || { echo "FAIL!"; exit 1; } echo "OK" done exit 0 diff --git a/src/mint/test_taler_mint_httpd.data b/src/exchange/test_taler_mint_httpd.data similarity index 99% rename from src/mint/test_taler_mint_httpd.data rename to src/exchange/test_taler_mint_httpd.data index 2d6020355..43aa4ff05 100644 --- a/src/mint/test_taler_mint_httpd.data +++ b/src/exchange/test_taler_mint_httpd.data @@ -13,7 +13,7 @@ # TALER; see the file COPYING. If not, If not, see # # -# This is a resource file for test_taler_mint_httpd.sh. +# This is a resource file for test_taler_exchange_httpd.sh. # Lines starting with '#' (must be first character in line) are comments. # # Each non-comment line must contain two strings, the first being the diff --git a/src/exchangedb/Makefile.am b/src/exchangedb/Makefile.am new file mode 100644 index 000000000..d56d6676a --- /dev/null +++ b/src/exchangedb/Makefile.am @@ -0,0 +1,110 @@ +# This Makefile.am is in the public domain +AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_srcdir)/src/pq/ $(POSTGRESQL_CPPFLAGS) + +if USE_COVERAGE + AM_CFLAGS = --coverage -O0 + XLIB = -lgcov +endif + +plugindir = $(libdir)/taler + +if HAVE_POSTGRESQL +plugin_LTLIBRARIES = \ + libtaler_plugin_exchangedb_postgres.la +endif + +EXTRA_DIST = \ + plugin_exchangedb_common.c \ + test-exchange-db-postgres.conf + +libtaler_plugin_exchangedb_postgres_la_SOURCES = \ + plugin_exchangedb_postgres.c +libtaler_plugin_exchangedb_postgres_la_LIBADD = \ + $(LTLIBINTL) +libtaler_plugin_exchangedb_postgres_la_LDFLAGS = \ + $(TALER_PLUGIN_LDFLAGS) \ + $(top_builddir)/src/pq/libtalerpq.la \ + $(top_builddir)/src/util/libtalerutil.la \ + -lpq \ + -lgnunetpq \ + -lgnunetutil $(XLIB) + +lib_LTLIBRARIES = \ + libtalerexchangedb.la + +libtalerexchangedb_la_SOURCES = \ + exchangedb_keyio.c \ + exchangedb_plugin.c + +libtalerexchangedb_la_LIBADD = \ + $(top_builddir)/src/util/libtalerutil.la \ + -lgnunetutil $(XLIB) + +libtalerexchangedb_la_LDFLAGS = \ + $(POSTGRESQL_LDFLAGS) \ + -version-info 0:0:0 \ + -no-undefined + + +check_PROGRAMS = \ + test-exchangedb-deposits \ + test-exchangedb-keyio \ + test-exchangedb-postgres \ + test-perf-taler-exchangedb \ + perf-exchangedb + +TESTS = \ + test-exchangedb-postgres \ + test-perf-taler-exchangedb + +test_exchangedb_deposits_SOURCES = \ + test_exchangedb_deposits.c +test_exchangedb_deposits_LDADD = \ + libtalerexchangedb.la \ + $(top_srcdir)/src/util/libtalerutil.la \ + $(top_srcdir)/src/pq/libtalerpq.la \ + -lgnunetutil \ + -ljansson \ + -lpq + +test_exchangedb_keyio_SOURCES = \ + test_exchangedb_keyio.c +test_exchangedb_keyio_LDADD = \ + libtalerexchangedb.la \ + $(top_srcdir)/src/util/libtalerutil.la \ + $(top_srcdir)/src/pq/libtalerpq.la \ + -lgnunetutil + +test_exchangedb_postgres_SOURCES = \ + test_exchangedb.c +test_exchangedb_postgres_LDADD = \ + libtalerexchangedb.la \ + $(top_srcdir)/src/util/libtalerutil.la \ + $(top_srcdir)/src/pq/libtalerpq.la \ + -lgnunetutil -ljansson + +test_perf_taler_exchangedb_SOURCES = \ + test_perf_taler_exchangedb.c \ + perf_taler_exchangedb_init.c \ + perf_taler_exchangedb_interpreter.c +test_perf_taler_exchangedb_LDADD = \ + libtalerexchangedb.la \ + $(top_srcdir)/src/util/libtalerutil.la \ + $(top_srcdir)/src/pq/libtalerpq.la \ + -ljansson \ + -lgnunetutil + +perf_exchangedb_SOURCES = \ + perf_taler_exchangedb.c \ + perf_taler_exchangedb_init.c \ + perf_taler_exchangedb_interpreter.c +perf_exchangedb_LDADD = \ + libtalerexchangedb.la \ + $(top_srcdir)/src/util/libtalerutil.la \ + $(top_srcdir)/src/pq/libtalerpq.la \ + -ljansson \ + -lgnunetutil + + +EXTRA_test_exchangedb_postgres_DEPENDENCIES = \ + libtaler_plugin_exchangedb_postgres.la diff --git a/src/mintdb/mintdb_keyio.c b/src/exchangedb/exchangedb_keyio.c similarity index 82% rename from src/mintdb/mintdb_keyio.c rename to src/exchangedb/exchangedb_keyio.c index 89ac9055a..6b8ca24e3 100644 --- a/src/mintdb/mintdb_keyio.c +++ b/src/exchangedb/exchangedb_keyio.c @@ -14,15 +14,15 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file mintdb/mintdb_keyio.c - * @brief I/O operations for the Mint's private keys + * @file exchangedb/exchangedb_keyio.c + * @brief I/O operations for the Exchange's private keys * @author Florian Dold * @author Benedikt Mueller * @author Sree Harsha Totakura * @author Christian Grothoff */ #include "platform.h" -#include "taler_mintdb_lib.h" +#include "taler_exchangedb_lib.h" /** @@ -34,7 +34,7 @@ struct SignkeysIterateContext /** * Function to call on each signing key. */ - TALER_MINTDB_SigningKeyIterator it; + TALER_EXCHANGEDB_SigningKeyIterator it; /** * Closure for @e it. @@ -59,18 +59,18 @@ signkeys_iterate_dir_iter (void *cls, { struct SignkeysIterateContext *skc = cls; ssize_t nread; - struct TALER_MINTDB_PrivateSigningKeyInformationP issue; + struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP issue; nread = GNUNET_DISK_fn_read (filename, &issue, - sizeof (struct TALER_MINTDB_PrivateSigningKeyInformationP)); - if (nread != sizeof (struct TALER_MINTDB_PrivateSigningKeyInformationP)) + sizeof (struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP)); + if (nread != sizeof (struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP)) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Invalid signkey file `%s': wrong size (%d, expected %u)\n", filename, (int) nread, - sizeof (struct TALER_MINTDB_PrivateSigningKeyInformationP)); + sizeof (struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP)); return GNUNET_OK; } return skc->it (skc->it_cls, @@ -80,10 +80,10 @@ signkeys_iterate_dir_iter (void *cls, /** - * Call @a it for each signing key found in the @a mint_base_dir. + * Call @a it for each signing key found in the @a exchange_base_dir. * - * @param mint_base_dir base directory for the mint, - * the signing keys must be in the #TALER_MINTDB_DIR_SIGNING_KEYS + * @param exchange_base_dir base directory for the exchange, + * the signing keys must be in the #TALER_EXCHANGEDB_DIR_SIGNING_KEYS * subdirectory * @param it function to call on each signing key * @param it_cls closure for @a it @@ -92,8 +92,8 @@ signkeys_iterate_dir_iter (void *cls, * files are simply skipped), -1 on error */ int -TALER_MINTDB_signing_keys_iterate (const char *mint_base_dir, - TALER_MINTDB_SigningKeyIterator it, +TALER_EXCHANGEDB_signing_keys_iterate (const char *exchange_base_dir, + TALER_EXCHANGEDB_SigningKeyIterator it, void *it_cls) { char *signkey_dir; @@ -101,8 +101,8 @@ TALER_MINTDB_signing_keys_iterate (const char *mint_base_dir, int ret; GNUNET_asprintf (&signkey_dir, - "%s" DIR_SEPARATOR_STR TALER_MINTDB_DIR_SIGNING_KEYS, - mint_base_dir); + "%s" DIR_SEPARATOR_STR TALER_EXCHANGEDB_DIR_SIGNING_KEYS, + exchange_base_dir); skc.it = it; skc.it_cls = it_cls; ret = GNUNET_DISK_directory_scan (signkey_dir, @@ -122,8 +122,8 @@ TALER_MINTDB_signing_keys_iterate (const char *mint_base_dir, * #GNUNET_SYSERR upon failure */ int -TALER_MINTDB_denomination_key_read (const char *filename, - struct TALER_MINTDB_DenominationKeyIssueInformation *dki) +TALER_EXCHANGEDB_denomination_key_read (const char *filename, + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki) { uint64_t size; size_t offset; @@ -140,7 +140,7 @@ TALER_MINTDB_denomination_key_read (const char *filename, filename); return GNUNET_SYSERR; } - offset = sizeof (struct TALER_MINTDB_DenominationKeyInformationP); + offset = sizeof (struct TALER_EXCHANGEDB_DenominationKeyInformationP); if (size <= offset) { GNUNET_break (0); @@ -185,8 +185,8 @@ TALER_MINTDB_denomination_key_read (const char *filename, * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure. */ int -TALER_MINTDB_denomination_key_write (const char *filename, - const struct TALER_MINTDB_DenominationKeyIssueInformation *dki) +TALER_EXCHANGEDB_denomination_key_write (const char *filename, + const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki) { char *priv_enc; size_t priv_enc_size; @@ -205,7 +205,7 @@ TALER_MINTDB_denomination_key_write (const char *filename, GNUNET_DISK_OPEN_WRITE | GNUNET_DISK_OPEN_CREATE | GNUNET_DISK_OPEN_TRUNCATE, GNUNET_DISK_PERM_USER_READ | GNUNET_DISK_PERM_USER_WRITE))) goto cleanup; - wsize = sizeof (struct TALER_MINTDB_DenominationKeyInformationP); + wsize = sizeof (struct TALER_EXCHANGEDB_DenominationKeyInformationP); if (GNUNET_SYSERR == (wrote = GNUNET_DISK_file_write (fh, &dki->issue, wsize))) @@ -244,7 +244,7 @@ struct DenomkeysIterateContext /** * Function to call on each denomination key. */ - TALER_MINTDB_DenominationKeyIterator it; + TALER_EXCHANGEDB_DenominationKeyIterator it; /** * Closure for @e it. @@ -269,12 +269,12 @@ denomkeys_iterate_keydir_iter (void *cls, const char *filename) { struct DenomkeysIterateContext *dic = cls; - struct TALER_MINTDB_DenominationKeyIssueInformation issue; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation issue; int ret; memset (&issue, 0, sizeof (issue)); if (GNUNET_OK != - TALER_MINTDB_denomination_key_read (filename, + TALER_EXCHANGEDB_denomination_key_read (filename, &issue)) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, @@ -292,7 +292,7 @@ denomkeys_iterate_keydir_iter (void *cls, /** - * Function called on each subdirectory in the #TALER_MINTDB_DIR_DENOMINATION_KEYS. Will + * Function called on each subdirectory in the #TALER_EXCHANGEDB_DIR_DENOMINATION_KEYS. Will * call the #denomkeys_iterate_keydir_iter() on each file in the * subdirectory. * @@ -317,10 +317,10 @@ denomkeys_iterate_topdir_iter (void *cls, /** - * Call @a it for each denomination key found in the @a mint_base_dir. + * Call @a it for each denomination key found in the @a exchange_base_dir. * - * @param mint_base_dir base directory for the mint, - * the signing keys must be in the #TALER_MINTDB_DIR_DENOMINATION_KEYS + * @param exchange_base_dir base directory for the exchange, + * the signing keys must be in the #TALER_EXCHANGEDB_DIR_DENOMINATION_KEYS * subdirectory * @param it function to call on each denomination key found * @param it_cls closure for @a it @@ -330,8 +330,8 @@ denomkeys_iterate_topdir_iter (void *cls, * as maybe none of the files were well-formed) */ int -TALER_MINTDB_denomination_keys_iterate (const char *mint_base_dir, - TALER_MINTDB_DenominationKeyIterator it, +TALER_EXCHANGEDB_denomination_keys_iterate (const char *exchange_base_dir, + TALER_EXCHANGEDB_DenominationKeyIterator it, void *it_cls) { char *dir; @@ -339,8 +339,8 @@ TALER_MINTDB_denomination_keys_iterate (const char *mint_base_dir, int ret; GNUNET_asprintf (&dir, - "%s" DIR_SEPARATOR_STR TALER_MINTDB_DIR_DENOMINATION_KEYS, - mint_base_dir); + "%s" DIR_SEPARATOR_STR TALER_EXCHANGEDB_DIR_DENOMINATION_KEYS, + exchange_base_dir); dic.it = it; dic.it_cls = it_cls; ret = GNUNET_DISK_directory_scan (dir, @@ -360,7 +360,7 @@ struct AuditorIterateContext /** * Function to call with the information for each auditor. */ - TALER_MINTDB_AuditorIterator it; + TALER_EXCHANGEDB_AuditorIterator it; /** * Closure for @e it. @@ -383,7 +383,7 @@ struct AuditorFileHeaderP struct TALER_AuditorPublicKeyP apub; /** - * Master public key of the mint the auditor is signing + * Master public key of the exchange the auditor is signing * information for. */ struct TALER_MasterPublicKeyP mpub; @@ -459,10 +459,10 @@ auditor_iter (void *cls, /** - * Call @a it with information for each auditor found in the @a mint_base_dir. + * Call @a it with information for each auditor found in the @a exchange_base_dir. * - * @param mint_base_dir base directory for the mint, - * the signing keys must be in the #TALER_MINTDB_DIR_DENOMINATION_KEYS + * @param exchange_base_dir base directory for the exchange, + * the signing keys must be in the #TALER_EXCHANGEDB_DIR_DENOMINATION_KEYS * subdirectory * @param it function to call with auditor information * @param it_cls closure for @a it @@ -472,8 +472,8 @@ auditor_iter (void *cls, * as maybe none of the files were well-formed) */ int -TALER_MINTDB_auditor_iterate (const char *mint_base_dir, - TALER_MINTDB_AuditorIterator it, +TALER_EXCHANGEDB_auditor_iterate (const char *exchange_base_dir, + TALER_EXCHANGEDB_AuditorIterator it, void *it_cls) { char *dir; @@ -481,8 +481,8 @@ TALER_MINTDB_auditor_iterate (const char *mint_base_dir, int ret; GNUNET_asprintf (&dir, - "%s" DIR_SEPARATOR_STR TALER_MINTDB_DIR_AUDITORS, - mint_base_dir); + "%s" DIR_SEPARATOR_STR TALER_EXCHANGEDB_DIR_AUDITORS, + exchange_base_dir); aic.it = it; aic.it_cls = it_cls; ret = GNUNET_DISK_directory_scan (dir, @@ -499,13 +499,13 @@ TALER_MINTDB_auditor_iterate (const char *mint_base_dir, * @param filename the file where to write the auditor information to * @param apub the auditor's public key * @param asigs the auditor's signatures, array of length @a dki_len - * @param mpub the mint's public key (as expected by the auditor) + * @param mpub the exchange's public key (as expected by the auditor) * @param dki_len length of @a dki * @param dki array of denomination coin data signed by the auditor * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure. */ int -TALER_MINTDB_auditor_write (const char *filename, +TALER_EXCHANGEDB_auditor_write (const char *filename, const struct TALER_AuditorPublicKeyP *apub, const struct TALER_AuditorSignatureP *asigs, const struct TALER_MasterPublicKeyP *mpub, @@ -555,4 +555,4 @@ TALER_MINTDB_auditor_write (const char *filename, } -/* end of mintdb_keyio.c */ +/* end of exchangedb_keyio.c */ diff --git a/src/mintdb/mintdb_plugin.c b/src/exchangedb/exchangedb_plugin.c similarity index 80% rename from src/mintdb/mintdb_plugin.c rename to src/exchangedb/exchangedb_plugin.c index 4a0f1dc04..ebaef9cc0 100644 --- a/src/mintdb/mintdb_plugin.c +++ b/src/exchangedb/exchangedb_plugin.c @@ -14,13 +14,13 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file mintdb/mintdb_plugin.c + * @file exchangedb/exchangedb_plugin.c * @brief Logic to load database plugin * @author Christian Grothoff * @author Sree Harsha Totakura */ #include "platform.h" -#include "taler_mintdb_plugin.h" +#include "taler_exchangedb_plugin.h" #include @@ -30,27 +30,27 @@ * @param cfg configuration to use * @return #GNUNET_OK on success */ -struct TALER_MINTDB_Plugin * -TALER_MINTDB_plugin_load (const struct GNUNET_CONFIGURATION_Handle *cfg) +struct TALER_EXCHANGEDB_Plugin * +TALER_EXCHANGEDB_plugin_load (const struct GNUNET_CONFIGURATION_Handle *cfg) { char *plugin_name; char *lib_name; struct GNUNET_CONFIGURATION_Handle *cfg_dup; - struct TALER_MINTDB_Plugin *plugin; + struct TALER_EXCHANGEDB_Plugin *plugin; if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (cfg, - "mint", + "exchange", "db", &plugin_name)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "mint", + "exchange", "db"); return NULL; } (void) GNUNET_asprintf (&lib_name, - "libtaler_plugin_mintdb_%s", + "libtaler_plugin_exchangedb_%s", plugin_name); GNUNET_free (plugin_name); cfg_dup = GNUNET_CONFIGURATION_dup (cfg); @@ -70,7 +70,7 @@ TALER_MINTDB_plugin_load (const struct GNUNET_CONFIGURATION_Handle *cfg) * @param plugin the plugin to unload */ void -TALER_MINTDB_plugin_unload (struct TALER_MINTDB_Plugin *plugin) +TALER_EXCHANGEDB_plugin_unload (struct TALER_EXCHANGEDB_Plugin *plugin) { char *lib_name; @@ -84,4 +84,4 @@ TALER_MINTDB_plugin_unload (struct TALER_MINTDB_Plugin *plugin) -/* end of mintdb_plugin.c */ +/* end of exchangedb_plugin.c */ diff --git a/src/mintdb/perf_taler_mintdb.c b/src/exchangedb/perf_taler_exchangedb.c similarity index 58% rename from src/mintdb/perf_taler_mintdb.c rename to src/exchangedb/perf_taler_exchangedb.c index fbaa2ce34..6ff7f5331 100644 --- a/src/mintdb/perf_taler_mintdb.c +++ b/src/exchangedb/perf_taler_exchangedb.c @@ -14,12 +14,12 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file mintdb/perf_taler_mintdb.c - * @brief Mint database performance analysis + * @file exchangedb/perf_taler_exchangedb.c + * @brief Exchange database performance analysis * @author Nicolas Fournier */ #include "platform.h" -#include "perf_taler_mintdb_interpreter.h" +#include "perf_taler_exchangedb_interpreter.h" #define NB_DENOMINATION_INIT 15 @@ -45,312 +45,312 @@ #define NB_MELT_SAVE SMALL /** - * Runs the performances tests for the mint database + * Runs the performances tests for the exchange database * and logs the results using Gauger */ int main (int argc, char ** argv) { int ret; - struct PERF_TALER_MINTDB_Cmd benchmark[] = + struct PERF_TALER_EXCHANGEDB_Cmd benchmark[] = { /* Denomination used to create coins */ - PERF_TALER_MINTDB_INIT_CMD_DEBUG ("Initializing database"), + PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG ("Initializing database"), - PERF_TALER_MINTDB_INIT_CMD_LOOP ("01 - denomination loop", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("01 - denomination loop", NB_DENOMINATION_INIT), - PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""), - PERF_TALER_MINTDB_INIT_CMD_CREATE_DENOMINATION ("01 - denomination"), - PERF_TALER_MINTDB_INIT_CMD_INSERT_DENOMINATION ("01 - insert", + PERF_TALER_EXCHANGEDB_INIT_CMD_START_TRANSACTION (""), + PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_DENOMINATION ("01 - denomination"), + PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_DENOMINATION ("01 - insert", "01 - denomination"), - PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""), - PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("01 - save denomination", + PERF_TALER_EXCHANGEDB_INIT_CMD_COMMIT_TRANSACTION (""), + PERF_TALER_EXCHANGEDB_INIT_CMD_SAVE_ARRAY ("01 - save denomination", "01 - denomination loop", "01 - denomination", NB_DENOMINATION_SAVE), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("01 - end", + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("01 - end", "01 - denomination loop"), /* End of initialization */ /* Reserve initialization */ - PERF_TALER_MINTDB_INIT_CMD_LOOP ("02 - init reserve loop", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("02 - init reserve loop", NB_RESERVE_INIT), - PERF_TALER_MINTDB_INIT_CMD_CREATE_RESERVE ("02 - reserve"), - PERF_TALER_MINTDB_INIT_CMD_INSERT_RESERVE ("02 - insert", + PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_RESERVE ("02 - reserve"), + PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_RESERVE ("02 - insert", "02 - reserve"), - PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("02 - save reserve", + PERF_TALER_EXCHANGEDB_INIT_CMD_SAVE_ARRAY ("02 - save reserve", "02 - init reserve loop", "02 - reserve", NB_RESERVE_SAVE), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("02 - end", + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("02 - end", "02 - init reserve loop"), /* End reserve init */ /* Withdrawal initialization */ - PERF_TALER_MINTDB_INIT_CMD_LOOP ("03 - init withdraw loop", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("03 - init withdraw loop", NB_WITHDRAW_INIT), - PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("03 - denomination load", + PERF_TALER_EXCHANGEDB_INIT_CMD_START_TRANSACTION (""), + PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY ("03 - denomination load", "03 - init withdraw loop", "01 - save denomination"), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("03 - reserve load", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY ("03 - reserve load", "03 - init withdraw loop", "02 - save reserve"), - PERF_TALER_MINTDB_INIT_CMD_CREATE_WITHDRAW ("03 - withdraw", + PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_WITHDRAW ("03 - withdraw", "03 - denomination load", "03 - reserve load"), - PERF_TALER_MINTDB_INIT_CMD_INSERT_WITHDRAW ("03 - insert", + PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_WITHDRAW ("03 - insert", "03 - withdraw"), - PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""), - PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("03 - save coin", + PERF_TALER_EXCHANGEDB_INIT_CMD_COMMIT_TRANSACTION (""), + PERF_TALER_EXCHANGEDB_INIT_CMD_SAVE_ARRAY ("03 - save coin", "03 - init withdraw loop", "03 - withdraw", NB_WITHDRAW_SAVE), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("03 - end", + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("03 - end", "03 - init withdraw loop"), /*End of withdrawal initialization */ /*Deposit initialization */ - PERF_TALER_MINTDB_INIT_CMD_LOOP ("04 - deposit init loop", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("04 - deposit init loop", NB_DEPOSIT_INIT), - PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("04 - coin load", + PERF_TALER_EXCHANGEDB_INIT_CMD_START_TRANSACTION (""), + PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY ("04 - coin load", "04 - deposit init loop", "03 - save coin"), - PERF_TALER_MINTDB_INIT_CMD_CREATE_DEPOSIT ("04 - deposit", + PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_DEPOSIT ("04 - deposit", "04 - coin load"), - PERF_TALER_MINTDB_INIT_CMD_INSERT_DEPOSIT ("04 - insert", + PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_DEPOSIT ("04 - insert", "04 - deposit"), - PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""), - PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("04 - deposit array", + PERF_TALER_EXCHANGEDB_INIT_CMD_COMMIT_TRANSACTION (""), + PERF_TALER_EXCHANGEDB_INIT_CMD_SAVE_ARRAY ("04 - deposit array", "04 - deposit init loop", "04 - deposit", NB_DEPOSIT_SAVE), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("", "04 - deposit init loop"), /* End of deposit initialization */ /* Session initialization */ - PERF_TALER_MINTDB_INIT_CMD_LOOP ("05 - refresh session init loop", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("05 - refresh session init loop", NB_REFRESH_INIT), - PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""), - PERF_TALER_MINTDB_INIT_CMD_CREATE_REFRESH_SESSION ("05 - refresh session"), - PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("05 - session array", + PERF_TALER_EXCHANGEDB_INIT_CMD_START_TRANSACTION (""), + PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_REFRESH_SESSION ("05 - refresh session"), + PERF_TALER_EXCHANGEDB_INIT_CMD_SAVE_ARRAY ("05 - session array", "05 - refresh session init loop", "05 - refresh session", NB_RESERVE_SAVE), - PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("05 - end", + PERF_TALER_EXCHANGEDB_INIT_CMD_COMMIT_TRANSACTION (""), + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("05 - end", "05 - refresh session init loop"), /* End of refresh session initialization */ /* Refresh melt initialization */ - PERF_TALER_MINTDB_INIT_CMD_LOOP ("06 - refresh melt init loop", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("06 - refresh melt init loop", NB_MELT_INIT), - PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""), + PERF_TALER_EXCHANGEDB_INIT_CMD_START_TRANSACTION (""), /* TODO: initialize using coins & sessions created localy * in order to make sure the same coin are not melted twice*/ - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("06 - session hash", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY ("06 - session hash", "06 - refresh melt init loop", "05 - session array"), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("06 - coin", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY ("06 - coin", "06 - refresh melt init loop", "03 - save coin"), - PERF_TALER_MINTDB_INIT_CMD_INSERT_REFRESH_MELT ("06 - refresh melt", + PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_REFRESH_MELT ("06 - refresh melt", "06 - session hash", "06 - coin"), - PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("06 - end", + PERF_TALER_EXCHANGEDB_INIT_CMD_COMMIT_TRANSACTION (""), + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("06 - end", "06 - refresh melt init loop"), /* End of refresh melt initialization */ - PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of initialization"), + PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG ("End of initialization"), - PERF_TALER_MINTDB_INIT_CMD_DEBUG ("Start of performances measuring"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("21 - start"), - PERF_TALER_MINTDB_INIT_CMD_LOOP ("21 - reserve insert measure", + PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG ("Start of performances measuring"), + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME ("21 - start"), + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("21 - reserve insert measure", NB_RESERVE_SAVE), - PERF_TALER_MINTDB_INIT_CMD_CREATE_RESERVE ("21 - reserve"), - PERF_TALER_MINTDB_INIT_CMD_INSERT_RESERVE ("21 - insert", + PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_RESERVE ("21 - reserve"), + PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_RESERVE ("21 - insert", "21 - reserve"), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("", "21 - reserve insert measure"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("21 - stop"), - PERF_TALER_MINTDB_INIT_CMD_GAUGER ("21 - gauger", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME ("21 - stop"), + PERF_TALER_EXCHANGEDB_INIT_CMD_GAUGER ("21 - gauger", "21 - start", "21 - stop", "POSTGRES", "Number of reserve inserted per second", "item/sec", NB_RESERVE_SAVE), - PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of reserve insertion"), + PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG ("End of reserve insertion"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("22 - start"), - PERF_TALER_MINTDB_INIT_CMD_LOOP ("22 - reserve load measure", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME ("22 - start"), + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("22 - reserve load measure", NB_RESERVE_SAVE), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("22 - reserve", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY ("22 - reserve", "22 - reserve load measure", "02 - save reserve"), - PERF_TALER_MINTDB_INIT_CMD_GET_RESERVE ("22 - get", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_RESERVE ("22 - get", "22 - reserve"), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("", "22 - reserve load measure"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("22 - stop"), - PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME ("22 - stop"), + PERF_TALER_EXCHANGEDB_INIT_CMD_GAUGER ("", "22 - start", "22 - stop", "POSTGRES", "Number of reserve loaded per second", "item/sec", NB_RESERVE_SAVE), - PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of reserve retreival"), + PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG ("End of reserve retreival"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("23 - start"), - PERF_TALER_MINTDB_INIT_CMD_LOOP ("23 - reserve history measure", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME ("23 - start"), + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("23 - reserve history measure", NB_RESERVE_SAVE), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("23 - reserve", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY ("23 - reserve", "23 - reserve history measure", "02 - save reserve"), - PERF_TALER_MINTDB_INIT_CMD_GET_RESERVE_HISTORY ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_RESERVE_HISTORY ("", "23 - reserve"), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("", "23 - reserve history measure"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("23 - stop"), - PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME ("23 - stop"), + PERF_TALER_EXCHANGEDB_INIT_CMD_GAUGER ("", "23 - start", "23 - stop", "POSTGRES", "Number of reserve history loaded per second", "item/sec", NB_RESERVE_SAVE), - PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of reserve history access"), + PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG ("End of reserve history access"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("24 - start"), - PERF_TALER_MINTDB_INIT_CMD_LOOP ("24 - withdraw insert measure", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME ("24 - start"), + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("24 - withdraw insert measure", NB_WITHDRAW_SAVE), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("24 - reserve", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY ("24 - reserve", "24 - withdraw insert measure", "02 - save reserve"), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("24 - denomination", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY ("24 - denomination", "24 - withdraw insert measure", "01 - save denomination"), - PERF_TALER_MINTDB_INIT_CMD_CREATE_WITHDRAW ("24 - withdraw", + PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_WITHDRAW ("24 - withdraw", "24 - denomination", "24 - reserve"), - PERF_TALER_MINTDB_INIT_CMD_INSERT_WITHDRAW ("24 - insert", + PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_WITHDRAW ("24 - insert", "24 - withdraw"), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("", "24 - withdraw insert measure"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("24 - stop"), - PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME ("24 - stop"), + PERF_TALER_EXCHANGEDB_INIT_CMD_GAUGER ("", "24 - start", "24 - stop", "POSTGRES", "Number of withdraw insert per second", "item/sec", NB_WITHDRAW_SAVE), - PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of withdraw insertion"), + PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG ("End of withdraw insertion"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("25 - start"), - PERF_TALER_MINTDB_INIT_CMD_LOOP ("25 - withdraw insert measure", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME ("25 - start"), + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("25 - withdraw insert measure", NB_RESERVE_SAVE), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("25 - coin", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY ("25 - coin", "25 - withdraw insert measure", "03 - save coin"), - PERF_TALER_MINTDB_INIT_CMD_GET_WITHDRAW ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_WITHDRAW ("", "25 - coin"), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("", "25 - withdraw insert measure"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("25 - stop"), - PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME ("25 - stop"), + PERF_TALER_EXCHANGEDB_INIT_CMD_GAUGER ("", "25 - start", "25 - stop", "POSTGRES", "Number of withdraw loaded per second", "item/sec", NB_RESERVE_SAVE), - PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of withdraw loading"), + PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG ("End of withdraw loading"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("26 - start"), - PERF_TALER_MINTDB_INIT_CMD_LOOP ("26 - get coin transaction", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME ("26 - start"), + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("26 - get coin transaction", NB_WITHDRAW_SAVE), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("26 - coin", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY ("26 - coin", "26 - get coin transaction", "03 - save coin"), - PERF_TALER_MINTDB_INIT_CMD_GET_COIN_TRANSACTION("", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_COIN_TRANSACTION("", "26 - coin"), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("", "26 - get coin transaction"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("26 - end"), - PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME ("26 - end"), + PERF_TALER_EXCHANGEDB_INIT_CMD_GAUGER ("", "26 - start", "26 - end", "POSTGRES", "Number of coin transaction history loaded per second", "item/sec", NB_WITHDRAW_SAVE), - PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of transaction loading"), + PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG ("End of transaction loading"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("27 - start"), - PERF_TALER_MINTDB_INIT_CMD_LOOP ("27 - /reserve/withdraw", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME ("27 - start"), + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("27 - /reserve/withdraw", NB_WITHDRAW_SAVE), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("27 - reserve", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY ("27 - reserve", "27 - /reserve/withdraw", "02 - save reserve"), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("27 - dki", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY ("27 - dki", "27 - /reserve/withdraw", "01 - save denomination"), - PERF_TALER_MINTDB_INIT_CMD_WITHDRAW_SIGN ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_WITHDRAW_SIGN ("", "27 - dki", "27 - reserve"), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("", "27 - /reserve/withdraw"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("27 - end"), - PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME ("27 - end"), + PERF_TALER_EXCHANGEDB_INIT_CMD_GAUGER ("", "27 - start", "27 - end", "POSTGRES", "Number of /reserve/withdraw per second", "item/sec", NB_WITHDRAW_SAVE), - PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of /reserve/withdraw"), + PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG ("End of /reserve/withdraw"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("28 - start"), - PERF_TALER_MINTDB_INIT_CMD_LOOP ("28 - /deposit", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME ("28 - start"), + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("28 - /deposit", NB_DEPOSIT_SAVE), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("28 - coin", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY ("28 - coin", "28 - /deposit", "03 - save coin"), - PERF_TALER_MINTDB_INIT_CMD_DEPOSIT ("28 - deposit", + PERF_TALER_EXCHANGEDB_INIT_CMD_DEPOSIT ("28 - deposit", "28 - coin"), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("", "28 - /deposit"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("28 - stop"), - PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME ("28 - stop"), + PERF_TALER_EXCHANGEDB_INIT_CMD_GAUGER ("", "28 - start", "28 - stop", "POSTGRES", "Number of /deposit per second", "item/sec", NB_DEPOSIT_SAVE), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("29 - start"), - PERF_TALER_MINTDB_INIT_CMD_LOOP ("29 - insert refresh session", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME ("29 - start"), + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("29 - insert refresh session", NB_REFRESH_SAVE), - PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""), - PERF_TALER_MINTDB_INIT_CMD_CREATE_REFRESH_SESSION (""), - PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_START_TRANSACTION (""), + PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_REFRESH_SESSION (""), + PERF_TALER_EXCHANGEDB_INIT_CMD_COMMIT_TRANSACTION (""), + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("", "29 - insert refresh session"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("29 - stop"), - PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME ("29 - stop"), + PERF_TALER_EXCHANGEDB_INIT_CMD_GAUGER ("", "29 - start", "29 - stop", "POSTGRES", "Number of refresh session inserted per second", "item/sec", NB_REFRESH_SAVE), - PERF_TALER_MINTDB_INIT_CMD_END (""), + PERF_TALER_EXCHANGEDB_INIT_CMD_END (""), }; - ret = PERF_TALER_MINTDB_run_benchmark ( - "perf-taler-mintdb", - "./test-mint-db-postgres.conf", - (struct PERF_TALER_MINTDB_Cmd []) {PERF_TALER_MINTDB_INIT_CMD_END("")}, + ret = PERF_TALER_EXCHANGEDB_run_benchmark ( + "perf-taler-exchangedb", + "./test-exchange-db-postgres.conf", + (struct PERF_TALER_EXCHANGEDB_Cmd []) {PERF_TALER_EXCHANGEDB_INIT_CMD_END("")}, benchmark); if (GNUNET_SYSERR == ret) return 1; diff --git a/src/mintdb/perf_taler_mintdb_init.c b/src/exchangedb/perf_taler_exchangedb_init.c similarity index 77% rename from src/mintdb/perf_taler_mintdb_init.c rename to src/exchangedb/perf_taler_exchangedb_init.c index ccfc6a05a..2e613b3cf 100644 --- a/src/mintdb/perf_taler_mintdb_init.c +++ b/src/exchangedb/perf_taler_exchangedb_init.c @@ -14,40 +14,40 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file mintdb/perf_taler_mintdb_init.c - * @brief Interpreter library for mint database performance analysis + * @file exchangedb/perf_taler_exchangedb_init.c + * @brief Interpreter library for exchange database performance analysis * @author Nicolas Fournier */ #include "platform.h" -#include "perf_taler_mintdb_init.h" +#include "perf_taler_exchangedb_init.h" #include #include "taler_signatures.h" #include "taler_amount_lib.h" #define CURRENCY "EUR" -#define PERF_TALER_MINTDB_RSA_SIZE 512 +#define PERF_TALER_EXCHANGEDB_RSA_SIZE 512 /** * Generate a dummy DenominationKeyInformation for testing purposes * @return a dummy denomination key */ -struct TALER_MINTDB_DenominationKeyIssueInformation * -PERF_TALER_MINTDB_denomination_init () +struct TALER_EXCHANGEDB_DenominationKeyIssueInformation * +PERF_TALER_EXCHANGEDB_denomination_init () { struct GNUNET_CRYPTO_EddsaPrivateKey *master_prvt; - struct TALER_MINTDB_DenominationKeyIssueInformation *dki; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki; struct TALER_DenominationPrivateKey denom_priv; struct TALER_DenominationPublicKey denom_pub; - struct TALER_MINTDB_DenominationKeyInformationP issue; + struct TALER_EXCHANGEDB_DenominationKeyInformationP issue; master_prvt = GNUNET_CRYPTO_eddsa_key_create(); - dki = GNUNET_new (struct TALER_MINTDB_DenominationKeyIssueInformation); + dki = GNUNET_new (struct TALER_EXCHANGEDB_DenominationKeyIssueInformation); GNUNET_assert (NULL != dki); denom_priv.rsa_private_key - = GNUNET_CRYPTO_rsa_private_key_create (PERF_TALER_MINTDB_RSA_SIZE); + = GNUNET_CRYPTO_rsa_private_key_create (PERF_TALER_EXCHANGEDB_RSA_SIZE); GNUNET_assert (NULL != denom_priv.rsa_private_key); denom_pub.rsa_public_key = GNUNET_CRYPTO_rsa_private_key_get_public (denom_priv.rsa_private_key); @@ -99,13 +99,13 @@ PERF_TALER_MINTDB_denomination_init () * @param reserve the deposit copy * @return a copy of @a deposit; NULL if error */ -struct TALER_MINTDB_DenominationKeyIssueInformation * -PERF_TALER_MINTDB_denomination_copy (const struct TALER_MINTDB_DenominationKeyIssueInformation *dki) +struct TALER_EXCHANGEDB_DenominationKeyIssueInformation * +PERF_TALER_EXCHANGEDB_denomination_copy (const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki) { - struct TALER_MINTDB_DenominationKeyIssueInformation *copy; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *copy; GNUNET_assert (NULL != - (copy = GNUNET_new (struct TALER_MINTDB_DenominationKeyIssueInformation))); + (copy = GNUNET_new (struct TALER_EXCHANGEDB_DenominationKeyIssueInformation))); {/* denom_priv */ copy->denom_priv.rsa_private_key = GNUNET_CRYPTO_rsa_private_key_dup ( dki->denom_priv.rsa_private_key); @@ -127,7 +127,7 @@ PERF_TALER_MINTDB_denomination_copy (const struct TALER_MINTDB_DenominationKeyIs * @param dki pointer to the struct to free */ int -PERF_TALER_MINTDB_denomination_free (struct TALER_MINTDB_DenominationKeyIssueInformation *dki) +PERF_TALER_EXCHANGEDB_denomination_free (struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki) { if (NULL == dki) return GNUNET_OK; @@ -143,13 +143,13 @@ PERF_TALER_MINTDB_denomination_free (struct TALER_MINTDB_DenominationKeyIssueInf * Generate a dummy reserve for testing * @return a reserve with 1000 EUR in it */ -struct PERF_TALER_MINTDB_Reserve * -PERF_TALER_MINTDB_reserve_init () +struct PERF_TALER_EXCHANGEDB_Reserve * +PERF_TALER_EXCHANGEDB_reserve_init () { - struct PERF_TALER_MINTDB_Reserve *reserve; + struct PERF_TALER_EXCHANGEDB_Reserve *reserve; GNUNET_assert (NULL != - (reserve = GNUNET_new (struct PERF_TALER_MINTDB_Reserve))); + (reserve = GNUNET_new (struct PERF_TALER_EXCHANGEDB_Reserve))); {/* private */ struct GNUNET_CRYPTO_EddsaPrivateKey *private; private = GNUNET_CRYPTO_eddsa_key_create (); @@ -172,12 +172,12 @@ PERF_TALER_MINTDB_reserve_init () * @param reserve the reserve to copy * @return a copy of @a reserve; NULL if error */ -struct PERF_TALER_MINTDB_Reserve * -PERF_TALER_MINTDB_reserve_copy (const struct PERF_TALER_MINTDB_Reserve *reserve) +struct PERF_TALER_EXCHANGEDB_Reserve * +PERF_TALER_EXCHANGEDB_reserve_copy (const struct PERF_TALER_EXCHANGEDB_Reserve *reserve) { - struct PERF_TALER_MINTDB_Reserve *copy; + struct PERF_TALER_EXCHANGEDB_Reserve *copy; GNUNET_assert (NULL != - (copy = GNUNET_new (struct PERF_TALER_MINTDB_Reserve))); + (copy = GNUNET_new (struct PERF_TALER_EXCHANGEDB_Reserve))); *copy = *reserve; return copy; } @@ -188,7 +188,7 @@ PERF_TALER_MINTDB_reserve_copy (const struct PERF_TALER_MINTDB_Reserve *reserve) * @param reserve pointer to the structure to be freed */ int -PERF_TALER_MINTDB_reserve_free (struct PERF_TALER_MINTDB_Reserve *reserve) +PERF_TALER_EXCHANGEDB_reserve_free (struct PERF_TALER_EXCHANGEDB_Reserve *reserve) { if (NULL == reserve) return GNUNET_OK; @@ -201,10 +201,10 @@ PERF_TALER_MINTDB_reserve_free (struct PERF_TALER_MINTDB_Reserve *reserve) * Generate a dummy deposit for testing purposes * @param dki the denomination key used to sign the key */ -struct TALER_MINTDB_Deposit * -PERF_TALER_MINTDB_deposit_init (const struct PERF_TALER_MINTDB_Coin *coin) +struct TALER_EXCHANGEDB_Deposit * +PERF_TALER_EXCHANGEDB_deposit_init (const struct PERF_TALER_EXCHANGEDB_Coin *coin) { - struct TALER_MINTDB_Deposit *deposit; + struct TALER_EXCHANGEDB_Deposit *deposit; struct TALER_CoinSpendSignatureP csig; struct TALER_MerchantPublicKeyP merchant_pub; struct GNUNET_HashCode h_contract; @@ -222,7 +222,7 @@ PERF_TALER_MINTDB_deposit_init (const struct PERF_TALER_MINTDB_Coin *coin) struct TALER_Amount deposit_fee; GNUNET_assert (NULL != - (deposit = GNUNET_malloc (sizeof (struct TALER_MINTDB_Deposit) + sizeof (wire)))); + (deposit = GNUNET_malloc (sizeof (struct TALER_EXCHANGEDB_Deposit) + sizeof (wire)))); GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, &h_contract); GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, @@ -289,12 +289,12 @@ PERF_TALER_MINTDB_deposit_init (const struct PERF_TALER_MINTDB_Coin *coin) * @param reserve the deposit copy * @return a copy of @a deposit; NULL if error */ -struct TALER_MINTDB_Deposit * -PERF_TALER_MINTDB_deposit_copy (const struct TALER_MINTDB_Deposit *deposit) +struct TALER_EXCHANGEDB_Deposit * +PERF_TALER_EXCHANGEDB_deposit_copy (const struct TALER_EXCHANGEDB_Deposit *deposit) { - struct TALER_MINTDB_Deposit *copy; + struct TALER_EXCHANGEDB_Deposit *copy; - copy = GNUNET_new (struct TALER_MINTDB_Deposit); + copy = GNUNET_new (struct TALER_EXCHANGEDB_Deposit); *copy = *deposit; json_incref (copy->wire); copy->coin.denom_pub.rsa_public_key = @@ -310,7 +310,7 @@ PERF_TALER_MINTDB_deposit_copy (const struct TALER_MINTDB_Deposit *deposit) * @param deposit pointer to the structure to free */ int -PERF_TALER_MINTDB_deposit_free (struct TALER_MINTDB_Deposit *deposit) +PERF_TALER_EXCHANGEDB_deposit_free (struct TALER_EXCHANGEDB_Deposit *deposit) { if (NULL == deposit) return GNUNET_OK; @@ -328,15 +328,15 @@ PERF_TALER_MINTDB_deposit_free (struct TALER_MINTDB_Deposit *deposit) * @param reserve reserve providing the money for the coin * @return a randomly generated CollectableBlindcoin */ -struct PERF_TALER_MINTDB_Coin * -PERF_TALER_MINTDB_coin_init ( - const struct TALER_MINTDB_DenominationKeyIssueInformation *dki, - const struct PERF_TALER_MINTDB_Reserve *reserve) +struct PERF_TALER_EXCHANGEDB_Coin * +PERF_TALER_EXCHANGEDB_coin_init ( + const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki, + const struct PERF_TALER_EXCHANGEDB_Reserve *reserve) { - struct PERF_TALER_MINTDB_Coin *coin; + struct PERF_TALER_EXCHANGEDB_Coin *coin; struct GNUNET_CRYPTO_EddsaPrivateKey *priv; - coin = GNUNET_new (struct PERF_TALER_MINTDB_Coin); + coin = GNUNET_new (struct PERF_TALER_EXCHANGEDB_Coin); GNUNET_assert (NULL != coin); /* priv */ @@ -382,12 +382,12 @@ PERF_TALER_MINTDB_coin_init ( * @param coin the coin to copy * @return a copy of coin; NULL if error */ -struct PERF_TALER_MINTDB_Coin * -PERF_TALER_MINTDB_coin_copy (const struct PERF_TALER_MINTDB_Coin *coin) +struct PERF_TALER_EXCHANGEDB_Coin * +PERF_TALER_EXCHANGEDB_coin_copy (const struct PERF_TALER_EXCHANGEDB_Coin *coin) { - struct PERF_TALER_MINTDB_Coin *copy; + struct PERF_TALER_EXCHANGEDB_Coin *copy; - copy = GNUNET_new (struct PERF_TALER_MINTDB_Coin); + copy = GNUNET_new (struct PERF_TALER_EXCHANGEDB_Coin); /* priv */ copy->priv = coin->priv; /* public_info */ @@ -418,7 +418,7 @@ PERF_TALER_MINTDB_coin_copy (const struct PERF_TALER_MINTDB_Coin *coin) * @param coin pointer to the structure to free */ int -PERF_TALER_MINTDB_coin_free (struct PERF_TALER_MINTDB_Coin *coin) +PERF_TALER_EXCHANGEDB_coin_free (struct PERF_TALER_EXCHANGEDB_Coin *coin) { if (NULL == coin) return GNUNET_OK; @@ -434,13 +434,13 @@ PERF_TALER_MINTDB_coin_free (struct PERF_TALER_MINTDB_Coin *coin) /** * @return a randomly generated refresh session */ -struct TALER_MINTDB_RefreshSession * -PERF_TALER_MINTDB_refresh_session_init () +struct TALER_EXCHANGEDB_RefreshSession * +PERF_TALER_EXCHANGEDB_refresh_session_init () { - struct TALER_MINTDB_RefreshSession *refresh_session; + struct TALER_EXCHANGEDB_RefreshSession *refresh_session; GNUNET_assert (NULL != - (refresh_session = GNUNET_new (struct TALER_MINTDB_RefreshSession))); + (refresh_session = GNUNET_new (struct TALER_EXCHANGEDB_RefreshSession))); refresh_session->noreveal_index = 1; refresh_session->num_oldcoins = 1; refresh_session->num_newcoins = 1; @@ -453,8 +453,8 @@ PERF_TALER_MINTDB_refresh_session_init () * @return #GNUNET_OK if the copy was successful, #GNUNET_SYSERR if it wasn't */ int -PERF_TALER_MINTDB_refresh_session_copy (struct TALER_MINTDB_RefreshSession *session, - struct TALER_MINTDB_RefreshSession *copy) +PERF_TALER_EXCHANGEDB_refresh_session_copy (struct TALER_EXCHANGEDB_RefreshSession *session, + struct TALER_EXCHANGEDB_RefreshSession *copy) { *copy = *session; return GNUNET_OK; @@ -465,7 +465,7 @@ PERF_TALER_MINTDB_refresh_session_copy (struct TALER_MINTDB_RefreshSession *sess * Free a refresh session */ int -PERF_TALER_MINTDB_refresh_session_free (struct TALER_MINTDB_RefreshSession *refresh_session) +PERF_TALER_EXCHANGEDB_refresh_session_free (struct TALER_EXCHANGEDB_RefreshSession *refresh_session) { if (NULL == refresh_session) return GNUNET_OK; @@ -479,13 +479,13 @@ PERF_TALER_MINTDB_refresh_session_free (struct TALER_MINTDB_RefreshSession *refr * * @param session the refresh session * @param dki the denomination the melted coin uses - * @return a pointer to a #TALER_MINTDB_RefreshMelt + * @return a pointer to a #TALER_EXCHANGEDB_RefreshMelt */ -struct TALER_MINTDB_RefreshMelt * -PERF_TALER_MINTDB_refresh_melt_init (struct GNUNET_HashCode *session, - struct PERF_TALER_MINTDB_Coin *coin) +struct TALER_EXCHANGEDB_RefreshMelt * +PERF_TALER_EXCHANGEDB_refresh_melt_init (struct GNUNET_HashCode *session, + struct PERF_TALER_EXCHANGEDB_Coin *coin) { - struct TALER_MINTDB_RefreshMelt *melt; + struct TALER_EXCHANGEDB_RefreshMelt *melt; struct TALER_CoinSpendSignatureP coin_sig; struct TALER_Amount amount; struct TALER_Amount amount_with_fee; @@ -510,7 +510,7 @@ PERF_TALER_MINTDB_refresh_melt_init (struct GNUNET_HashCode *session, GNUNET_assert (GNUNET_OK == TALER_string_to_amount (CURRENCY ":0.1", &amount_with_fee)); - melt = GNUNET_new (struct TALER_MINTDB_RefreshMelt); + melt = GNUNET_new (struct TALER_EXCHANGEDB_RefreshMelt); melt->coin.coin_pub = coin->public_info.coin_pub; melt->coin.denom_sig.rsa_signature = GNUNET_CRYPTO_rsa_signature_dup (coin->public_info.denom_sig.rsa_signature); @@ -527,17 +527,17 @@ PERF_TALER_MINTDB_refresh_melt_init (struct GNUNET_HashCode *session, /** - * Copies the internals of a #TALER_MINTDB_RefreshMelt + * Copies the internals of a #TALER_EXCHANGEDB_RefreshMelt * * @param melt the refresh melt to copy * @return an copy of @ melt */ -struct TALER_MINTDB_RefreshMelt * -PERF_TALER_MINTDB_refresh_melt_copy (const struct TALER_MINTDB_RefreshMelt *melt) +struct TALER_EXCHANGEDB_RefreshMelt * +PERF_TALER_EXCHANGEDB_refresh_melt_copy (const struct TALER_EXCHANGEDB_RefreshMelt *melt) { - struct TALER_MINTDB_RefreshMelt *copy; + struct TALER_EXCHANGEDB_RefreshMelt *copy; - copy = GNUNET_new (struct TALER_MINTDB_RefreshMelt); + copy = GNUNET_new (struct TALER_EXCHANGEDB_RefreshMelt); *copy = *melt; copy->coin.denom_sig.rsa_signature = GNUNET_CRYPTO_rsa_signature_dup (melt->coin.denom_sig.rsa_signature); @@ -548,13 +548,13 @@ PERF_TALER_MINTDB_refresh_melt_copy (const struct TALER_MINTDB_RefreshMelt *melt /** - * Free the internal memory of a #TALER_MINTDB_RefreshMelt + * Free the internal memory of a #TALER_EXCHANGEDB_RefreshMelt * - * @param melt the #TALER_MINTDB_RefreshMelt to free + * @param melt the #TALER_EXCHANGEDB_RefreshMelt to free * @return #GNUNET_OK if the operation was successful, #GNUNET_SYSERROR */ int -PERF_TALER_MINTDB_refresh_melt_free (struct TALER_MINTDB_RefreshMelt *melt) +PERF_TALER_EXCHANGEDB_refresh_melt_free (struct TALER_EXCHANGEDB_RefreshMelt *melt) { GNUNET_CRYPTO_rsa_signature_free (melt->coin.denom_sig.rsa_signature); GNUNET_free (melt); @@ -563,15 +563,15 @@ PERF_TALER_MINTDB_refresh_melt_free (struct TALER_MINTDB_RefreshMelt *melt) /** - * Create a #TALER_MINTDB_RefreshCommitCoin + * Create a #TALER_EXCHANGEDB_RefreshCommitCoin */ -struct TALER_MINTDB_RefreshCommitCoin * -PERF_TALER_MINTDB_refresh_commit_coin_init () +struct TALER_EXCHANGEDB_RefreshCommitCoin * +PERF_TALER_EXCHANGEDB_refresh_commit_coin_init () { - struct TALER_MINTDB_RefreshCommitCoin *commit_coin; + struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coin; struct TALER_RefreshLinkEncrypted refresh_link; - commit_coin = GNUNET_new (struct TALER_MINTDB_RefreshCommitCoin); + commit_coin = GNUNET_new (struct TALER_EXCHANGEDB_RefreshCommitCoin); GNUNET_assert (NULL != commit_coin); {/* refresh_link */ refresh_link = (struct TALER_RefreshLinkEncrypted) @@ -592,17 +592,17 @@ PERF_TALER_MINTDB_refresh_commit_coin_init () /** - * Copies a #TALER_MINTDB_RefreshCommitCoin + * Copies a #TALER_EXCHANGEDB_RefreshCommitCoin * * @param commit_coin the commit to copy * @return a copy of @a commit_coin */ -struct TALER_MINTDB_RefreshCommitCoin * -PERF_TALER_MINTDB_refresh_commit_coin_copy (struct TALER_MINTDB_RefreshCommitCoin *commit_coin) +struct TALER_EXCHANGEDB_RefreshCommitCoin * +PERF_TALER_EXCHANGEDB_refresh_commit_coin_copy (struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coin) { - struct TALER_MINTDB_RefreshCommitCoin *copy; + struct TALER_EXCHANGEDB_RefreshCommitCoin *copy; - copy = GNUNET_new (struct TALER_MINTDB_RefreshCommitCoin); + copy = GNUNET_new (struct TALER_EXCHANGEDB_RefreshCommitCoin); copy->refresh_link = GNUNET_new (struct TALER_RefreshLinkEncrypted); *copy->refresh_link = *commit_coin->refresh_link; return copy; @@ -610,12 +610,12 @@ PERF_TALER_MINTDB_refresh_commit_coin_copy (struct TALER_MINTDB_RefreshCommitCoi /** - * Free a #TALER_MINTDB_RefreshCommitCoin + * Free a #TALER_EXCHANGEDB_RefreshCommitCoin * * @param commit_coin the coin to free */ void -PERF_TALER_MINTDB_refresh_commit_coin_free (struct TALER_MINTDB_RefreshCommitCoin *commit_coin) +PERF_TALER_EXCHANGEDB_refresh_commit_coin_free (struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coin) { GNUNET_free (commit_coin->refresh_link); GNUNET_free (commit_coin); diff --git a/src/exchangedb/perf_taler_exchangedb_init.h b/src/exchangedb/perf_taler_exchangedb_init.h new file mode 100644 index 000000000..0ff074108 --- /dev/null +++ b/src/exchangedb/perf_taler_exchangedb_init.h @@ -0,0 +1,257 @@ +/* + This file is part of TALER + Copyright (C) 2014, 2015 GNUnet e.V. + + TALER is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + TALER; see the file COPYING. If not, If not, see + */ +/** + * @file exchangedb/perf_taler_exchangedb_init.h + * @brief Heler function for creating dummy inputs for the exchange database + * @author Nicolas Fournier + */ +#ifndef __PERF_TALER_EXCHANGEDB_INIT_H___ +#define __PERF_TALER_EXCHANGEDB_INIT_H___ + +#include "taler_exchangedb_plugin.h" + + +#define CURRENCY "EUR" + +/** + * All information about a reserve + */ +struct PERF_TALER_EXCHANGEDB_Reserve +{ + /** + * Information about a rserve available to the Exchange + */ + struct TALER_EXCHANGEDB_Reserve reserve; + + /** + * Private key of a reserve + */ + struct GNUNET_CRYPTO_EddsaPrivateKey private; +}; + + +/** + * All informations about a coin + */ +struct PERF_TALER_EXCHANGEDB_Coin +{ + /** + * Blinded coin, known by the exchange + */ + struct TALER_EXCHANGEDB_CollectableBlindcoin blind; + + /** + * Public key of the coin and othes informations + */ + struct TALER_CoinPublicInfo public_info; + + /** + * Private key of the coin + */ + struct GNUNET_CRYPTO_EddsaPrivateKey priv; +}; + + +/** + * Generate a dummy DenominationKeyInformation for testing purposes + * @return a dummy denomination key + */ +struct TALER_EXCHANGEDB_DenominationKeyIssueInformation * +PERF_TALER_EXCHANGEDB_denomination_init (void); + + +/** + * Copies the given denomination + * @param reserve the deposit copy + * @return a copy of @a deposit; NULL if error + */ +struct TALER_EXCHANGEDB_DenominationKeyIssueInformation * +PERF_TALER_EXCHANGEDB_denomination_copy ( + const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki); + + +/** + * Free memory of a DenominationKeyIssueInformation + * @param dki pointer to the struct to free + */ +int +PERF_TALER_EXCHANGEDB_denomination_free ( + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki); + + +/** + * Generate a dummy reserve for testing + * @return a reserve with 1000 EUR in it + */ +struct PERF_TALER_EXCHANGEDB_Reserve * +PERF_TALER_EXCHANGEDB_reserve_init (void); + + +/** + * Copies the given reserve + * @param reserve the reserve to copy + * @return a copy of @a reserve; NULL if error + */ +struct PERF_TALER_EXCHANGEDB_Reserve * +PERF_TALER_EXCHANGEDB_reserve_copy (const struct PERF_TALER_EXCHANGEDB_Reserve *reserve); + + +/** + * Free memory of a reserve + * @param reserve pointer to the structure to be freed + */ +int +PERF_TALER_EXCHANGEDB_reserve_free (struct PERF_TALER_EXCHANGEDB_Reserve *reserve); + + +/** + * Generate a dummy deposit for testing purposes + * @param dki the denomination key used to sign the key + */ +struct TALER_EXCHANGEDB_Deposit * +PERF_TALER_EXCHANGEDB_deposit_init ( + const struct PERF_TALER_EXCHANGEDB_Coin *coin); + + +/** + * Copies the given deposit + * @param reserve the deposit copy + * @return a copy of @a deposit; NULL if error + */ +struct TALER_EXCHANGEDB_Deposit * +PERF_TALER_EXCHANGEDB_deposit_copy (const struct TALER_EXCHANGEDB_Deposit *deposit); + + +/** + * Free memory of a deposit + * @param deposit pointer to the structure to free + */ +int +PERF_TALER_EXCHANGEDB_deposit_free (struct TALER_EXCHANGEDB_Deposit *deposit); + + +/** + * Generate a coin for testing purpuses + * @param dki denomination key used to sign the coin + * @param reserve reserve providing the money for the coin + * @return a randomly generated CollectableBlindcoin + */ +struct PERF_TALER_EXCHANGEDB_Coin * +PERF_TALER_EXCHANGEDB_coin_init ( + const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki, + const struct PERF_TALER_EXCHANGEDB_Reserve *reserve); + + +/** + * Copies the given coin + * @param coin the coin to copy + * @return a copy of coin; NULL if error + */ +struct PERF_TALER_EXCHANGEDB_Coin * +PERF_TALER_EXCHANGEDB_coin_copy ( + const struct PERF_TALER_EXCHANGEDB_Coin *coin); + + +/** + * Liberate memory of @a coin + * @param coin pointer to the structure to free + */ +int +PERF_TALER_EXCHANGEDB_coin_free ( + struct PERF_TALER_EXCHANGEDB_Coin *coin); + + +/** + * @return a randomly generated refresh session + */ +struct TALER_EXCHANGEDB_RefreshSession * +PERF_TALER_EXCHANGEDB_refresh_session_init (void); + + +/** + * @return #GNUNET_OK if the copy was successful, #GNUNET_SYSERR if it wasn't + */ +int +PERF_TALER_EXCHANGEDB_refresh_session_copy (struct TALER_EXCHANGEDB_RefreshSession *session, + struct TALER_EXCHANGEDB_RefreshSession *copy); + + +/** + * Frees memory of a refresh_session + */ +int +PERF_TALER_EXCHANGEDB_refresh_session_free ( + struct TALER_EXCHANGEDB_RefreshSession *refresh_session); + + +/** + * Create a melt operation + * + * @param session the refresh session + * @param dki the denomination the melted coin uses + * @return a pointer to a #TALER_EXCHANGEDB_RefreshMelt + */ +struct TALER_EXCHANGEDB_RefreshMelt * +PERF_TALER_EXCHANGEDB_refresh_melt_init (struct GNUNET_HashCode *session, + struct PERF_TALER_EXCHANGEDB_Coin *coin); + + +/** + * Copies the internals of a #TALER_EXCHANGEDB_RefreshMelt + * + * @param melt the refresh melt to copy + * @return an copy of @ melt + */ +struct TALER_EXCHANGEDB_RefreshMelt * +PERF_TALER_EXCHANGEDB_refresh_melt_copy (const struct TALER_EXCHANGEDB_RefreshMelt *melt); + + +/** + * Free the internal memory of a #TALER_EXCHANGEDB_RefreshMelt + * + * @param melt the #TALER_EXCHANGEDB_RefreshMelt to free + * @return #GNUNET_OK if the operation was successful, #GNUNET_SYSERROR + */ +int +PERF_TALER_EXCHANGEDB_refresh_melt_free (struct TALER_EXCHANGEDB_RefreshMelt *melt); + + +/** + * Create a #TALER_EXCHANGEDB_RefreshCommitCoin + */ +struct TALER_EXCHANGEDB_RefreshCommitCoin * +PERF_TALER_EXCHANGEDB_refresh_commit_coin_init (void); + + +/** + * Copies a #TALER_EXCHANGEDB_RefreshCommitCoin + * + * @param commit_coin the commit to copy + * @return a copy of @a commit_coin + */ +struct TALER_EXCHANGEDB_RefreshCommitCoin * +PERF_TALER_EXCHANGEDB_refresh_commit_coin_copy (struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coin); + + +/** + * Free a #TALER_EXCHANGEDB_RefreshCommitCoin + * + * @param commit_coin the coin to free + */ +void +PERF_TALER_EXCHANGEDB_refresh_commit_coin_free (struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coin); + +#endif diff --git a/src/mintdb/perf_taler_mintdb_interpreter.c b/src/exchangedb/perf_taler_exchangedb_interpreter.c similarity index 77% rename from src/mintdb/perf_taler_mintdb_interpreter.c rename to src/exchangedb/perf_taler_exchangedb_interpreter.c index 293d5f35f..75b32cb60 100644 --- a/src/mintdb/perf_taler_mintdb_interpreter.c +++ b/src/exchangedb/perf_taler_exchangedb_interpreter.c @@ -14,35 +14,35 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file mintdb/perf_taler_mintdb_interpreter.c - * @brief Interpreter library for mint database performance analysis + * @file exchangedb/perf_taler_exchangedb_interpreter.c + * @brief Interpreter library for exchange database performance analysis * @author Nicolas Fournier */ #include "platform.h" -#include "perf_taler_mintdb_interpreter.h" -#include "perf_taler_mintdb_init.h" +#include "perf_taler_exchangedb_interpreter.h" +#include "perf_taler_exchangedb_init.h" #include "gauger.h" /** * Represents the state of the interpreter */ -struct PERF_TALER_MINTDB_interpreter_state +struct PERF_TALER_EXCHANGEDB_interpreter_state { /** * State of the commands */ - struct PERF_TALER_MINTDB_Cmd *cmd; + struct PERF_TALER_EXCHANGEDB_Cmd *cmd; /** * Database plugin */ - struct TALER_MINTDB_Plugin *plugin; + struct TALER_EXCHANGEDB_Plugin *plugin; /** * Current database session */ - struct TALER_MINTDB_Session *session; + struct TALER_EXCHANGEDB_Session *session; /** * The current index of the interpreter @@ -55,60 +55,60 @@ struct PERF_TALER_MINTDB_interpreter_state * Free the memory of @a data */ static void -data_free (struct PERF_TALER_MINTDB_Data *data) +data_free (struct PERF_TALER_EXCHANGEDB_Data *data) { switch (data->type) { - case PERF_TALER_MINTDB_TIME: + case PERF_TALER_EXCHANGEDB_TIME: if (NULL == data->data.time) break; GNUNET_free (data->data.time); data->data.time = NULL; break; - case PERF_TALER_MINTDB_DEPOSIT: + case PERF_TALER_EXCHANGEDB_DEPOSIT: if (NULL == data->data.deposit) break; - PERF_TALER_MINTDB_deposit_free (data->data.deposit); + PERF_TALER_EXCHANGEDB_deposit_free (data->data.deposit); data->data.deposit = NULL; break; - case PERF_TALER_MINTDB_COIN: + case PERF_TALER_EXCHANGEDB_COIN: if (NULL == data->data.coin) break; - PERF_TALER_MINTDB_coin_free (data->data.coin); + PERF_TALER_EXCHANGEDB_coin_free (data->data.coin); data->data.coin = NULL; break; - case PERF_TALER_MINTDB_RESERVE: + case PERF_TALER_EXCHANGEDB_RESERVE: if (NULL == data->data.reserve) break; - PERF_TALER_MINTDB_reserve_free (data->data.reserve); + PERF_TALER_EXCHANGEDB_reserve_free (data->data.reserve); data->data.reserve = NULL; break; - case PERF_TALER_MINTDB_DENOMINATION_INFO: + case PERF_TALER_EXCHANGEDB_DENOMINATION_INFO: if (NULL == data->data.dki) break; - PERF_TALER_MINTDB_denomination_free (data->data.dki); + PERF_TALER_EXCHANGEDB_denomination_free (data->data.dki); data->data.dki = NULL; break; - case PERF_TALER_MINTDB_REFRESH_HASH: + case PERF_TALER_EXCHANGEDB_REFRESH_HASH: if (NULL == data->data.session_hash) break; GNUNET_free (data->data.session_hash); data->data.session_hash = NULL; break; - case PERF_TALER_MINTDB_REFRESH_MELT: + case PERF_TALER_EXCHANGEDB_REFRESH_MELT: if (NULL == data->data.refresh_melt) break; - PERF_TALER_MINTDB_refresh_melt_free (data->data.refresh_melt); + PERF_TALER_EXCHANGEDB_refresh_melt_free (data->data.refresh_melt); data->data.refresh_melt = NULL; break; - case PERF_TALER_MINTDB_NONE: + case PERF_TALER_EXCHANGEDB_NONE: break; } } @@ -121,49 +121,49 @@ data_free (struct PERF_TALER_MINTDB_Data *data) * @param[out] copy the copy made */ static void -data_copy (const struct PERF_TALER_MINTDB_Data *data, - struct PERF_TALER_MINTDB_Data *copy) +data_copy (const struct PERF_TALER_EXCHANGEDB_Data *data, + struct PERF_TALER_EXCHANGEDB_Data *copy) { copy->type = data->type; switch (data->type) { - case PERF_TALER_MINTDB_TIME: + case PERF_TALER_EXCHANGEDB_TIME: copy->data.time = GNUNET_new (struct GNUNET_TIME_Absolute); *copy->data.time = *data->data.time; return; - case PERF_TALER_MINTDB_DEPOSIT: + case PERF_TALER_EXCHANGEDB_DEPOSIT: copy->data.deposit - = PERF_TALER_MINTDB_deposit_copy (data->data.deposit); + = PERF_TALER_EXCHANGEDB_deposit_copy (data->data.deposit); return; - case PERF_TALER_MINTDB_COIN: + case PERF_TALER_EXCHANGEDB_COIN: copy->data.coin - = PERF_TALER_MINTDB_coin_copy (data->data.coin); + = PERF_TALER_EXCHANGEDB_coin_copy (data->data.coin); return; - case PERF_TALER_MINTDB_RESERVE: + case PERF_TALER_EXCHANGEDB_RESERVE: copy->data.reserve - = PERF_TALER_MINTDB_reserve_copy (data->data.reserve); + = PERF_TALER_EXCHANGEDB_reserve_copy (data->data.reserve); return; - case PERF_TALER_MINTDB_DENOMINATION_INFO: + case PERF_TALER_EXCHANGEDB_DENOMINATION_INFO: copy->data.dki - = PERF_TALER_MINTDB_denomination_copy (data->data.dki); + = PERF_TALER_EXCHANGEDB_denomination_copy (data->data.dki); return; - case PERF_TALER_MINTDB_REFRESH_HASH: + case PERF_TALER_EXCHANGEDB_REFRESH_HASH: copy-> data.session_hash = GNUNET_new (struct GNUNET_HashCode); *copy->data.session_hash = *data->data.session_hash; break; - case PERF_TALER_MINTDB_REFRESH_MELT: + case PERF_TALER_EXCHANGEDB_REFRESH_MELT: copy->data.refresh_melt - = PERF_TALER_MINTDB_refresh_melt_copy (data->data.refresh_melt); + = PERF_TALER_EXCHANGEDB_refresh_melt_copy (data->data.refresh_melt); break; - case PERF_TALER_MINTDB_NONE: + case PERF_TALER_EXCHANGEDB_NONE: break; } } @@ -176,12 +176,12 @@ data_copy (const struct PERF_TALER_MINTDB_Data *data, * #GNUNET_SYSERR if none found */ static int -cmd_find (const struct PERF_TALER_MINTDB_Cmd *cmd, +cmd_find (const struct PERF_TALER_EXCHANGEDB_Cmd *cmd, const char *search) { unsigned int i; - for (i=0; PERF_TALER_MINTDB_CMD_END != cmd[i].command; i++) + for (i=0; PERF_TALER_EXCHANGEDB_CMD_END != cmd[i].command; i++) if (0 == strcmp (cmd[i].label, search)) return i; return GNUNET_SYSERR; @@ -197,15 +197,15 @@ cmd_find (const struct PERF_TALER_MINTDB_Cmd *cmd, * #GNUNET_SYSERR if there was a probleb. See the log for details */ static int -cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) +cmd_init (struct PERF_TALER_EXCHANGEDB_Cmd cmd[]) { unsigned int i; - for (i=0; PERF_TALER_MINTDB_CMD_END != cmd[i].command; i++) + for (i=0; PERF_TALER_EXCHANGEDB_CMD_END != cmd[i].command; i++) { switch (cmd[i].command) { - case PERF_TALER_MINTDB_CMD_END_LOOP: + case PERF_TALER_EXCHANGEDB_CMD_END_LOOP: { int ret; @@ -219,7 +219,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.end_loop.label_loop); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_CMD_LOOP != cmd[ret].command) + if (PERF_TALER_EXCHANGEDB_CMD_LOOP != cmd[ret].command) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -231,7 +231,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_SAVE_ARRAY: + case PERF_TALER_EXCHANGEDB_CMD_SAVE_ARRAY: { int ret; @@ -245,7 +245,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.save_array.label_save); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_NONE == cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_NONE == cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -265,7 +265,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.save_array.label_loop); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_CMD_LOOP != cmd[ret].command) + if (PERF_TALER_EXCHANGEDB_CMD_LOOP != cmd[ret].command) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -278,13 +278,13 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) GNUNET_assert (NULL == cmd[i].details.save_array.data_saved); cmd[i].details.save_array.data_saved = GNUNET_new_array (cmd[i].details.save_array.nb_saved, - struct PERF_TALER_MINTDB_Data); + struct PERF_TALER_EXCHANGEDB_Data); cmd[i].details.save_array.type_saved = cmd[cmd[i].details.save_array.index_save].exposed.type; } break; - case PERF_TALER_MINTDB_CMD_LOAD_ARRAY: + case PERF_TALER_EXCHANGEDB_CMD_LOAD_ARRAY: { int ret; @@ -298,7 +298,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.load_array.label_save); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_CMD_SAVE_ARRAY != cmd[ret].command) + if (PERF_TALER_EXCHANGEDB_CMD_SAVE_ARRAY != cmd[ret].command) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -318,7 +318,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.load_array.label_loop); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_CMD_LOOP != cmd[ret].command) + if (PERF_TALER_EXCHANGEDB_CMD_LOOP != cmd[ret].command) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -338,7 +338,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_LOAD_RANDOM: + case PERF_TALER_EXCHANGEDB_CMD_LOAD_RANDOM: { int ret; @@ -352,7 +352,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.load_random.label_save); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_CMD_SAVE_ARRAY != cmd[ret].command) + if (PERF_TALER_EXCHANGEDB_CMD_SAVE_ARRAY != cmd[ret].command) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -364,7 +364,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_GAUGER: + case PERF_TALER_EXCHANGEDB_CMD_GAUGER: { int ret; @@ -378,7 +378,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.gauger.label_start); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_TIME != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_TIME != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -398,7 +398,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.gauger.label_stop); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_TIME != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_TIME != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -410,7 +410,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_INSERT_DENOMINATION: + case PERF_TALER_EXCHANGEDB_CMD_INSERT_DENOMINATION: { int ret; @@ -424,7 +424,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.insert_denomination.label_denom); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_DENOMINATION_INFO != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_DENOMINATION_INFO != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -436,7 +436,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_GET_DENOMINATION: + case PERF_TALER_EXCHANGEDB_CMD_GET_DENOMINATION: { int ret; @@ -450,7 +450,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.get_denomination.label_denom); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_DENOMINATION_INFO != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_DENOMINATION_INFO != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -462,7 +462,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_INSERT_RESERVE: + case PERF_TALER_EXCHANGEDB_CMD_INSERT_RESERVE: { int ret; @@ -476,7 +476,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.insert_reserve.label_reserve); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_RESERVE != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_RESERVE != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -488,7 +488,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_GET_RESERVE: + case PERF_TALER_EXCHANGEDB_CMD_GET_RESERVE: { int ret; @@ -502,7 +502,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.get_reserve.label_reserve); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_RESERVE != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_RESERVE != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -514,7 +514,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_GET_RESERVE_HISTORY: + case PERF_TALER_EXCHANGEDB_CMD_GET_RESERVE_HISTORY: { int ret; @@ -528,7 +528,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.get_reserve_history.label_reserve); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_RESERVE != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_RESERVE != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -540,7 +540,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_CREATE_WITHDRAW: + case PERF_TALER_EXCHANGEDB_CMD_CREATE_WITHDRAW: { int ret; @@ -555,7 +555,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.create_withdraw.label_dki); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_DENOMINATION_INFO != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_DENOMINATION_INFO != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -576,7 +576,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.create_withdraw.label_reserve); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_RESERVE != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_RESERVE != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -589,7 +589,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_INSERT_WITHDRAW: + case PERF_TALER_EXCHANGEDB_CMD_INSERT_WITHDRAW: { int ret; @@ -603,7 +603,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.insert_withdraw.label_coin); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_COIN != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_COIN != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -615,7 +615,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_GET_WITHDRAW: + case PERF_TALER_EXCHANGEDB_CMD_GET_WITHDRAW: { int ret; @@ -629,7 +629,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.get_withdraw.label_coin); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_COIN != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_COIN != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -641,7 +641,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_GET_COIN_TRANSACTION: + case PERF_TALER_EXCHANGEDB_CMD_GET_COIN_TRANSACTION: { int ret; ret = cmd_find (cmd, @@ -654,7 +654,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.get_coin_transaction.label_coin); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_COIN != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_COIN != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -666,7 +666,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_CREATE_DEPOSIT: + case PERF_TALER_EXCHANGEDB_CMD_CREATE_DEPOSIT: { int ret; @@ -680,7 +680,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.create_deposit.label_coin); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_COIN != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_COIN != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -692,7 +692,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_INSERT_DEPOSIT: + case PERF_TALER_EXCHANGEDB_CMD_INSERT_DEPOSIT: { int ret; @@ -706,7 +706,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.insert_deposit.label_deposit); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_DEPOSIT != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_DEPOSIT != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -718,7 +718,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_GET_DEPOSIT: + case PERF_TALER_EXCHANGEDB_CMD_GET_DEPOSIT: { int ret; @@ -732,7 +732,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.get_deposit.label_deposit); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_DEPOSIT != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_DEPOSIT != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -744,7 +744,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_GET_REFRESH_SESSION: + case PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_SESSION: { int ret; @@ -758,7 +758,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.get_refresh_session.label_hash); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_REFRESH_HASH != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -770,7 +770,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_INSERT_REFRESH_MELT: + case PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_MELT: { int ret; @@ -784,7 +784,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.insert_refresh_melt.label_hash); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_REFRESH_HASH != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -803,7 +803,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.insert_refresh_melt.label_coin); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_COIN != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_COIN != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -814,7 +814,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.insert_refresh_melt.index_coin = ret; } break; - case PERF_TALER_MINTDB_CMD_GET_REFRESH_MELT: + case PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_MELT: { int ret; ret = cmd_find (cmd, @@ -827,7 +827,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.get_refresh_melt.label_hash); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_REFRESH_HASH != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -839,7 +839,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_INSERT_REFRESH_ORDER: + case PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_ORDER: { int ret; ret = cmd_find (cmd, @@ -852,7 +852,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.insert_refresh_order.label_hash); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_REFRESH_HASH != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -872,7 +872,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.insert_refresh_order.label_denom); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_DENOMINATION_INFO != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_DENOMINATION_INFO != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -884,7 +884,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_GET_REFRESH_ORDER: + case PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_ORDER: { int ret; ret = cmd_find (cmd, @@ -897,7 +897,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.get_refresh_order.label_hash); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_REFRESH_HASH != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -909,7 +909,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_INSERT_REFRESH_COMMIT_COIN: + case PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_COMMIT_COIN: { int ret; ret = cmd_find (cmd, @@ -922,7 +922,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.insert_refresh_commit_coin.label_hash); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_REFRESH_HASH != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -934,7 +934,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_GET_REFRESH_COMMIT_COIN: + case PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_COMMIT_COIN: { int ret; ret = cmd_find (cmd, @@ -947,7 +947,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.get_refresh_commit_coin.label_hash); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_REFRESH_HASH != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -959,7 +959,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_INSERT_REFRESH_COMMIT_LINK: + case PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_COMMIT_LINK: { int ret; ret = cmd_find (cmd, @@ -972,7 +972,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.insert_refresh_commit_link.label_hash); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_REFRESH_HASH != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -984,7 +984,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_GET_REFRESH_COMMIT_LINK: + case PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_COMMIT_LINK: { int ret; ret = cmd_find (cmd, @@ -997,7 +997,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.get_refresh_commit_link.label_hash); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_REFRESH_HASH != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -1009,7 +1009,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_GET_MELT_COMMITMENT: + case PERF_TALER_EXCHANGEDB_CMD_GET_MELT_COMMITMENT: { int ret; ret = cmd_find (cmd, @@ -1022,7 +1022,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.get_melt_commitment.label_hash); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_REFRESH_HASH != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -1034,7 +1034,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_INSERT_REFRESH_OUT: + case PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_OUT: { int ret; ret = cmd_find (cmd, @@ -1047,7 +1047,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.insert_refresh_out.label_hash); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_REFRESH_HASH != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -1059,7 +1059,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_GET_LINK_DATA_LIST: + case PERF_TALER_EXCHANGEDB_CMD_GET_LINK_DATA_LIST: { int ret; ret = cmd_find (cmd, @@ -1072,7 +1072,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.get_link_data_list.label_hash); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_REFRESH_HASH != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -1084,7 +1084,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_GET_TRANSFER: + case PERF_TALER_EXCHANGEDB_CMD_GET_TRANSFER: { int ret; ret = cmd_find (cmd, @@ -1097,7 +1097,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) cmd[i].details.get_transfer.label_hash); return GNUNET_SYSERR; } - if (PERF_TALER_MINTDB_REFRESH_HASH != cmd[ret].exposed.type) + if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", @@ -1109,17 +1109,17 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_END: - case PERF_TALER_MINTDB_CMD_DEBUG: - case PERF_TALER_MINTDB_CMD_LOOP: - case PERF_TALER_MINTDB_CMD_NEW_SESSION: - case PERF_TALER_MINTDB_CMD_START_TRANSACTION: - case PERF_TALER_MINTDB_CMD_COMMIT_TRANSACTION: - case PERF_TALER_MINTDB_CMD_ABORT_TRANSACTION: - case PERF_TALER_MINTDB_CMD_GET_TIME: - case PERF_TALER_MINTDB_CMD_CREATE_DENOMINATION: - case PERF_TALER_MINTDB_CMD_CREATE_RESERVE: - case PERF_TALER_MINTDB_CMD_CREATE_REFRESH_SESSION: + case PERF_TALER_EXCHANGEDB_CMD_END: + case PERF_TALER_EXCHANGEDB_CMD_DEBUG: + case PERF_TALER_EXCHANGEDB_CMD_LOOP: + case PERF_TALER_EXCHANGEDB_CMD_NEW_SESSION: + case PERF_TALER_EXCHANGEDB_CMD_START_TRANSACTION: + case PERF_TALER_EXCHANGEDB_CMD_COMMIT_TRANSACTION: + case PERF_TALER_EXCHANGEDB_CMD_ABORT_TRANSACTION: + case PERF_TALER_EXCHANGEDB_CMD_GET_TIME: + case PERF_TALER_EXCHANGEDB_CMD_CREATE_DENOMINATION: + case PERF_TALER_EXCHANGEDB_CMD_CREATE_RESERVE: + case PERF_TALER_EXCHANGEDB_CMD_CREATE_REFRESH_SESSION: break; } } @@ -1131,15 +1131,15 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[]) * Free the memory of the command chain */ static int -cmd_clean (struct PERF_TALER_MINTDB_Cmd cmd[]) +cmd_clean (struct PERF_TALER_EXCHANGEDB_Cmd cmd[]) { unsigned int i; - for (i=0; PERF_TALER_MINTDB_CMD_END != cmd[i].command; i++) + for (i=0; PERF_TALER_EXCHANGEDB_CMD_END != cmd[i].command; i++) { switch (cmd[i].command) { - case PERF_TALER_MINTDB_CMD_SAVE_ARRAY: + case PERF_TALER_EXCHANGEDB_CMD_SAVE_ARRAY: { unsigned int j; @@ -1152,7 +1152,7 @@ cmd_clean (struct PERF_TALER_MINTDB_Cmd cmd[]) } break; - case PERF_TALER_MINTDB_CMD_LOAD_ARRAY: + case PERF_TALER_EXCHANGEDB_CMD_LOAD_ARRAY: GNUNET_free (cmd[i].details.load_array.permutation); cmd[i].details.load_array.permutation = NULL; break; @@ -1167,11 +1167,11 @@ cmd_clean (struct PERF_TALER_MINTDB_Cmd cmd[]) /** - * Handles the command #PERF_TALER_MINTDB_CMD_END_LOOP for the interpreter + * Handles the command #PERF_TALER_EXCHANGEDB_CMD_END_LOOP for the interpreter * Cleans the memory at the end of the loop */ static void -interpret_end_loop (struct PERF_TALER_MINTDB_interpreter_state *state) +interpret_end_loop (struct PERF_TALER_EXCHANGEDB_interpreter_state *state) { unsigned int i; int jump; @@ -1199,16 +1199,16 @@ interpret_end_loop (struct PERF_TALER_MINTDB_interpreter_state *state) /** * Part of the interpreter specific to - * #PERF_TALER_MINTDB_CMD_SAVE_ARRAY + * #PERF_TALER_EXCHANGEDB_CMD_SAVE_ARRAY * Saves the data exposed by another command into * an array in the command specific struct. */ static void -interpret_save_array (struct PERF_TALER_MINTDB_interpreter_state *state) +interpret_save_array (struct PERF_TALER_EXCHANGEDB_interpreter_state *state) { - struct PERF_TALER_MINTDB_Cmd *cmd = &state->cmd[state->i]; - struct PERF_TALER_MINTDB_Cmd *save_ref; - struct PERF_TALER_MINTDB_Cmd *loop_ref; + struct PERF_TALER_EXCHANGEDB_Cmd *cmd = &state->cmd[state->i]; + struct PERF_TALER_EXCHANGEDB_Cmd *save_ref; + struct PERF_TALER_EXCHANGEDB_Cmd *loop_ref; int loop_index; int save_index; unsigned int selection_chance; @@ -1242,8 +1242,8 @@ interpret_save_array (struct PERF_TALER_MINTDB_interpreter_state *state) (0 == GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, selection_chance)) ) ) { - struct PERF_TALER_MINTDB_Data *save_location; - struct PERF_TALER_MINTDB_Data *item_saved; + struct PERF_TALER_EXCHANGEDB_Data *save_location; + struct PERF_TALER_EXCHANGEDB_Data *item_saved; save_location = &cmd->details.save_array.data_saved[cmd->details.save_array.index]; item_saved = &save_ref->exposed; @@ -1255,17 +1255,17 @@ interpret_save_array (struct PERF_TALER_MINTDB_interpreter_state *state) /** * Part of the interpreter specific to - * #PERF_TALER_MINTDB_CMD_LOAD_ARRAY - * Gets data from a #PERF_TALER_MINTDB_CMD_SAVE_ARRAY and exposes a copy + * #PERF_TALER_EXCHANGEDB_CMD_LOAD_ARRAY + * Gets data from a #PERF_TALER_EXCHANGEDB_CMD_SAVE_ARRAY and exposes a copy */ static void -interpret_load_array (struct PERF_TALER_MINTDB_interpreter_state *state) +interpret_load_array (struct PERF_TALER_EXCHANGEDB_interpreter_state *state) { - struct PERF_TALER_MINTDB_Cmd *cmd = &state->cmd[state->i]; + struct PERF_TALER_EXCHANGEDB_Cmd *cmd = &state->cmd[state->i]; unsigned int loop_iter; int loop_index; int save_index; - struct PERF_TALER_MINTDB_Data *loaded_data; + struct PERF_TALER_EXCHANGEDB_Data *loaded_data; loop_index = cmd->details.load_array.index_loop; save_index = cmd->details.load_array.index_save; @@ -1292,13 +1292,13 @@ interpret_load_array (struct PERF_TALER_MINTDB_interpreter_state *state) /** * Part of the interpreter specific to - * #PERF_TALER_MINTDB_CMD_LOAD_RANDOM - * Get a random element from a #PERF_TALER_MINTDB_CMD_SAVE_ARRAY and exposes it + * #PERF_TALER_EXCHANGEDB_CMD_LOAD_RANDOM + * Get a random element from a #PERF_TALER_EXCHANGEDB_CMD_SAVE_ARRAY and exposes it */ static void -interprete_load_random (struct PERF_TALER_MINTDB_interpreter_state *state) +interprete_load_random (struct PERF_TALER_EXCHANGEDB_interpreter_state *state) { - struct PERF_TALER_MINTDB_Cmd *cmd = &state->cmd[state->i]; + struct PERF_TALER_EXCHANGEDB_Cmd *cmd = &state->cmd[state->i]; unsigned int index; int save_index; @@ -1316,36 +1316,36 @@ interprete_load_random (struct PERF_TALER_MINTDB_interpreter_state *state) * @param state the current state of the interpreter */ static int -interpret (struct PERF_TALER_MINTDB_interpreter_state *state) +interpret (struct PERF_TALER_EXCHANGEDB_interpreter_state *state) { - for (state->i=0; PERF_TALER_MINTDB_CMD_END != state->cmd[state->i].command; state->i++) + for (state->i=0; PERF_TALER_EXCHANGEDB_CMD_END != state->cmd[state->i].command; state->i++) { switch (state->cmd[state->i].command) { - case PERF_TALER_MINTDB_CMD_END: + case PERF_TALER_EXCHANGEDB_CMD_END: return GNUNET_YES; - case PERF_TALER_MINTDB_CMD_DEBUG: + case PERF_TALER_EXCHANGEDB_CMD_DEBUG: GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%s\n", state->cmd[state->i].label); break; - case PERF_TALER_MINTDB_CMD_LOOP: + case PERF_TALER_EXCHANGEDB_CMD_LOOP: break; - case PERF_TALER_MINTDB_CMD_END_LOOP: + case PERF_TALER_EXCHANGEDB_CMD_END_LOOP: interpret_end_loop (state); break; - case PERF_TALER_MINTDB_CMD_GET_TIME: + case PERF_TALER_EXCHANGEDB_CMD_GET_TIME: state->cmd[state->i].exposed.data.time = GNUNET_new (struct GNUNET_TIME_Absolute); *state->cmd[state->i].exposed.data.time = GNUNET_TIME_absolute_get (); break; - case PERF_TALER_MINTDB_CMD_GAUGER: + case PERF_TALER_EXCHANGEDB_CMD_GAUGER: { unsigned int start_index; unsigned int stop_index; @@ -1368,52 +1368,52 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; - case PERF_TALER_MINTDB_CMD_NEW_SESSION: + case PERF_TALER_EXCHANGEDB_CMD_NEW_SESSION: state->session = state->plugin->get_session (state->plugin->cls, GNUNET_YES); break; - case PERF_TALER_MINTDB_CMD_START_TRANSACTION: + case PERF_TALER_EXCHANGEDB_CMD_START_TRANSACTION: state->plugin->start (state->plugin->cls, state->session); break; - case PERF_TALER_MINTDB_CMD_COMMIT_TRANSACTION: + case PERF_TALER_EXCHANGEDB_CMD_COMMIT_TRANSACTION: state->plugin->commit (state->plugin->cls, state->session); break; - case PERF_TALER_MINTDB_CMD_ABORT_TRANSACTION: + case PERF_TALER_EXCHANGEDB_CMD_ABORT_TRANSACTION: state->plugin->rollback (state->plugin->cls, state->session); break; - case PERF_TALER_MINTDB_CMD_SAVE_ARRAY: + case PERF_TALER_EXCHANGEDB_CMD_SAVE_ARRAY: interpret_save_array (state); break; - case PERF_TALER_MINTDB_CMD_LOAD_ARRAY: + case PERF_TALER_EXCHANGEDB_CMD_LOAD_ARRAY: interpret_load_array (state); break; - case PERF_TALER_MINTDB_CMD_LOAD_RANDOM: + case PERF_TALER_EXCHANGEDB_CMD_LOAD_RANDOM: interprete_load_random (state); break; - case PERF_TALER_MINTDB_CMD_CREATE_DEPOSIT: + case PERF_TALER_EXCHANGEDB_CMD_CREATE_DEPOSIT: { int coin_index; - struct TALER_MINTDB_Deposit *deposit; + struct TALER_EXCHANGEDB_Deposit *deposit; coin_index = state->cmd[state->i].details.create_deposit.index_coin; - deposit = PERF_TALER_MINTDB_deposit_init (state->cmd[coin_index].exposed.data.coin); + deposit = PERF_TALER_EXCHANGEDB_deposit_init (state->cmd[coin_index].exposed.data.coin); GNUNET_assert (NULL != deposit); state->cmd[state->i].exposed.data.deposit = deposit; } break; - case PERF_TALER_MINTDB_CMD_INSERT_DEPOSIT: + case PERF_TALER_EXCHANGEDB_CMD_INSERT_DEPOSIT: { int deposit_index; int ret; - struct TALER_MINTDB_Deposit *deposit; + struct TALER_EXCHANGEDB_Deposit *deposit; deposit_index = state->cmd[state->i].details.insert_deposit.index_deposit; deposit = state->cmd[deposit_index].exposed.data.deposit; @@ -1425,11 +1425,11 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; - case PERF_TALER_MINTDB_CMD_GET_DEPOSIT: + case PERF_TALER_EXCHANGEDB_CMD_GET_DEPOSIT: { unsigned int source_index; int ret; - struct PERF_TALER_MINTDB_Data *data; + struct PERF_TALER_EXCHANGEDB_Data *data; source_index = state->cmd[state->i].details.get_deposit.index_deposit; data = &state->cmd[source_index].exposed; @@ -1440,20 +1440,20 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; - case PERF_TALER_MINTDB_CMD_CREATE_RESERVE: + case PERF_TALER_EXCHANGEDB_CMD_CREATE_RESERVE: { - struct PERF_TALER_MINTDB_Reserve *reserve; + struct PERF_TALER_EXCHANGEDB_Reserve *reserve; - reserve = PERF_TALER_MINTDB_reserve_init (); + reserve = PERF_TALER_EXCHANGEDB_reserve_init (); state->cmd[state->i].exposed.data.reserve = reserve; } break; - case PERF_TALER_MINTDB_CMD_INSERT_RESERVE: + case PERF_TALER_EXCHANGEDB_CMD_INSERT_RESERVE: { unsigned int reserve_index; int ret; - struct PERF_TALER_MINTDB_Reserve *reserve; + struct PERF_TALER_EXCHANGEDB_Reserve *reserve; json_t *details = NULL; reserve_index = state->cmd[state->i].details.insert_reserve.index_reserve; @@ -1474,11 +1474,11 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; - case PERF_TALER_MINTDB_CMD_GET_RESERVE: + case PERF_TALER_EXCHANGEDB_CMD_GET_RESERVE: { unsigned int reserve_index; int ret; - struct PERF_TALER_MINTDB_Data *data; + struct PERF_TALER_EXCHANGEDB_Data *data; reserve_index = state->cmd[state->i].details.get_reserve.index_reserve; @@ -1490,11 +1490,11 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; - case PERF_TALER_MINTDB_CMD_GET_RESERVE_HISTORY: + case PERF_TALER_EXCHANGEDB_CMD_GET_RESERVE_HISTORY: { unsigned int reserve_index; - struct TALER_MINTDB_ReserveHistory *history; - struct PERF_TALER_MINTDB_Data *data; + struct TALER_EXCHANGEDB_ReserveHistory *history; + struct PERF_TALER_EXCHANGEDB_Data *data; reserve_index = state->cmd[state->i].details.get_reserve_history.index_reserve; data = &state->cmd[reserve_index].exposed; @@ -1507,20 +1507,20 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; - case PERF_TALER_MINTDB_CMD_CREATE_DENOMINATION: + case PERF_TALER_EXCHANGEDB_CMD_CREATE_DENOMINATION: { - struct TALER_MINTDB_DenominationKeyIssueInformation *dki = - PERF_TALER_MINTDB_denomination_init (); + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki = + PERF_TALER_EXCHANGEDB_denomination_init (); GNUNET_assert (NULL != dki); state->cmd[state->i].exposed.data.dki = dki; } break; - case PERF_TALER_MINTDB_CMD_INSERT_DENOMINATION: + case PERF_TALER_EXCHANGEDB_CMD_INSERT_DENOMINATION: { unsigned int denom_index; int ret; - struct TALER_MINTDB_DenominationKeyIssueInformation *dki ; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki ; denom_index = state->cmd[state->i].details.insert_denomination.index_denom; dki = state->cmd[denom_index].exposed.data.dki; @@ -1532,11 +1532,11 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; - case PERF_TALER_MINTDB_CMD_GET_DENOMINATION: + case PERF_TALER_EXCHANGEDB_CMD_GET_DENOMINATION: { unsigned int denom_index; int ret; - struct PERF_TALER_MINTDB_Data *data; + struct PERF_TALER_EXCHANGEDB_Data *data; denom_index = state->cmd[state->i].details.get_denomination.index_denom; data = &state->cmd[denom_index].exposed; @@ -1548,26 +1548,26 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; - case PERF_TALER_MINTDB_CMD_CREATE_WITHDRAW: + case PERF_TALER_EXCHANGEDB_CMD_CREATE_WITHDRAW: { unsigned int dki_index; unsigned int reserve_index; - struct PERF_TALER_MINTDB_Coin *coin ; + struct PERF_TALER_EXCHANGEDB_Coin *coin ; dki_index = state->cmd[state->i].details.create_withdraw.index_dki; reserve_index = state->cmd[state->i].details.create_withdraw.index_reserve; - coin = PERF_TALER_MINTDB_coin_init (state->cmd[dki_index].exposed.data.dki, + coin = PERF_TALER_EXCHANGEDB_coin_init (state->cmd[dki_index].exposed.data.dki, state->cmd[reserve_index].exposed.data.reserve); GNUNET_assert (NULL != coin); state->cmd[state->i].exposed.data.coin = coin; } break; - case PERF_TALER_MINTDB_CMD_INSERT_WITHDRAW: + case PERF_TALER_EXCHANGEDB_CMD_INSERT_WITHDRAW: { unsigned int coin_index; int ret; - struct PERF_TALER_MINTDB_Coin *coin ; + struct PERF_TALER_EXCHANGEDB_Coin *coin ; coin_index = state->cmd[state->i].details.insert_withdraw.index_coin; coin = state->cmd[coin_index].exposed.data.coin; @@ -1578,11 +1578,11 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; - case PERF_TALER_MINTDB_CMD_GET_WITHDRAW: + case PERF_TALER_EXCHANGEDB_CMD_GET_WITHDRAW: { unsigned int source_index; int ret; - struct PERF_TALER_MINTDB_Data *data; + struct PERF_TALER_EXCHANGEDB_Data *data; source_index = state->cmd[state->i].details.get_denomination.index_denom; data = &state->cmd[source_index].exposed; @@ -1594,11 +1594,11 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; - case PERF_TALER_MINTDB_CMD_GET_COIN_TRANSACTION: + case PERF_TALER_EXCHANGEDB_CMD_GET_COIN_TRANSACTION: { unsigned int coin_index; - struct PERF_TALER_MINTDB_Coin *coin; - struct TALER_MINTDB_TransactionList *transactions; + struct PERF_TALER_EXCHANGEDB_Coin *coin; + struct TALER_EXCHANGEDB_TransactionList *transactions; coin_index = state->cmd[state->i].details.get_coin_transaction.index_coin; coin = state->cmd[coin_index].exposed.data.coin; @@ -1611,13 +1611,13 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; - case PERF_TALER_MINTDB_CMD_CREATE_REFRESH_SESSION: + case PERF_TALER_EXCHANGEDB_CMD_CREATE_REFRESH_SESSION: { struct GNUNET_HashCode *hash; - struct TALER_MINTDB_RefreshSession *refresh_session; + struct TALER_EXCHANGEDB_RefreshSession *refresh_session; hash = GNUNET_new (struct GNUNET_HashCode); - refresh_session = PERF_TALER_MINTDB_refresh_session_init (); + refresh_session = PERF_TALER_EXCHANGEDB_refresh_session_init (); GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, hash); state->plugin->create_refresh_session (state->session, @@ -1625,16 +1625,16 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) hash, refresh_session); state->cmd[state->i].exposed.data.session_hash = hash; - PERF_TALER_MINTDB_refresh_session_free (refresh_session); + PERF_TALER_EXCHANGEDB_refresh_session_free (refresh_session); GNUNET_free (refresh_session); } break; - case PERF_TALER_MINTDB_CMD_GET_REFRESH_SESSION: + case PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_SESSION: { unsigned int hash_index; struct GNUNET_HashCode *hash; - struct TALER_MINTDB_RefreshSession refresh; + struct TALER_EXCHANGEDB_RefreshSession refresh; hash_index = state->cmd[state->i].details.get_refresh_session.index_hash; hash = state->cmd[hash_index].exposed.data.session_hash; @@ -1645,19 +1645,19 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; - case PERF_TALER_MINTDB_CMD_INSERT_REFRESH_MELT: + case PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_MELT: { unsigned int hash_index; unsigned int coin_index; struct GNUNET_HashCode *hash; - struct TALER_MINTDB_RefreshMelt *melt; - struct PERF_TALER_MINTDB_Coin *coin; + struct TALER_EXCHANGEDB_RefreshMelt *melt; + struct PERF_TALER_EXCHANGEDB_Coin *coin; hash_index = state->cmd[state->i].details.insert_refresh_melt.index_hash; coin_index = state->cmd[state->i].details.insert_refresh_melt.index_coin; hash = state->cmd[hash_index].exposed.data.session_hash; coin = state->cmd[coin_index].exposed.data.coin; - melt = PERF_TALER_MINTDB_refresh_melt_init (hash, + melt = PERF_TALER_EXCHANGEDB_refresh_melt_init (hash, coin); state->plugin->insert_refresh_melt (state->plugin->cls, state->session, @@ -1666,12 +1666,12 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; - case PERF_TALER_MINTDB_CMD_GET_REFRESH_MELT: + case PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_MELT: { int ret; unsigned int hash_index; struct GNUNET_HashCode *hash; - struct TALER_MINTDB_RefreshMelt melt; + struct TALER_EXCHANGEDB_RefreshMelt melt; hash_index = cmd_find (state->cmd, state->cmd[state->i].details.get_refresh_melt.label_hash); @@ -1685,12 +1685,12 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; - case PERF_TALER_MINTDB_CMD_INSERT_REFRESH_ORDER: + case PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_ORDER: { unsigned int hash_index; unsigned int denom_index; struct GNUNET_HashCode *session_hash; - struct TALER_MINTDB_DenominationKeyIssueInformation *denom; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *denom; hash_index = state->cmd[state->i].details.insert_refresh_order.index_hash; denom_index = state->cmd[state->i].details.insert_refresh_order.index_denom; @@ -1705,7 +1705,7 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; - case PERF_TALER_MINTDB_CMD_GET_REFRESH_ORDER: + case PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_ORDER: { int hash_index; struct GNUNET_HashCode *hash; @@ -1721,14 +1721,14 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; - case PERF_TALER_MINTDB_CMD_INSERT_REFRESH_COMMIT_COIN: + case PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_COMMIT_COIN: { int ret; unsigned int hash_index; - struct TALER_MINTDB_RefreshCommitCoin *refresh_commit; + struct TALER_EXCHANGEDB_RefreshCommitCoin *refresh_commit; hash_index = state->cmd[state->i].details.insert_refresh_commit_coin.index_hash; - refresh_commit = PERF_TALER_MINTDB_refresh_commit_coin_init (); + refresh_commit = PERF_TALER_EXCHANGEDB_refresh_commit_coin_init (); ret = state->plugin->insert_refresh_commit_coins (state->plugin->cls, state->session, state->cmd[hash_index].exposed.data.session_hash, @@ -1739,10 +1739,10 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; - case PERF_TALER_MINTDB_CMD_GET_REFRESH_COMMIT_COIN: + case PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_COMMIT_COIN: { unsigned int hash_index; - struct TALER_MINTDB_RefreshCommitCoin refresh_commit; + struct TALER_EXCHANGEDB_RefreshCommitCoin refresh_commit; hash_index = state->cmd[state->i].details.insert_refresh_commit_coin.index_hash; state->plugin->get_refresh_commit_coins (state->plugin->cls, @@ -1755,7 +1755,7 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; - case PERF_TALER_MINTDB_CMD_INSERT_REFRESH_COMMIT_LINK: + case PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_COMMIT_LINK: { // unsigned int hash_index; // @@ -1763,11 +1763,11 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; - case PERF_TALER_MINTDB_CMD_GET_REFRESH_COMMIT_LINK: + case PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_COMMIT_LINK: { int ret; unsigned int hash_index; - struct TALER_MINTDB_RefreshCommitCoin commit_coin; + struct TALER_EXCHANGEDB_RefreshCommitCoin commit_coin; hash_index = state->cmd[state->i].details.get_refresh_commit_link.index_hash; ret = state->plugin->get_refresh_commit_coins(state->plugin->cls, @@ -1780,16 +1780,16 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; - case PERF_TALER_MINTDB_CMD_GET_MELT_COMMITMENT: + case PERF_TALER_EXCHANGEDB_CMD_GET_MELT_COMMITMENT: break; - case PERF_TALER_MINTDB_CMD_INSERT_REFRESH_OUT: + case PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_OUT: break; - case PERF_TALER_MINTDB_CMD_GET_LINK_DATA_LIST: + case PERF_TALER_EXCHANGEDB_CMD_GET_LINK_DATA_LIST: break; - case PERF_TALER_MINTDB_CMD_GET_TRANSFER: + case PERF_TALER_EXCHANGEDB_CMD_GET_TRANSFER: break; } @@ -1806,11 +1806,11 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) * @param cmd the commands to run */ int -PERF_TALER_MINTDB_interpret (struct TALER_MINTDB_Plugin *db_plugin, - struct PERF_TALER_MINTDB_Cmd cmd[]) +PERF_TALER_EXCHANGEDB_interpret (struct TALER_EXCHANGEDB_Plugin *db_plugin, + struct PERF_TALER_EXCHANGEDB_Cmd cmd[]) { int ret; - struct PERF_TALER_MINTDB_interpreter_state state = + struct PERF_TALER_EXCHANGEDB_interpreter_state state = {.i = 0, .cmd = cmd, .plugin = db_plugin}; ret = cmd_init (cmd); @@ -1836,91 +1836,91 @@ PERF_TALER_MINTDB_interpret (struct TALER_MINTDB_Plugin *db_plugin, * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure */ int -PERF_TALER_MINTDB_run_benchmark (const char *benchmark_name, +PERF_TALER_EXCHANGEDB_run_benchmark (const char *benchmark_name, const char *configuration_file, - struct PERF_TALER_MINTDB_Cmd *init, - struct PERF_TALER_MINTDB_Cmd *benchmark) + struct PERF_TALER_EXCHANGEDB_Cmd *init, + struct PERF_TALER_EXCHANGEDB_Cmd *benchmark) { - struct TALER_MINTDB_Plugin *plugin; + struct TALER_EXCHANGEDB_Plugin *plugin; struct GNUNET_CONFIGURATION_Handle *config; int ret = 0; - struct PERF_TALER_MINTDB_Cmd init_def[] = + struct PERF_TALER_EXCHANGEDB_Cmd init_def[] = { // Denomination used to create coins - PERF_TALER_MINTDB_INIT_CMD_DEBUG ("00 - Start of interpreter"), + PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG ("00 - Start of interpreter"), - PERF_TALER_MINTDB_INIT_CMD_LOOP ("01 - denomination loop", - PERF_TALER_MINTDB_NB_DENOMINATION_INIT), - PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""), - PERF_TALER_MINTDB_INIT_CMD_CREATE_DENOMINATION ("01 - denomination"), - PERF_TALER_MINTDB_INIT_CMD_INSERT_DENOMINATION ("01 - insert", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("01 - denomination loop", + PERF_TALER_EXCHANGEDB_NB_DENOMINATION_INIT), + PERF_TALER_EXCHANGEDB_INIT_CMD_START_TRANSACTION (""), + PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_DENOMINATION ("01 - denomination"), + PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_DENOMINATION ("01 - insert", "01 - denomination"), - PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""), - PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("01 - save denomination", + PERF_TALER_EXCHANGEDB_INIT_CMD_COMMIT_TRANSACTION (""), + PERF_TALER_EXCHANGEDB_INIT_CMD_SAVE_ARRAY ("01 - save denomination", "01 - denomination loop", "01 - denomination", - PERF_TALER_MINTDB_NB_DENOMINATION_SAVE), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", + PERF_TALER_EXCHANGEDB_NB_DENOMINATION_SAVE), + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("", "01 - denomination loop"), - PERF_TALER_MINTDB_INIT_CMD_DEBUG ("01 - init denomination complete"), + PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG ("01 - init denomination complete"), // End of initialization // Reserve initialization - PERF_TALER_MINTDB_INIT_CMD_LOOP ("02 - init reserve loop", - PERF_TALER_MINTDB_NB_RESERVE_INIT), - PERF_TALER_MINTDB_INIT_CMD_CREATE_RESERVE ("02 - reserve"), - PERF_TALER_MINTDB_INIT_CMD_INSERT_RESERVE ("02 - insert", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("02 - init reserve loop", + PERF_TALER_EXCHANGEDB_NB_RESERVE_INIT), + PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_RESERVE ("02 - reserve"), + PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_RESERVE ("02 - insert", "02 - reserve"), - PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("02 - save reserve", + PERF_TALER_EXCHANGEDB_INIT_CMD_SAVE_ARRAY ("02 - save reserve", "02 - init reserve loop", "02 - reserve", - PERF_TALER_MINTDB_NB_RESERVE_SAVE), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", + PERF_TALER_EXCHANGEDB_NB_RESERVE_SAVE), + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("", "02 - init reserve loop"), - PERF_TALER_MINTDB_INIT_CMD_DEBUG ("02 - reserve init complete"), + PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG ("02 - reserve init complete"), // End reserve init // Withdrawal initialization - PERF_TALER_MINTDB_INIT_CMD_LOOP ("03 - init withdraw loop", - PERF_TALER_MINTDB_NB_WITHDRAW_INIT), - PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("03 - denomination load", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("03 - init withdraw loop", + PERF_TALER_EXCHANGEDB_NB_WITHDRAW_INIT), + PERF_TALER_EXCHANGEDB_INIT_CMD_START_TRANSACTION (""), + PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY ("03 - denomination load", "03 - init withdraw loop", "01 - save denomination"), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("03 - reserve load", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY ("03 - reserve load", "03 - init withdraw loop", "02 - save reserve"), - PERF_TALER_MINTDB_INIT_CMD_CREATE_WITHDRAW ("03 - withdraw", + PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_WITHDRAW ("03 - withdraw", "03 - denomination load", "03 - reserve load"), - PERF_TALER_MINTDB_INIT_CMD_INSERT_WITHDRAW ("03 - insert", + PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_WITHDRAW ("03 - insert", "03 - withdraw"), - PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""), - PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("03 - save coin", + PERF_TALER_EXCHANGEDB_INIT_CMD_COMMIT_TRANSACTION (""), + PERF_TALER_EXCHANGEDB_INIT_CMD_SAVE_ARRAY ("03 - save coin", "03 - init withdraw loop", "03 - withdraw", - PERF_TALER_MINTDB_NB_WITHDRAW_SAVE), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", + PERF_TALER_EXCHANGEDB_NB_WITHDRAW_SAVE), + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("", "03 - init withdraw loop"), - PERF_TALER_MINTDB_INIT_CMD_DEBUG ("03 - withdraw init complete"), + PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG ("03 - withdraw init complete"), //End of withdrawal initialization //Deposit initialization - PERF_TALER_MINTDB_INIT_CMD_LOOP ("04 - deposit init loop", - PERF_TALER_MINTDB_NB_DEPOSIT_INIT), - PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION ("04 - start transaction"), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("04 - denomination load", + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("04 - deposit init loop", + PERF_TALER_EXCHANGEDB_NB_DEPOSIT_INIT), + PERF_TALER_EXCHANGEDB_INIT_CMD_START_TRANSACTION ("04 - start transaction"), + PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY ("04 - denomination load", "04 - deposit init loop", "03 - save coin"), - PERF_TALER_MINTDB_INIT_CMD_INSERT_DEPOSIT ("04 - deposit", + PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_DEPOSIT ("04 - deposit", "04 - denomination load"), - PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION ("04 - commit transaction"), - PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("04 - deposit array", + PERF_TALER_EXCHANGEDB_INIT_CMD_COMMIT_TRANSACTION ("04 - commit transaction"), + PERF_TALER_EXCHANGEDB_INIT_CMD_SAVE_ARRAY ("04 - deposit array", "04 - deposit init loop", "04 - deposit", - PERF_TALER_MINTDB_NB_DEPOSIT_SAVE), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("04 - deposit init loop end", + PERF_TALER_EXCHANGEDB_NB_DEPOSIT_SAVE), + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("04 - deposit init loop end", "04 - deposit init loop"), - PERF_TALER_MINTDB_INIT_CMD_DEBUG ("04 - deposit init complete"), + PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG ("04 - deposit init complete"), // End of deposit initialization - PERF_TALER_MINTDB_INIT_CMD_END ("end") + PERF_TALER_EXCHANGEDB_INIT_CMD_END ("end") }; GNUNET_log_setup (benchmark_name, @@ -1936,7 +1936,7 @@ PERF_TALER_MINTDB_run_benchmark (const char *benchmark_name, "Error parsing configuration file\n"); return GNUNET_SYSERR; } - plugin = TALER_MINTDB_plugin_load (config); + plugin = TALER_EXCHANGEDB_plugin_load (config); if (NULL == plugin) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, @@ -1958,7 +1958,7 @@ PERF_TALER_MINTDB_run_benchmark (const char *benchmark_name, { init = init_def; } - ret = PERF_TALER_MINTDB_interpret (plugin, + ret = PERF_TALER_EXCHANGEDB_interpret (plugin, init); if (GNUNET_OK != ret) { @@ -1969,7 +1969,7 @@ PERF_TALER_MINTDB_run_benchmark (const char *benchmark_name, /* * Running the benchmark */ - ret = PERF_TALER_MINTDB_interpret (plugin, + ret = PERF_TALER_EXCHANGEDB_interpret (plugin, benchmark); if (GNUNET_OK != ret) { @@ -1979,7 +1979,7 @@ PERF_TALER_MINTDB_run_benchmark (const char *benchmark_name, } /* Drop tables */ { - struct TALER_MINTDB_Session *session; + struct TALER_EXCHANGEDB_Session *session; session = plugin->get_session (plugin->cls, GNUNET_YES); @@ -1992,7 +1992,7 @@ PERF_TALER_MINTDB_run_benchmark (const char *benchmark_name, return ret; } } - TALER_MINTDB_plugin_unload (plugin); + TALER_EXCHANGEDB_plugin_unload (plugin); GNUNET_CONFIGURATION_destroy (config); return ret; } diff --git a/src/mintdb/perf_taler_mintdb_interpreter.h b/src/exchangedb/perf_taler_exchangedb_interpreter.h similarity index 56% rename from src/mintdb/perf_taler_mintdb_interpreter.h rename to src/exchangedb/perf_taler_exchangedb_interpreter.h index 3510e3dd4..a83251c60 100644 --- a/src/mintdb/perf_taler_mintdb_interpreter.h +++ b/src/exchangedb/perf_taler_exchangedb_interpreter.h @@ -14,37 +14,37 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file mintdb/perf_taler_mintdb_interpreter.h + * @file exchangedb/perf_taler_exchangedb_interpreter.h * @brief Library for performance analysis of the Taler database * @author Nicolas Fournier * * This library contains functions and macro alowing Taler performance analysis * to be written with ease. - * To do so, create a #PERF_TALER_MINTDB_Cmd array and fill it with the commands + * To do so, create a #PERF_TALER_EXCHANGEDB_Cmd array and fill it with the commands * to execute in chronological order. Some command have an exposed variable wich * can be reused in other commands. * Macros are available to make the use much easier so feel free to use them * to initialize your own command array. */ -#ifndef __PERF_TALER_MINTDB_INTERPRETER_H__ -#define __PERF_TALER_MINTDB_INTERPRETER_H__ +#ifndef __PERF_TALER_EXCHANGEDB_INTERPRETER_H__ +#define __PERF_TALER_EXCHANGEDB_INTERPRETER_H__ #include -#include "taler_mintdb_plugin.h" +#include "taler_exchangedb_plugin.h" -#define PERF_TALER_MINTDB_NB_DENOMINATION_INIT 10 -#define PERF_TALER_MINTDB_NB_DENOMINATION_SAVE 10 +#define PERF_TALER_EXCHANGEDB_NB_DENOMINATION_INIT 10 +#define PERF_TALER_EXCHANGEDB_NB_DENOMINATION_SAVE 10 -#define PERF_TALER_MINTDB_NB_RESERVE_INIT 100 -#define PERF_TALER_MINTDB_NB_RESERVE_SAVE 10 +#define PERF_TALER_EXCHANGEDB_NB_RESERVE_INIT 100 +#define PERF_TALER_EXCHANGEDB_NB_RESERVE_SAVE 10 -#define PERF_TALER_MINTDB_NB_DEPOSIT_INIT 100 -#define PERF_TALER_MINTDB_NB_DEPOSIT_SAVE 10 +#define PERF_TALER_EXCHANGEDB_NB_DEPOSIT_INIT 100 +#define PERF_TALER_EXCHANGEDB_NB_DEPOSIT_SAVE 10 -#define PERF_TALER_MINTDB_NB_WITHDRAW_INIT 100 -#define PERF_TALER_MINTDB_NB_WITHDRAW_SAVE 10 +#define PERF_TALER_EXCHANGEDB_NB_WITHDRAW_INIT 100 +#define PERF_TALER_EXCHANGEDB_NB_WITHDRAW_SAVE 10 /** @@ -52,11 +52,11 @@ * * @param _label The label of the command */ -#define PERF_TALER_MINTDB_INIT_CMD_END(_label) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_END(_label) \ { \ - .command = PERF_TALER_MINTDB_CMD_END, \ + .command = PERF_TALER_EXCHANGEDB_CMD_END, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_NONE \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE \ } @@ -66,11 +66,11 @@ * @param _label The label of the command, * will be logged each time the command runs */ -#define PERF_TALER_MINTDB_INIT_CMD_DEBUG(_label) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG(_label) \ { \ - .command = PERF_TALER_MINTDB_CMD_DEBUG, \ + .command = PERF_TALER_EXCHANGEDB_CMD_DEBUG, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_NONE \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE \ } /** @@ -79,11 +79,11 @@ * @param _label the label of the loop * @param _iter the number of iterations of the loop */ -#define PERF_TALER_MINTDB_INIT_CMD_LOOP(_label, _iter) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP(_label, _iter) \ { \ - .command = PERF_TALER_MINTDB_CMD_LOOP , \ + .command = PERF_TALER_EXCHANGEDB_CMD_LOOP , \ .label = _label , \ - .exposed.type = PERF_TALER_MINTDB_NONE , \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE , \ .details.loop = { \ .max_iterations = _iter , \ .curr_iteration = 0 } \ @@ -95,11 +95,11 @@ * @param _label the label of the command * @param _label_loop the label of the loop closed by this command */ -#define PERF_TALER_MINTDB_INIT_CMD_END_LOOP(_label, _label_loop) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP(_label, _label_loop) \ {\ - .command = PERF_TALER_MINTDB_CMD_END_LOOP , \ + .command = PERF_TALER_EXCHANGEDB_CMD_END_LOOP , \ .label = _label , \ - .exposed.type = PERF_TALER_MINTDB_NONE , \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE , \ .details.end_loop.label_loop = _label_loop \ } @@ -108,11 +108,11 @@ * * @param _label the label of the command */ -#define PERF_TALER_MINTDB_INIT_CMD_GET_TIME(_label) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME(_label) \ { \ - .command = PERF_TALER_MINTDB_CMD_GET_TIME, \ + .command = PERF_TALER_EXCHANGEDB_CMD_GET_TIME, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_TIME \ + .exposed.type = PERF_TALER_EXCHANGEDB_TIME \ } /** @@ -126,11 +126,11 @@ * @param _unit the unit of the data measured, typicly something/sec * @param _divide number of measurments in the interval */ -#define PERF_TALER_MINTDB_INIT_CMD_GAUGER(_label, _label_start, _label_stop, _category, _description, _unit, _divide) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_GAUGER(_label, _label_start, _label_stop, _category, _description, _unit, _divide) \ { \ - .command = PERF_TALER_MINTDB_CMD_GAUGER, \ + .command = PERF_TALER_EXCHANGEDB_CMD_GAUGER, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_NONE, \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE, \ .details.gauger = { \ .label_start = _label_start, \ .label_stop = _label_stop, \ @@ -146,11 +146,11 @@ * * @param _label the label of the command */ -#define PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION(_label) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_START_TRANSACTION(_label) \ { \ - .command = PERF_TALER_MINTDB_CMD_START_TRANSACTION, \ + .command = PERF_TALER_EXCHANGEDB_CMD_START_TRANSACTION, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_NONE, \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE, \ } /** @@ -158,11 +158,11 @@ * * @param _label the label of the command */ -#define PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION(_label) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_COMMIT_TRANSACTION(_label) \ { \ - .command = PERF_TALER_MINTDB_CMD_COMMIT_TRANSACTION, \ + .command = PERF_TALER_EXCHANGEDB_CMD_COMMIT_TRANSACTION, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_NONE, \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE, \ } /** @@ -170,25 +170,25 @@ * * @param _label the label of the command */ -#define PERF_TALER_MINTDB_INIT_CMD_ABORT_TRANSACTION(_label) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_ABORT_TRANSACTION(_label) \ { \ - .command = PERF_TALER_MINTDB_CMD_ABORT_TRANSACTION, \ + .command = PERF_TALER_EXCHANGEDB_CMD_ABORT_TRANSACTION, \ .label = _label, /** * Saves randomly selected items from @a _label_save - * Saved items can latter be access using #PERF_TALER_MINTDB_CMD_LOAD_ARRAY + * Saved items can latter be access using #PERF_TALER_EXCHANGEDB_CMD_LOAD_ARRAY * * @param _label the label of the command, used by other commands to reference it * @param _label_loop the label of the loop the array iterates over * @param _label_save the label of the command which outout is saved by this command * @param _nb_saved the total number of items to be saved */ -#define PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY(_label, _label_loop, _label_save, _nb_saved) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_SAVE_ARRAY(_label, _label_loop, _label_save, _nb_saved) \ { \ - .command = PERF_TALER_MINTDB_CMD_SAVE_ARRAY, \ + .command = PERF_TALER_EXCHANGEDB_CMD_SAVE_ARRAY, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_NONE, \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE, \ .details.save_array = { \ .label_loop = _label_loop, \ .label_save = _label_save, \ @@ -197,18 +197,18 @@ } /** - * Loads data from a #PERF_TALER_MINTDB_CMD_SAVE_ARRAY to allow other + * Loads data from a #PERF_TALER_EXCHANGEDB_CMD_SAVE_ARRAY to allow other * commands to access it * * @param _label the label of this command, referenced by commands to access it's outpout * @param _label_loop the label of the loop to iterate over - * @param _label_save the label of the #PERF_TALER_MINTDB_CMD_SAVE_ARRAY providing data + * @param _label_save the label of the #PERF_TALER_EXCHANGEDB_CMD_SAVE_ARRAY providing data */ -#define PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY(_label, _label_loop, _label_save) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY(_label, _label_loop, _label_save) \ { \ - .command = PERF_TALER_MINTDB_CMD_LOAD_ARRAY, \ + .command = PERF_TALER_EXCHANGEDB_CMD_LOAD_ARRAY, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_NONE, \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE, \ .details.load_array = { \ .label_loop = _label_loop, \ .label_save = _label_save \ @@ -217,16 +217,16 @@ /** * Create a denomination key to use - * Exposes a #PERF_TALER_MINTDB_DENOMINATION_INFO to be used by other commands - * @exposed #PERF_TALER_MINTDB_DENOMINATION_INFO + * Exposes a #PERF_TALER_EXCHANGEDB_DENOMINATION_INFO to be used by other commands + * @exposed #PERF_TALER_EXCHANGEDB_DENOMINATION_INFO * * @param _label the label of this command */ -#define PERF_TALER_MINTDB_INIT_CMD_CREATE_DENOMINATION(_label) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_DENOMINATION(_label) \ { \ - .command = PERF_TALER_MINTDB_CMD_CREATE_DENOMINATION, \ + .command = PERF_TALER_EXCHANGEDB_CMD_CREATE_DENOMINATION, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_DENOMINATION_INFO, \ + .exposed.type = PERF_TALER_EXCHANGEDB_DENOMINATION_INFO, \ } /** @@ -235,11 +235,11 @@ * @param _label the label of this command * @param _label_denom the label of the denomination to insert */ -#define PERF_TALER_MINTDB_INIT_CMD_INSERT_DENOMINATION(_label, _label_denom) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_DENOMINATION(_label, _label_denom) \ { \ - .command = PERF_TALER_MINTDB_CMD_INSERT_DENOMINATION, \ + .command = PERF_TALER_EXCHANGEDB_CMD_INSERT_DENOMINATION, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_NONE, \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE, \ .details.insert_denomination.label_denom = _label_denom, \ } @@ -249,25 +249,25 @@ * @param _label the label of this command * @param _label_denom the label of the command providing information about the denomination key */ -#define PERF_TALER_MINTDB_INIT_CMD_GET_DENOMINATION(_label, _label_denom) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_GET_DENOMINATION(_label, _label_denom) \ { \ - .command = PERF_TALER_MINTDB_CMD_GET_DENOMINATION, \ + .command = PERF_TALER_EXCHANGEDB_CMD_GET_DENOMINATION, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_NONE, \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE, \ .details.get_denomination.label_denom = _label_denom \ } /** * Create a reserve to be used later - * Exposes a #PERF_TALER_MINTDB_RESERVE + * Exposes a #PERF_TALER_EXCHANGEDB_RESERVE * * @param _label the label of the command */ -#define PERF_TALER_MINTDB_INIT_CMD_CREATE_RESERVE(_label) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_RESERVE(_label) \ { \ - .command = PERF_TALER_MINTDB_CMD_CREATE_RESERVE, \ + .command = PERF_TALER_EXCHANGEDB_CMD_CREATE_RESERVE, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_RESERVE \ + .exposed.type = PERF_TALER_EXCHANGEDB_RESERVE \ } /** @@ -276,11 +276,11 @@ * @param _label the name of this command * @param _label_reserve the label of the reserve to insert */ -#define PERF_TALER_MINTDB_INIT_CMD_INSERT_RESERVE(_label, _label_reserve) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_RESERVE(_label, _label_reserve) \ { \ - .command = PERF_TALER_MINTDB_CMD_INSERT_RESERVE, \ + .command = PERF_TALER_EXCHANGEDB_CMD_INSERT_RESERVE, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_NONE, \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE, \ .details.insert_reserve.label_reserve = _label_reserve \ } @@ -290,11 +290,11 @@ * @param _label the label of this command * @param _label_reserve the reserve to poll */ -#define PERF_TALER_MINTDB_INIT_CMD_GET_RESERVE(_label, _label_reserve) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_GET_RESERVE(_label, _label_reserve) \ { \ - .command = PERF_TALER_MINTDB_CMD_GET_RESERVE, \ + .command = PERF_TALER_EXCHANGEDB_CMD_GET_RESERVE, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_NONE, \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE, \ .details.get_reserve.label_reserve = _label_reserve \ } @@ -304,11 +304,11 @@ * @param _label the label of the command * @param _label_reserve the reserve to examine */ -#define PERF_TALER_MINTDB_INIT_CMD_GET_RESERVE_HISTORY(_label, _label_reserve) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_GET_RESERVE_HISTORY(_label, _label_reserve) \ { \ - .command = PERF_TALER_MINTDB_CMD_GET_RESERVE_HISTORY, \ + .command = PERF_TALER_EXCHANGEDB_CMD_GET_RESERVE_HISTORY, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_NONE, \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE, \ .details.get_reserve_history.label_reserve = _label_reserve \ } @@ -319,11 +319,11 @@ * @param _label_dki denomination key used to sign the coin * @param _label_reserve reserve used to emmit the coin */ -#define PERF_TALER_MINTDB_INIT_CMD_CREATE_WITHDRAW(_label, _label_dki, _label_reserve) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_WITHDRAW(_label, _label_dki, _label_reserve) \ { \ - .command = PERF_TALER_MINTDB_CMD_CREATE_WITHDRAW, \ + .command = PERF_TALER_EXCHANGEDB_CMD_CREATE_WITHDRAW, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_COIN, \ + .exposed.type = PERF_TALER_EXCHANGEDB_COIN, \ .details.create_withdraw = {\ .label_dki = _label_dki, \ .label_reserve = _label_reserve, \ @@ -333,16 +333,16 @@ /** * Inserts informations about a withdrawal in the database * - * @exposes #PERF_TALER_MINTDB_COIN + * @exposes #PERF_TALER_EXCHANGEDB_COIN * * @param _label the label of this command * @param _label_coin the coin to insert */ -#define PERF_TALER_MINTDB_INIT_CMD_INSERT_WITHDRAW(_label, _label_coin) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_WITHDRAW(_label, _label_coin) \ { \ - .command = PERF_TALER_MINTDB_CMD_INSERT_WITHDRAW, \ + .command = PERF_TALER_EXCHANGEDB_CMD_INSERT_WITHDRAW, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_NONE, \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE, \ .details.insert_withdraw.label_coin = _label_coin\ } @@ -353,11 +353,11 @@ * @param _label the label of this command * @param _label_coin the coin to check */ -#define PERF_TALER_MINTDB_INIT_CMD_GET_WITHDRAW(_label, _label_coin) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_GET_WITHDRAW(_label, _label_coin) \ { \ - .command = PERF_TALER_MINTDB_CMD_GET_WITHDRAW, \ + .command = PERF_TALER_EXCHANGEDB_CMD_GET_WITHDRAW, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_NONE, \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE, \ .details.get_withdraw.label_coin = _label_coin, \ } @@ -365,35 +365,35 @@ /** * The /reserve/withdraw api call * - * Exposes #PERF_TALER_MINTDB_COIN + * Exposes #PERF_TALER_EXCHANGEDB_COIN * * @param _label the label of this command * @param _label_dki the denomination of the created coin * @param _label_reserve the reserve used to provide currency */ -#define PERF_TALER_MINTDB_INIT_CMD_WITHDRAW_SIGN(_label, _label_dki, _label_reserve) \ - PERF_TALER_MINTDB_INIT_CMD_CREATE_WITHDRAW (_label "withdraw", \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_WITHDRAW_SIGN(_label, _label_dki, _label_reserve) \ + PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_WITHDRAW (_label "withdraw", \ _label_dki, \ _label_reserve), \ - PERF_TALER_MINTDB_INIT_CMD_GET_DENOMINATION(_label "withdraw info", \ + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_DENOMINATION(_label "withdraw info", \ _label_dki), \ - PERF_TALER_MINTDB_INIT_CMD_GET_RESERVE_HISTORY(_label "reserve_history", \ + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_RESERVE_HISTORY(_label "reserve_history", \ _label_reserve), \ - PERF_TALER_MINTDB_INIT_CMD_INSERT_WITHDRAW(_label "insert withdraw", \ + PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_WITHDRAW(_label "insert withdraw", \ _label "withdraw") /** * Create a deposit for use later - * @exposes #PERF_TALER_MINTDB_DEPOSIT + * @exposes #PERF_TALER_EXCHANGEDB_DEPOSIT * * @param _label the label of this command * @param _label_coin the coin used to pay */ -#define PERF_TALER_MINTDB_INIT_CMD_CREATE_DEPOSIT(_label, _label_coin) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_DEPOSIT(_label, _label_coin) \ { \ - .command = PERF_TALER_MINTDB_CMD_CREATE_DEPOSIT, \ + .command = PERF_TALER_EXCHANGEDB_CMD_CREATE_DEPOSIT, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_DEPOSIT, \ + .exposed.type = PERF_TALER_EXCHANGEDB_DEPOSIT, \ .details.create_deposit.label_coin = _label_coin, \ } @@ -403,11 +403,11 @@ * @param _label the label of this command * @param _label_deposit the deposit inseerted */ -#define PERF_TALER_MINTDB_INIT_CMD_INSERT_DEPOSIT(_label, _label_deposit) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_DEPOSIT(_label, _label_deposit) \ { \ - .command = PERF_TALER_MINTDB_CMD_INSERT_DEPOSIT,\ + .command = PERF_TALER_EXCHANGEDB_CMD_INSERT_DEPOSIT,\ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_NONE, \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE, \ .details.insert_deposit.label_deposit = _label_deposit, \ } @@ -417,11 +417,11 @@ * @param _label the label of this command * @param _label_deposit the deposit to use */ -#define PERF_TALER_MINTDB_INIT_CMD_GET_DEPOSIT(_label, _label_deposit) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_GET_DEPOSIT(_label, _label_deposit) \ { \ - .command = PERF_TALER_MINTDB_CMD_GET_DEPOSIT, \ + .command = PERF_TALER_EXCHANGEDB_CMD_GET_DEPOSIT, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_NONE, \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE, \ .details.get_deposit.label_deposit = _label_deposit \ } @@ -431,11 +431,11 @@ * @param _label the label of the command * @param _label_coin the coin which history is checked */ -#define PERF_TALER_MINTDB_INIT_CMD_GET_COIN_TRANSACTION(_label, _label_coin) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_GET_COIN_TRANSACTION(_label, _label_coin) \ { \ - .command = PERF_TALER_MINTDB_CMD_GET_COIN_TRANSACTION, \ + .command = PERF_TALER_EXCHANGEDB_CMD_GET_COIN_TRANSACTION, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_NONE, \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE, \ .details.get_coin_transaction.label_coin = _label_coin \ } @@ -445,12 +445,12 @@ * @param _label the label of the command * @param _label_coin the coin used for the deposit */ -#define PERF_TALER_MINTDB_INIT_CMD_DEPOSIT(_label, _label_coin) \ - PERF_TALER_MINTDB_INIT_CMD_GET_COIN_TRANSACTION (_label "coin history", \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_DEPOSIT(_label, _label_coin) \ + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_COIN_TRANSACTION (_label "coin history", \ _label_coin), \ - PERF_TALER_MINTDB_INIT_CMD_CREATE_DEPOSIT (_label "deposit", \ + PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_DEPOSIT (_label "deposit", \ _label_coin), \ - PERF_TALER_MINTDB_INIT_CMD_INSERT_DEPOSIT (_label "insert", \ + PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_DEPOSIT (_label "insert", \ _label "deposit") /** * Insert informations about a refresh session @@ -458,11 +458,11 @@ * * @param _label the label of the command */ -#define PERF_TALER_MINTDB_INIT_CMD_CREATE_REFRESH_SESSION(_label) \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_REFRESH_SESSION(_label) \ { \ - .command = PERF_TALER_MINTDB_CMD_CREATE_REFRESH_SESSION, \ + .command = PERF_TALER_EXCHANGEDB_CMD_CREATE_REFRESH_SESSION, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_REFRESH_HASH \ + .exposed.type = PERF_TALER_EXCHANGEDB_REFRESH_HASH \ } /** @@ -471,12 +471,12 @@ * @param _label the label of the command * @param _label_hash the label of the hash to search */ -#define PERF_TALER_MINTDB_INIT_CMD_GET_REFRESH_SESSION(_label, \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_GET_REFRESH_SESSION(_label, \ _label_hash) \ { \ - .command = PERF_TALER_MINTDB_CMD_GET_REFRESH_SESSION, \ + .command = PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_SESSION, \ .label = _label, \ - .exposed.type = PERF_TALER_MINTDB_NONE \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE \ } /** @@ -486,15 +486,15 @@ * @param _label_hash the label of the hash of the session * @param _label_coin the label of the coin to melt */ -#define PERF_TALER_MINTDB_INIT_CMD_INSERT_REFRESH_MELT(_label, \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_REFRESH_MELT(_label, \ _label_hash, \ _label_coin) \ { \ - .command = PERF_TALER_MINTDB_CMD_INSERT_REFRESH_MELT, \ + .command = PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_MELT, \ .label = _label, \ .details.insert_refresh_melt.label_hash = _label_hash, \ .details.insert_refresh_melt.label_coin = _label_coin, \ - .exposed.type = PERF_TALER_MINTDB_NONE \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE \ } /** @@ -503,58 +503,58 @@ * @param _label the label of the command * @param _label_hash the label of the hash of the refresh session */ -#define PERF_TALER_MINTDB_INIT_CMD_GET_REFRESH_MELT(_label, \ +#define PERF_TALER_EXCHANGEDB_INIT_CMD_GET_REFRESH_MELT(_label, \ _label_hash) \ { \ - .command = PERF_TALER_MINTDB_CMD_GET_REFRESH_MELT, \ + .command = PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_MELT, \ .label = _label, \ .detail.get_refresh_melt.label_hash = _label_hash, \ - .exposed.type = PERF_TALER_MINTDB_NONE \ + .exposed.type = PERF_TALER_EXCHANGEDB_NONE \ } /** - * The type of data stored in #PERF_TALER_MINTDB_Memory + * The type of data stored in #PERF_TALER_EXCHANGEDB_Memory */ -enum PERF_TALER_MINTDB_Type +enum PERF_TALER_EXCHANGEDB_Type { - PERF_TALER_MINTDB_NONE, - PERF_TALER_MINTDB_TIME, - PERF_TALER_MINTDB_DENOMINATION_INFO, - PERF_TALER_MINTDB_RESERVE, - PERF_TALER_MINTDB_COIN, - PERF_TALER_MINTDB_DEPOSIT, - PERF_TALER_MINTDB_REFRESH_HASH, - PERF_TALER_MINTDB_REFRESH_MELT + PERF_TALER_EXCHANGEDB_NONE, + PERF_TALER_EXCHANGEDB_TIME, + PERF_TALER_EXCHANGEDB_DENOMINATION_INFO, + PERF_TALER_EXCHANGEDB_RESERVE, + PERF_TALER_EXCHANGEDB_COIN, + PERF_TALER_EXCHANGEDB_DEPOSIT, + PERF_TALER_EXCHANGEDB_REFRESH_HASH, + PERF_TALER_EXCHANGEDB_REFRESH_MELT }; /** * Structure used to handle several data type */ -struct PERF_TALER_MINTDB_Data +struct PERF_TALER_EXCHANGEDB_Data { - enum PERF_TALER_MINTDB_Type type; + enum PERF_TALER_EXCHANGEDB_Type type; /** * Storage for a variety of data type * The data saved should match #type */ - union PERF_TALER_MINTDB_Memory + union PERF_TALER_EXCHANGEDB_Memory { - /** #PERF_TALER_MINTDB_TIME */ + /** #PERF_TALER_EXCHANGEDB_TIME */ struct GNUNET_TIME_Absolute *time; - /** #PERF_TALER_MINTDB_DEPOSIT */ - struct TALER_MINTDB_Deposit *deposit; - /** #PERF_TALER_MINTDB_COIN */ - struct PERF_TALER_MINTDB_Coin *coin; - /** #PERF_TALER_MINTDB_RESERVE */ - struct PERF_TALER_MINTDB_Reserve *reserve; - /** #PERF_TALER_MINTDB_DENOMINATION_INFO */ - struct TALER_MINTDB_DenominationKeyIssueInformation *dki; - /** #PERF_TALER_MINTDB_REFRESH_HASH */ + /** #PERF_TALER_EXCHANGEDB_DEPOSIT */ + struct TALER_EXCHANGEDB_Deposit *deposit; + /** #PERF_TALER_EXCHANGEDB_COIN */ + struct PERF_TALER_EXCHANGEDB_Coin *coin; + /** #PERF_TALER_EXCHANGEDB_RESERVE */ + struct PERF_TALER_EXCHANGEDB_Reserve *reserve; + /** #PERF_TALER_EXCHANGEDB_DENOMINATION_INFO */ + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki; + /** #PERF_TALER_EXCHANGEDB_REFRESH_HASH */ struct GNUNET_HashCode *session_hash; - /** #PERF_TALER_MINTDB_REFRESH_MELT */ - struct TALER_MINTDB_RefreshMelt *refresh_melt; + /** #PERF_TALER_EXCHANGEDB_REFRESH_MELT */ + struct TALER_EXCHANGEDB_RefreshMelt *refresh_melt; } data; }; @@ -562,216 +562,216 @@ struct PERF_TALER_MINTDB_Data /** * Name of the command */ -enum PERF_TALER_MINTDB_CMD_Name +enum PERF_TALER_EXCHANGEDB_CMD_Name { /** * All comand chain must hace this as their last command */ - PERF_TALER_MINTDB_CMD_END, + PERF_TALER_EXCHANGEDB_CMD_END, /** * Prints it's label */ - PERF_TALER_MINTDB_CMD_DEBUG, + PERF_TALER_EXCHANGEDB_CMD_DEBUG, /** * Define the start of al command chain loop */ - PERF_TALER_MINTDB_CMD_LOOP, + PERF_TALER_EXCHANGEDB_CMD_LOOP, /** * Define the end of a command chain loop */ - PERF_TALER_MINTDB_CMD_END_LOOP, + PERF_TALER_EXCHANGEDB_CMD_END_LOOP, /** * Save the time at which the command was executed */ - PERF_TALER_MINTDB_CMD_GET_TIME, + PERF_TALER_EXCHANGEDB_CMD_GET_TIME, /** * Upload performance to Gauger */ - PERF_TALER_MINTDB_CMD_GAUGER, + PERF_TALER_EXCHANGEDB_CMD_GAUGER, /** * Start a new session */ - PERF_TALER_MINTDB_CMD_NEW_SESSION, + PERF_TALER_EXCHANGEDB_CMD_NEW_SESSION, /** * Start a database transaction */ - PERF_TALER_MINTDB_CMD_START_TRANSACTION, + PERF_TALER_EXCHANGEDB_CMD_START_TRANSACTION, /** * End a database transaction */ - PERF_TALER_MINTDB_CMD_COMMIT_TRANSACTION, + PERF_TALER_EXCHANGEDB_CMD_COMMIT_TRANSACTION, /** - * Abort a transaction started with #PERF_TALER_MINTDB_CMD_START_TRANSACTION + * Abort a transaction started with #PERF_TALER_EXCHANGEDB_CMD_START_TRANSACTION */ - PERF_TALER_MINTDB_CMD_ABORT_TRANSACTION, + PERF_TALER_EXCHANGEDB_CMD_ABORT_TRANSACTION, /** * Saves random deposits from a loop */ - PERF_TALER_MINTDB_CMD_SAVE_ARRAY, + PERF_TALER_EXCHANGEDB_CMD_SAVE_ARRAY, /** - * Load items saved earlier in a #PERF_TALER_MINTDB_CMD_SAVE_ARRAY + * Load items saved earlier in a #PERF_TALER_EXCHANGEDB_CMD_SAVE_ARRAY * The items are loaded in a random order, but all of them will be loaded */ - PERF_TALER_MINTDB_CMD_LOAD_ARRAY, + PERF_TALER_EXCHANGEDB_CMD_LOAD_ARRAY, /** - * Loads a random item from a #PERF_TALER_MINTDB_CMD_SAVE_ARRAY + * Loads a random item from a #PERF_TALER_EXCHANGEDB_CMD_SAVE_ARRAY * A random item is loaded each time the command is run */ - PERF_TALER_MINTDB_CMD_LOAD_RANDOM, + PERF_TALER_EXCHANGEDB_CMD_LOAD_RANDOM, /** * Create a denomination to be used later */ - PERF_TALER_MINTDB_CMD_CREATE_DENOMINATION, + PERF_TALER_EXCHANGEDB_CMD_CREATE_DENOMINATION, /** * Insert informations about a denomination key in the database */ - PERF_TALER_MINTDB_CMD_INSERT_DENOMINATION, + PERF_TALER_EXCHANGEDB_CMD_INSERT_DENOMINATION, /** * Polls the database for informations about a specific denomination key */ - PERF_TALER_MINTDB_CMD_GET_DENOMINATION, + PERF_TALER_EXCHANGEDB_CMD_GET_DENOMINATION, /** * Create a reserve to be used later */ - PERF_TALER_MINTDB_CMD_CREATE_RESERVE, + PERF_TALER_EXCHANGEDB_CMD_CREATE_RESERVE, /** * Insert currency in a reserve / Create a reserve */ - PERF_TALER_MINTDB_CMD_INSERT_RESERVE, + PERF_TALER_EXCHANGEDB_CMD_INSERT_RESERVE, /** * Get Informations about a reserve */ - PERF_TALER_MINTDB_CMD_GET_RESERVE, + PERF_TALER_EXCHANGEDB_CMD_GET_RESERVE, /** * Get the history of a reserve */ - PERF_TALER_MINTDB_CMD_GET_RESERVE_HISTORY, + PERF_TALER_EXCHANGEDB_CMD_GET_RESERVE_HISTORY, /** * Create a withdrawal to be used later */ - PERF_TALER_MINTDB_CMD_CREATE_WITHDRAW, + PERF_TALER_EXCHANGEDB_CMD_CREATE_WITHDRAW, /** * Insert informations about a withdrawal in the database */ - PERF_TALER_MINTDB_CMD_INSERT_WITHDRAW, + PERF_TALER_EXCHANGEDB_CMD_INSERT_WITHDRAW, /** * Pulls informations about a withdrawal from the database */ - PERF_TALER_MINTDB_CMD_GET_WITHDRAW, + PERF_TALER_EXCHANGEDB_CMD_GET_WITHDRAW, /** * Get the list of all transactions the coin has been in */ - PERF_TALER_MINTDB_CMD_GET_COIN_TRANSACTION, + PERF_TALER_EXCHANGEDB_CMD_GET_COIN_TRANSACTION, /** * Create a deposit to be used later */ - PERF_TALER_MINTDB_CMD_CREATE_DEPOSIT, + PERF_TALER_EXCHANGEDB_CMD_CREATE_DEPOSIT, /** * Insert a deposit into the database */ - PERF_TALER_MINTDB_CMD_INSERT_DEPOSIT, + PERF_TALER_EXCHANGEDB_CMD_INSERT_DEPOSIT, /** * Check if a deposit is in the database */ - PERF_TALER_MINTDB_CMD_GET_DEPOSIT, + PERF_TALER_EXCHANGEDB_CMD_GET_DEPOSIT, /** * Create a refresh session * The number of melted coins is 1, - * The number of minted coins is 1 + * The number of exchangeed coins is 1 */ - PERF_TALER_MINTDB_CMD_CREATE_REFRESH_SESSION, + PERF_TALER_EXCHANGEDB_CMD_CREATE_REFRESH_SESSION, /** * Get a refresh session informations */ - PERF_TALER_MINTDB_CMD_GET_REFRESH_SESSION, + PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_SESSION, /** * Insert a refresh melt */ - PERF_TALER_MINTDB_CMD_INSERT_REFRESH_MELT, + PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_MELT, /** * Get informations about a refresh melt operation */ - PERF_TALER_MINTDB_CMD_GET_REFRESH_MELT, + PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_MELT, /** * Insert a melt refresh order */ - PERF_TALER_MINTDB_CMD_INSERT_REFRESH_ORDER, + PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_ORDER, /** * Get informations about a refresh order */ - PERF_TALER_MINTDB_CMD_GET_REFRESH_ORDER, + PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_ORDER, /** * Insert refresh commit coin */ - PERF_TALER_MINTDB_CMD_INSERT_REFRESH_COMMIT_COIN, + PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_COMMIT_COIN, /** * Get refresh commit coin */ - PERF_TALER_MINTDB_CMD_GET_REFRESH_COMMIT_COIN, + PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_COMMIT_COIN, /** * Insert refresh commit link */ - PERF_TALER_MINTDB_CMD_INSERT_REFRESH_COMMIT_LINK, + PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_COMMIT_LINK, /** * Get refresh commit link */ - PERF_TALER_MINTDB_CMD_GET_REFRESH_COMMIT_LINK, + PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_COMMIT_LINK, /** * Get information avout the melt commit */ - PERF_TALER_MINTDB_CMD_GET_MELT_COMMITMENT, + PERF_TALER_EXCHANGEDB_CMD_GET_MELT_COMMITMENT, /** * Insert a new coin into the database after a melt operation */ - PERF_TALER_MINTDB_CMD_INSERT_REFRESH_OUT, + PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_OUT, /** * Get the link data list of a coin */ - PERF_TALER_MINTDB_CMD_GET_LINK_DATA_LIST, + PERF_TALER_EXCHANGEDB_CMD_GET_LINK_DATA_LIST, /** * Get the shared secret and the transfere public key */ - PERF_TALER_MINTDB_CMD_GET_TRANSFER + PERF_TALER_EXCHANGEDB_CMD_GET_TRANSFER }; @@ -779,12 +779,12 @@ enum PERF_TALER_MINTDB_CMD_Name /** * Contains extra data required for any command */ -union PERF_TALER_MINTDB_CMD_Details +union PERF_TALER_EXCHANGEDB_CMD_Details { /** - * Extra data requiered for the #PERF_TALER_MINTDB_CMD_LOOP command + * Extra data requiered for the #PERF_TALER_EXCHANGEDB_CMD_LOOP command */ - struct PERF_TALER_MINTDB_CMD_loopDetails + struct PERF_TALER_EXCHANGEDB_CMD_loopDetails { /** * Maximum number of iteration in the loop @@ -798,9 +798,9 @@ union PERF_TALER_MINTDB_CMD_Details } loop; /** - * Extra data requiered by the #PERF_TALER_MINTDB_CMD_END_LOOP command + * Extra data requiered by the #PERF_TALER_EXCHANGEDB_CMD_END_LOOP command */ - struct PERF_TALER_MINTDB_CMD_endLoopDetails + struct PERF_TALER_EXCHANGEDB_CMD_endLoopDetails { /** * Label of the loop closed by the command @@ -810,9 +810,9 @@ union PERF_TALER_MINTDB_CMD_Details } end_loop; /** - * Details about the #PERF_TALER_MINTDB_CMD_GAUGER command + * Details about the #PERF_TALER_EXCHANGEDB_CMD_GAUGER command */ - struct PERF_TALER_MINTDB_CMD_gaugerDetails + struct PERF_TALER_EXCHANGEDB_CMD_gaugerDetails { /** * Label of the starting timestamp @@ -849,9 +849,9 @@ union PERF_TALER_MINTDB_CMD_Details } gauger; /** - * Contains extra data requiered by the #PERF_TALER_MINTDB_CMD_SAVE_ARRAY command + * Contains extra data requiered by the #PERF_TALER_EXCHANGEDB_CMD_SAVE_ARRAY command */ - struct PERF_TALER_MINTDB_CMD_saveArrayDetails + struct PERF_TALER_EXCHANGEDB_CMD_saveArrayDetails { /** * Number of items to save @@ -878,20 +878,20 @@ union PERF_TALER_MINTDB_CMD_Details /** * Array of data saved */ - struct PERF_TALER_MINTDB_Data *data_saved; + struct PERF_TALER_EXCHANGEDB_Data *data_saved; /** * Type of the data that will be stored in @a data_saved, for * 'static' type checking. */ - enum PERF_TALER_MINTDB_Type type_saved; + enum PERF_TALER_EXCHANGEDB_Type type_saved; } save_array; /** - * Extra data required for the #PERF_TALER_MINTDB_CMD_LOAD_ARRAY command + * Extra data required for the #PERF_TALER_EXCHANGEDB_CMD_LOAD_ARRAY command */ - struct PERF_TALER_MINTDB_CMD_loadArrayDetails + struct PERF_TALER_EXCHANGEDB_CMD_loadArrayDetails { /** * The loop in which the command is located @@ -912,21 +912,21 @@ union PERF_TALER_MINTDB_CMD_Details } load_array; /** - * Contains data for the #PERF_TALER_MINTDB_CMD_LOAD_RANDOM command + * Contains data for the #PERF_TALER_EXCHANGEDB_CMD_LOAD_RANDOM command */ - struct PERF_TALER_MINTDB_CMD_loadRandomDetails + struct PERF_TALER_EXCHANGEDB_CMD_loadRandomDetails { /** - * The label of the #PERF_TALER_MINTDB_CMD_SAVE_ARRAY the items will be extracted from + * The label of the #PERF_TALER_EXCHANGEDB_CMD_SAVE_ARRAY the items will be extracted from */ const char *label_save; unsigned int index_save; } load_random; /** - * Extra data requiered by the #PERF_TALER_MINTDB_CMD_INSERT_DENOMINATION command + * Extra data requiered by the #PERF_TALER_EXCHANGEDB_CMD_INSERT_DENOMINATION command */ - struct PERF_TALER_MINTDB_CMD_insertDenominationDetails + struct PERF_TALER_EXCHANGEDB_CMD_insertDenominationDetails { /** * The label of the source of the denomination to insert @@ -936,9 +936,9 @@ union PERF_TALER_MINTDB_CMD_Details } insert_denomination; /** - * Extra data requiered by the #PERF_TALER_MINTDB_CMD_GET_DENOMINATION command + * Extra data requiered by the #PERF_TALER_EXCHANGEDB_CMD_GET_DENOMINATION command */ - struct PERF_TALER_MINTDB_CMD_getDenominationDetails + struct PERF_TALER_EXCHANGEDB_CMD_getDenominationDetails { /** * The label of the source of the denomination to check @@ -948,9 +948,9 @@ union PERF_TALER_MINTDB_CMD_Details } get_denomination; /** - * Extra data requiered for the #PERF_TALER_MINTDB_CMD_INSERT_RESERVE command + * Extra data requiered for the #PERF_TALER_EXCHANGEDB_CMD_INSERT_RESERVE command */ - struct PERF_TALER_MINTDB_CMD_insertReserveDetails + struct PERF_TALER_EXCHANGEDB_CMD_insertReserveDetails { /** * The label of the source of the reserve to insert @@ -960,9 +960,9 @@ union PERF_TALER_MINTDB_CMD_Details } insert_reserve; /** - * Extra data requiered for the #PERF_TALER_MINTDB_CMD_GET_RESERVE command + * Extra data requiered for the #PERF_TALER_EXCHANGEDB_CMD_GET_RESERVE command */ - struct PERF_TALER_MINTDB_CMD_getReserveDetails + struct PERF_TALER_EXCHANGEDB_CMD_getReserveDetails { /** * The label of the source of the reserve to check @@ -972,9 +972,9 @@ union PERF_TALER_MINTDB_CMD_Details } get_reserve; /** - * Extra data requiered for the #PERF_TALER_MINTDB_CMD_GET_RESERVE_HISTORY command + * Extra data requiered for the #PERF_TALER_EXCHANGEDB_CMD_GET_RESERVE_HISTORY command */ - struct PERF_TALER_MINTDB_CMD_getReserveHistoryDetails + struct PERF_TALER_EXCHANGEDB_CMD_getReserveHistoryDetails { /** * The label of the source of the reserve to check @@ -984,9 +984,9 @@ union PERF_TALER_MINTDB_CMD_Details } get_reserve_history; /** - * Extra data related to the #PERF_TALER_MINTDB_CMD_CREATE_WITHDRAW command + * Extra data related to the #PERF_TALER_EXCHANGEDB_CMD_CREATE_WITHDRAW command */ - struct PERF_TALER_MINTDB_CMD_createWithdrawDetails + struct PERF_TALER_EXCHANGEDB_CMD_createWithdrawDetails { /** * label of the denomination key used to sign the coin @@ -995,16 +995,16 @@ union PERF_TALER_MINTDB_CMD_Details unsigned int index_dki; /** - * label of the reserve the money to mint the coin comes from + * label of the reserve the money to exchange the coin comes from */ const char *label_reserve; unsigned int index_reserve; } create_withdraw; /** - * data requiered for the #PERF_TALER_MINTDB_CMD_INSERT_WITHDRAW + * data requiered for the #PERF_TALER_EXCHANGEDB_CMD_INSERT_WITHDRAW */ - struct PERF_TALER_MINTDB_CMD_insertWithdrawDetails + struct PERF_TALER_EXCHANGEDB_CMD_insertWithdrawDetails { /** * label of the source for the coin information @@ -1014,9 +1014,9 @@ union PERF_TALER_MINTDB_CMD_Details } insert_withdraw; /** - * data requiered for the #PERF_TALER_MINTDB_CMD_GET_WITHDRAW + * data requiered for the #PERF_TALER_EXCHANGEDB_CMD_GET_WITHDRAW */ - struct PERF_TALER_MINTDB_CMD_getWithdraw + struct PERF_TALER_EXCHANGEDB_CMD_getWithdraw { /** * label of the source for the coin information @@ -1026,9 +1026,9 @@ union PERF_TALER_MINTDB_CMD_Details } get_withdraw; /** - * Data requiered for the #PERF_TALER_MINTDB_CMD_GET_COIN_TRANSACTION command + * Data requiered for the #PERF_TALER_EXCHANGEDB_CMD_GET_COIN_TRANSACTION command */ - struct PERF_TALER_MINTDB_CMD_getCoinTransactionDetails + struct PERF_TALER_EXCHANGEDB_CMD_getCoinTransactionDetails { /** * The coin which history is checked @@ -1038,9 +1038,9 @@ union PERF_TALER_MINTDB_CMD_Details } get_coin_transaction; /** - * Data used by the #PERF_TALER_MINTDB_CMD_CREATE_DEPOSIT command + * Data used by the #PERF_TALER_EXCHANGEDB_CMD_CREATE_DEPOSIT command */ - struct PERF_TALER_MINTDB_CMD_createDepositDetails + struct PERF_TALER_EXCHANGEDB_CMD_createDepositDetails { /** * Label of the source where the reserve used to create the coin is @@ -1050,9 +1050,9 @@ union PERF_TALER_MINTDB_CMD_Details } create_deposit; /** - * Extra data requiered for the #PERF_TALER_MINTDB_CMD_INSERT_DEPOSIT command + * Extra data requiered for the #PERF_TALER_EXCHANGEDB_CMD_INSERT_DEPOSIT command */ - struct PERF_TALER_MINTDB_CMD_insertDepositDetails + struct PERF_TALER_EXCHANGEDB_CMD_insertDepositDetails { /** * The label of the source of the deposit to check @@ -1062,9 +1062,9 @@ union PERF_TALER_MINTDB_CMD_Details } insert_deposit; /** - * Extra data requiered for the #PERF_TALER_MINTDB_CMD_GET_DEPOSIT command + * Extra data requiered for the #PERF_TALER_EXCHANGEDB_CMD_GET_DEPOSIT command */ - struct PERF_TALER_MINTDB_CMD_getDepositDetails + struct PERF_TALER_EXCHANGEDB_CMD_getDepositDetails { /** * The label of the source of the deposit to check @@ -1074,9 +1074,9 @@ union PERF_TALER_MINTDB_CMD_Details } get_deposit; /** - * Data requiered for the #PERF_TALER_MINTDB_CMD_GET_REFRESH_SESSION command + * Data requiered for the #PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_SESSION command */ - struct PERF_TALER_MINTDB_CMD_getRefreshSessionDetails + struct PERF_TALER_EXCHANGEDB_CMD_getRefreshSessionDetails { /** * label of the source of the hash of the session @@ -1086,9 +1086,9 @@ union PERF_TALER_MINTDB_CMD_Details } get_refresh_session; /** - * Data requiered for the #PERF_TALER_MINTDB_CMD_INSERT_REFRESH_MELT command + * Data requiered for the #PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_MELT command */ - struct PERF_TALER_MINTDB_CMD_insertRefreshMeltDetails + struct PERF_TALER_EXCHANGEDB_CMD_insertRefreshMeltDetails { /** * The label of the hash of the refresh session @@ -1104,9 +1104,9 @@ union PERF_TALER_MINTDB_CMD_Details } insert_refresh_melt; /** - * Data requiered for the #PERF_TALER_MINTDB_CMD_GET_REFRESH_MELT command + * Data requiered for the #PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_MELT command */ - struct PERF_TALER_MINTDB_CMD_getRefreshMeltDetails + struct PERF_TALER_EXCHANGEDB_CMD_getRefreshMeltDetails { /** * The label of the hash of the session @@ -1116,9 +1116,9 @@ union PERF_TALER_MINTDB_CMD_Details } get_refresh_melt; /** - * Data requiered for the #PERF_TALER_MINTDB_CMD_INSERT_REFRESH_ORDER command + * Data requiered for the #PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_ORDER command */ - struct PERF_TALER_MINTDB_CMD_insertRefreshOrderDetails + struct PERF_TALER_EXCHANGEDB_CMD_insertRefreshOrderDetails { /** * The refresh session hash @@ -1134,9 +1134,9 @@ union PERF_TALER_MINTDB_CMD_Details } insert_refresh_order; /** - * Data requiered for the #PERF_TALER_MINTDB_CMD_GET_REFRESH_ORDER command + * Data requiered for the #PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_ORDER command */ - struct PERF_TALER_MINTDB_CMD_getRefreshOrderDetails + struct PERF_TALER_EXCHANGEDB_CMD_getRefreshOrderDetails { /** * The session hash @@ -1147,9 +1147,9 @@ union PERF_TALER_MINTDB_CMD_Details } get_refresh_order; /** - * Data requiered for the #PERF_TALER_MINTDB_CMD_INSERT_REFRESH_COMMIT_COIN command + * Data requiered for the #PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_COMMIT_COIN command */ - struct PERF_TALER_MINTDB_CMD_insertRefreshCommitCoinDetails + struct PERF_TALER_EXCHANGEDB_CMD_insertRefreshCommitCoinDetails { /** * The refresh session hash @@ -1160,9 +1160,9 @@ union PERF_TALER_MINTDB_CMD_Details } insert_refresh_commit_coin; /** - * Data requiered for the #PERF_TALER_MINTDB_CMD_GET_REFRESH_COMMIT_COIN command + * Data requiered for the #PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_COMMIT_COIN command */ - struct PERF_TALER_MINTDB_CMD_getRefreshCommitCoinDetails + struct PERF_TALER_EXCHANGEDB_CMD_getRefreshCommitCoinDetails { /** * The refresh session hash @@ -1173,9 +1173,9 @@ union PERF_TALER_MINTDB_CMD_Details } get_refresh_commit_coin; /** - * Data requiered for the #PERF_TALER_MINTDB_CMD_INSERT_REFRESH_COMMIT_LINK command + * Data requiered for the #PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_COMMIT_LINK command */ - struct PERF_TALER_MINTDB_CMD_insertRefreshCommitLinkDetails + struct PERF_TALER_EXCHANGEDB_CMD_insertRefreshCommitLinkDetails { /** * The refresh session hash @@ -1186,9 +1186,9 @@ union PERF_TALER_MINTDB_CMD_Details } insert_refresh_commit_link; /** - * Data requiered by the #PERF_TALER_MINTDB_CMD_GET_REFRESH_COMMIT_LINK command + * Data requiered by the #PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_COMMIT_LINK command */ - struct PERF_TALER_MINTDB_CMD_getRefreshCommitLinkDetails + struct PERF_TALER_EXCHANGEDB_CMD_getRefreshCommitLinkDetails { /** * The refresh session hash @@ -1198,9 +1198,9 @@ union PERF_TALER_MINTDB_CMD_Details } get_refresh_commit_link; /** - * Data requiered for the #PERF_TALER_MINTDB_CMD_GET_MELT_COMMITMENT command + * Data requiered for the #PERF_TALER_EXCHANGEDB_CMD_GET_MELT_COMMITMENT command */ - struct PERF_TALER_MINTDB_CMD_getMeltCommitmentDaetails + struct PERF_TALER_EXCHANGEDB_CMD_getMeltCommitmentDaetails { /** * The refresh session hash @@ -1210,9 +1210,9 @@ union PERF_TALER_MINTDB_CMD_Details } get_melt_commitment; /** - * Data requiered by the #PERF_TALER_MINTDB_CMD_INSERT_REFRESH_OUT command + * Data requiered by the #PERF_TALER_EXCHANGEDB_CMD_INSERT_REFRESH_OUT command */ - struct PERF_TALER_MINTDB_CMD_insertRefreshOutDetails + struct PERF_TALER_EXCHANGEDB_CMD_insertRefreshOutDetails { /** * The refresh session hash @@ -1222,9 +1222,9 @@ union PERF_TALER_MINTDB_CMD_Details } insert_refresh_out; /** - * Data requiered by the #PERF_TALER_MINTDB_CMD_GET_LINK_DATA_LIST command + * Data requiered by the #PERF_TALER_EXCHANGEDB_CMD_GET_LINK_DATA_LIST command */ - struct PERF_TALER_MINTDB_CMD_getLinkDataListDetails + struct PERF_TALER_EXCHANGEDB_CMD_getLinkDataListDetails { /** * The refresh session hash @@ -1234,9 +1234,9 @@ union PERF_TALER_MINTDB_CMD_Details } get_link_data_list; /** - * Data requiered by the #PERF_TALER_MINTDB_CMD_GET_TRANSFER command + * Data requiered by the #PERF_TALER_EXCHANGEDB_CMD_GET_TRANSFER command */ - struct PERF_TALER_MINTDB_CMD_getTransferDetails + struct PERF_TALER_EXCHANGEDB_CMD_getTransferDetails { /** * The refresh session hash @@ -1251,12 +1251,12 @@ union PERF_TALER_MINTDB_CMD_Details /** * Command to be interpreted. */ -struct PERF_TALER_MINTDB_Cmd +struct PERF_TALER_EXCHANGEDB_Cmd { /** * Type of the command */ - enum PERF_TALER_MINTDB_CMD_Name command; + enum PERF_TALER_EXCHANGEDB_CMD_Name command; /** * Label to refer to the command @@ -1266,12 +1266,12 @@ struct PERF_TALER_MINTDB_Cmd /** * Command specific data */ - union PERF_TALER_MINTDB_CMD_Details details; + union PERF_TALER_EXCHANGEDB_CMD_Details details; /** * Data easily accessible */ - struct PERF_TALER_MINTDB_Data exposed; + struct PERF_TALER_EXCHANGEDB_Data exposed; }; @@ -1286,10 +1286,10 @@ struct PERF_TALER_MINTDB_Cmd * @return GNUNET_OK upon success; GNUNET_SYSERR upon failure */ int -PERF_TALER_MINTDB_run_benchmark (const char *benchmark_name, +PERF_TALER_EXCHANGEDB_run_benchmark (const char *benchmark_name, const char *configuration_file, - struct PERF_TALER_MINTDB_Cmd *init, - struct PERF_TALER_MINTDB_Cmd *benchmark); + struct PERF_TALER_EXCHANGEDB_Cmd *init, + struct PERF_TALER_EXCHANGEDB_Cmd *benchmark); /** @@ -1300,9 +1300,9 @@ PERF_TALER_MINTDB_run_benchmark (const char *benchmark_name, * @param cmd the commands to run */ int -PERF_TALER_MINTDB_interpret( - struct TALER_MINTDB_Plugin *db_plugin, - struct PERF_TALER_MINTDB_Cmd cmd[]); +PERF_TALER_EXCHANGEDB_interpret( + struct TALER_EXCHANGEDB_Plugin *db_plugin, + struct PERF_TALER_EXCHANGEDB_Cmd cmd[]); /** @@ -1314,6 +1314,6 @@ PERF_TALER_MINTDB_interpret( * @return #GNUNET_OK is @a cmd is correct; #GNUNET_SYSERR if it is'nt */ int -PERF_TALER_MINTDB_check (const struct PERF_TALER_MINTDB_Cmd *cmd); +PERF_TALER_EXCHANGEDB_check (const struct PERF_TALER_EXCHANGEDB_Cmd *cmd); #endif diff --git a/src/mintdb/perf_taler_mintdb_values.h b/src/exchangedb/perf_taler_exchangedb_values.h similarity index 85% rename from src/mintdb/perf_taler_mintdb_values.h rename to src/exchangedb/perf_taler_exchangedb_values.h index 35f87f5b0..c3b50fea2 100644 --- a/src/mintdb/perf_taler_mintdb_values.h +++ b/src/exchangedb/perf_taler_exchangedb_values.h @@ -14,12 +14,12 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file mintdb/perf_taler_mintdb_values.h + * @file exchangedb/perf_taler_exchangedb_values.h * @brief Values for tweaking the performance analysis * @author Nicolas Fournier */ -#ifndef __PERF_TALER_MINTDB__VALUES_H__ -#define __PERF_TALER_MINTDB__VALUES_H__ +#ifndef __PERF_TALER_EXCHANGEDB__VALUES_H__ +#define __PERF_TALER_EXCHANGEDB__VALUES_H__ #endif diff --git a/src/mintdb/plugin_mintdb_common.c b/src/exchangedb/plugin_exchangedb_common.c similarity index 82% rename from src/mintdb/plugin_mintdb_common.c rename to src/exchangedb/plugin_exchangedb_common.c index 1f2fdc58b..c8e689cfd 100644 --- a/src/mintdb/plugin_mintdb_common.c +++ b/src/exchangedb/plugin_exchangedb_common.c @@ -14,7 +14,7 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file mintdb/plugin_mintdb_common.c + * @file exchangedb/plugin_exchangedb_common.c * @brief Functions shared across plugins, this file is meant to be * included in each plugin. * @author Christian Grothoff @@ -28,23 +28,23 @@ */ static void common_free_reserve_history (void *cls, - struct TALER_MINTDB_ReserveHistory *rh) + struct TALER_EXCHANGEDB_ReserveHistory *rh) { - struct TALER_MINTDB_BankTransfer *bt; - struct TALER_MINTDB_CollectableBlindcoin *cbc; - struct TALER_MINTDB_ReserveHistory *backref; + struct TALER_EXCHANGEDB_BankTransfer *bt; + struct TALER_EXCHANGEDB_CollectableBlindcoin *cbc; + struct TALER_EXCHANGEDB_ReserveHistory *backref; while (NULL != rh) { switch(rh->type) { - case TALER_MINTDB_RO_BANK_TO_MINT: + case TALER_EXCHANGEDB_RO_BANK_TO_EXCHANGE: bt = rh->details.bank; if (NULL != bt->wire) json_decref (bt->wire); GNUNET_free (bt); break; - case TALER_MINTDB_RO_WITHDRAW_COIN: + case TALER_EXCHANGEDB_RO_WITHDRAW_COIN: cbc = rh->details.withdraw; GNUNET_CRYPTO_rsa_signature_free (cbc->sig.rsa_signature); GNUNET_CRYPTO_rsa_public_key_free (cbc->denom_pub.rsa_public_key); @@ -66,9 +66,9 @@ common_free_reserve_history (void *cls, */ static void common_free_link_data_list (void *cls, - struct TALER_MINTDB_LinkDataList *ldl) + struct TALER_EXCHANGEDB_LinkDataList *ldl) { - struct TALER_MINTDB_LinkDataList *next; + struct TALER_EXCHANGEDB_LinkDataList *next; while (NULL != ldl) { @@ -88,9 +88,9 @@ common_free_link_data_list (void *cls, */ static void common_free_coin_transaction_list (void *cls, - struct TALER_MINTDB_TransactionList *list) + struct TALER_EXCHANGEDB_TransactionList *list) { - struct TALER_MINTDB_TransactionList *next; + struct TALER_EXCHANGEDB_TransactionList *next; while (NULL != list) { @@ -98,13 +98,13 @@ common_free_coin_transaction_list (void *cls, switch (list->type) { - case TALER_MINTDB_TT_DEPOSIT: + case TALER_EXCHANGEDB_TT_DEPOSIT: json_decref (list->details.deposit->wire); GNUNET_CRYPTO_rsa_public_key_free (list->details.deposit->coin.denom_pub.rsa_public_key); GNUNET_CRYPTO_rsa_signature_free (list->details.deposit->coin.denom_sig.rsa_signature); GNUNET_free (list->details.deposit); break; - case TALER_MINTDB_TT_REFRESH_MELT: + case TALER_EXCHANGEDB_TT_REFRESH_MELT: GNUNET_free (list->details.melt); break; } @@ -122,7 +122,7 @@ common_free_coin_transaction_list (void *cls, */ static void common_free_melt_commitment (void *cls, - struct TALER_MINTDB_MeltCommitment *mc) + struct TALER_EXCHANGEDB_MeltCommitment *mc) { unsigned int i; unsigned int k; @@ -159,4 +159,4 @@ common_free_melt_commitment (void *cls, GNUNET_free (mc); } -/* end of plugin_mintdb_common.c */ +/* end of plugin_exchangedb_common.c */ diff --git a/src/mintdb/plugin_mintdb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c similarity index 94% rename from src/mintdb/plugin_mintdb_postgres.c rename to src/exchangedb/plugin_exchangedb_postgres.c index 772b86e83..0395c208e 100644 --- a/src/mintdb/plugin_mintdb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -15,19 +15,19 @@ */ /** - * @file plugin_mintdb_postgres.c - * @brief Low-level (statement-level) Postgres database access for the mint + * @file plugin_exchangedb_postgres.c + * @brief Low-level (statement-level) Postgres database access for the exchange * @author Florian Dold * @author Christian Grothoff * @author Sree Harsha Totakura */ #include "platform.h" #include "taler_pq_lib.h" -#include "taler_mintdb_plugin.h" +#include "taler_exchangedb_plugin.h" #include #include -#include "plugin_mintdb_common.c" +#include "plugin_exchangedb_common.c" /** * For testing / experiments, we set the Postgres schema to @@ -107,7 +107,7 @@ /** * Handle for a database session (per-thread, for transactions). */ -struct TALER_MINTDB_Session +struct TALER_EXCHANGEDB_Session { /** * Postgres connection handle. @@ -165,7 +165,7 @@ set_temporary_schema (PGconn *db) */ static int postgres_drop_temporary (void *cls, - struct TALER_MINTDB_Session *session) + struct TALER_EXCHANGEDB_Session *session) { GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Dropping temporary tables\n"); @@ -277,7 +277,7 @@ postgres_create_tables (void *cls, funds are added and existing funds are withdrawn. The 'expiration_date' can be used to eventually get rid of reserves that have not been used for a very long time (either by refunding the owner or by greedily - grabbing the money, depending on the Mint's terms of service) */ + grabbing the money, depending on the Exchange's terms of service) */ SQLEXEC ("CREATE TABLE IF NOT EXISTS reserves" "(reserve_pub BYTEA PRIMARY KEY" ",current_balance_val INT8 NOT NULL" @@ -422,7 +422,7 @@ postgres_create_tables (void *cls, ",newcoin_index INT2 NOT NULL" ",ev_sig BYTEA NOT NULL" ")"); - /* This table contains the wire transfers the mint is supposed to + /* This table contains the wire transfers the exchange is supposed to execute to transmit funds to the merchants (and manage refunds). */ SQLEXEC("CREATE TABLE IF NOT EXISTS deposits " "(serial_id BIGSERIAL PRIMARY KEY" @@ -475,7 +475,7 @@ postgres_create_tables (void *cls, "ON aggregation_tracking(coin_pub,h_contract,h_wire,transaction_id,merchant_pub)"); /* This table contains the pre-commit data for - wire transfers the mint is about to execute. */ + wire transfers the exchange is about to execute. */ SQLEXEC("CREATE TABLE IF NOT EXISTS prewire " "(serial_id BIGSERIAL PRIMARY KEY" ",type TEXT NOT NULL" @@ -726,7 +726,7 @@ postgres_prepare (PGconn *db_conn) /* Used in #postgres_get_known_coin() to fetch the denomination public key and signature for - a coin known to the mint. */ + a coin known to the exchange. */ PREPARE ("get_known_coin", "SELECT" " denom_pub" @@ -737,7 +737,7 @@ postgres_prepare (PGconn *db_conn) /* Used in #postgres_insert_known_coin() to store the denomination public key and signature for - a coin known to the mint. */ + a coin known to the exchange. */ PREPARE ("insert_known_coin", "INSERT INTO known_coins " "(coin_pub" @@ -863,7 +863,7 @@ postgres_prepare (PGconn *db_conn) " WHERE session_hash=$1 AND cnc_index=$2 AND newcoin_index=$3", 3, NULL); - /* Store information about a /deposit the mint is to execute. + /* Store information about a /deposit the exchange is to execute. Used in #postgres_insert_deposit(). */ PREPARE ("insert_deposit", "INSERT INTO deposits " @@ -1038,7 +1038,7 @@ postgres_prepare (PGconn *db_conn) have another constraint to ensure we get each triplet with matching "newcoin_index" values. NOTE: This may return many results, both for different sessions and for the different coins - being minted in the refresh ops. NOTE: There may be more + being exchangeed in the refresh ops. NOTE: There may be more efficient ways to express the same query. */ PREPARE ("get_link", "SELECT link_vector_enc,ev_sig,ro.denom_pub" @@ -1175,7 +1175,7 @@ postgres_prepare (PGconn *db_conn) static void db_conn_destroy (void *cls) { - struct TALER_MINTDB_Session *session = cls; + struct TALER_EXCHANGEDB_Session *session = cls; PGconn *db_conn = session->conn; if (NULL != db_conn) @@ -1193,13 +1193,13 @@ db_conn_destroy (void *cls) * database default one * @return the database connection, or NULL on error */ -static struct TALER_MINTDB_Session * +static struct TALER_EXCHANGEDB_Session * postgres_get_session (void *cls, int temporary) { struct PostgresClosure *pc = cls; PGconn *db_conn; - struct TALER_MINTDB_Session *session; + struct TALER_EXCHANGEDB_Session *session; if (NULL != (session = pthread_getspecific (pc->db_conn_threadlocal))) return session; @@ -1230,7 +1230,7 @@ postgres_get_session (void *cls, GNUNET_break (0); return NULL; } - session = GNUNET_new (struct TALER_MINTDB_Session); + session = GNUNET_new (struct TALER_EXCHANGEDB_Session); session->conn = db_conn; if (0 != pthread_setspecific (pc->db_conn_threadlocal, session)) @@ -1253,7 +1253,7 @@ postgres_get_session (void *cls, */ static int postgres_start (void *cls, - struct TALER_MINTDB_Session *session) + struct TALER_EXCHANGEDB_Session *session) { PGresult *result; @@ -1283,7 +1283,7 @@ postgres_start (void *cls, */ static void postgres_rollback (void *cls, - struct TALER_MINTDB_Session *session) + struct TALER_EXCHANGEDB_Session *session) { PGresult *result; @@ -1304,7 +1304,7 @@ postgres_rollback (void *cls, */ static int postgres_commit (void *cls, - struct TALER_MINTDB_Session *session) + struct TALER_EXCHANGEDB_Session *session) { PGresult *result; @@ -1358,9 +1358,9 @@ postgres_commit (void *cls, */ static int postgres_insert_denomination_info (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_DenominationPublicKey *denom_pub, - const struct TALER_MINTDB_DenominationKeyInformationP *issue) + const struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue) { PGresult *result; int ret; @@ -1418,9 +1418,9 @@ postgres_insert_denomination_info (void *cls, */ static int postgres_get_denomination_info (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_DenominationPublicKey *denom_pub, - struct TALER_MINTDB_DenominationKeyInformationP *issue) + struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue) { PGresult *result; struct GNUNET_PQ_QueryParam params[] = { @@ -1504,8 +1504,8 @@ postgres_get_denomination_info (void *cls, */ static int postgres_reserve_get (void *cls, - struct TALER_MINTDB_Session *session, - struct TALER_MINTDB_Reserve *reserve) + struct TALER_EXCHANGEDB_Session *session, + struct TALER_EXCHANGEDB_Reserve *reserve) { PGresult *result; struct GNUNET_PQ_QueryParam params[] = { @@ -1559,8 +1559,8 @@ postgres_reserve_get (void *cls, */ static int reserves_update (void *cls, - struct TALER_MINTDB_Session *session, - const struct TALER_MINTDB_Reserve *reserve) + struct TALER_EXCHANGEDB_Session *session, + const struct TALER_EXCHANGEDB_Reserve *reserve) { PGresult *result; int ret; @@ -1608,7 +1608,7 @@ reserves_update (void *cls, */ static int postgres_reserves_in_insert (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *balance, struct GNUNET_TIME_Absolute execution_time, @@ -1616,7 +1616,7 @@ postgres_reserves_in_insert (void *cls, { PGresult *result; int reserve_exists; - struct TALER_MINTDB_Reserve reserve; + struct TALER_EXCHANGEDB_Reserve reserve; struct GNUNET_TIME_Absolute expiry; if (GNUNET_OK != postgres_start (cls, @@ -1711,7 +1711,7 @@ postgres_reserves_in_insert (void *cls, otherwise we might have to actually pay the cost to roll this back for duplicate transactions; like this, we should virtually never actually have to rollback anything. */ - struct TALER_MINTDB_Reserve updated_reserve; + struct TALER_EXCHANGEDB_Reserve updated_reserve; updated_reserve.pub = reserve.pub; if (GNUNET_OK != @@ -1759,9 +1759,9 @@ postgres_reserves_in_insert (void *cls, */ static int postgres_get_withdraw_info (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *h_blind, - struct TALER_MINTDB_CollectableBlindcoin *collectable) + struct TALER_EXCHANGEDB_CollectableBlindcoin *collectable) { PGresult *result; struct GNUNET_PQ_QueryParam params[] = { @@ -1832,11 +1832,11 @@ postgres_get_withdraw_info (void *cls, */ static int postgres_insert_withdraw_info (void *cls, - struct TALER_MINTDB_Session *session, - const struct TALER_MINTDB_CollectableBlindcoin *collectable) + struct TALER_EXCHANGEDB_Session *session, + const struct TALER_EXCHANGEDB_CollectableBlindcoin *collectable) { PGresult *result; - struct TALER_MINTDB_Reserve reserve; + struct TALER_EXCHANGEDB_Reserve reserve; int ret = GNUNET_SYSERR; struct GNUNET_TIME_Absolute now; struct GNUNET_TIME_Absolute expiry; @@ -1906,14 +1906,14 @@ postgres_insert_withdraw_info (void *cls, * @param reserve_pub public key of the reserve * @return known transaction history (NULL if reserve is unknown) */ -static struct TALER_MINTDB_ReserveHistory * +static struct TALER_EXCHANGEDB_ReserveHistory * postgres_get_reserve_history (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_ReservePublicKeyP *reserve_pub) { PGresult *result; - struct TALER_MINTDB_ReserveHistory *rh; - struct TALER_MINTDB_ReserveHistory *rh_tail; + struct TALER_EXCHANGEDB_ReserveHistory *rh; + struct TALER_EXCHANGEDB_ReserveHistory *rh_tail; int rows; int ret; @@ -1921,7 +1921,7 @@ postgres_get_reserve_history (void *cls, rh_tail = NULL; ret = GNUNET_SYSERR; { - struct TALER_MINTDB_BankTransfer *bt; + struct TALER_EXCHANGEDB_BankTransfer *bt; struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_auto_from_type (reserve_pub), GNUNET_PQ_query_param_end @@ -1943,7 +1943,7 @@ postgres_get_reserve_history (void *cls, } while (0 < rows) { - bt = GNUNET_new (struct TALER_MINTDB_BankTransfer); + bt = GNUNET_new (struct TALER_EXCHANGEDB_BankTransfer); { struct GNUNET_PQ_ResultSpec rs[] = { TALER_PQ_result_spec_amount ("balance", @@ -1966,15 +1966,15 @@ postgres_get_reserve_history (void *cls, bt->reserve_pub = *reserve_pub; if (NULL != rh_tail) { - rh_tail->next = GNUNET_new (struct TALER_MINTDB_ReserveHistory); + rh_tail->next = GNUNET_new (struct TALER_EXCHANGEDB_ReserveHistory); rh_tail = rh_tail->next; } else { - rh_tail = GNUNET_new (struct TALER_MINTDB_ReserveHistory); + rh_tail = GNUNET_new (struct TALER_EXCHANGEDB_ReserveHistory); rh = rh_tail; } - rh_tail->type = TALER_MINTDB_RO_BANK_TO_MINT; + rh_tail->type = TALER_EXCHANGEDB_RO_BANK_TO_EXCHANGE; rh_tail->details.bank = bt; } PQclear (result); @@ -2000,9 +2000,9 @@ postgres_get_reserve_history (void *cls, rows = PQntuples (result); while (0 < rows) { - struct TALER_MINTDB_CollectableBlindcoin *cbc; + struct TALER_EXCHANGEDB_CollectableBlindcoin *cbc; - cbc = GNUNET_new (struct TALER_MINTDB_CollectableBlindcoin); + cbc = GNUNET_new (struct TALER_EXCHANGEDB_CollectableBlindcoin); { struct GNUNET_PQ_ResultSpec rs[] = { GNUNET_PQ_result_spec_auto_from_type ("h_blind_ev", @@ -2029,9 +2029,9 @@ postgres_get_reserve_history (void *cls, } cbc->reserve_pub = *reserve_pub; } - rh_tail->next = GNUNET_new (struct TALER_MINTDB_ReserveHistory); + rh_tail->next = GNUNET_new (struct TALER_EXCHANGEDB_ReserveHistory); rh_tail = rh_tail->next; - rh_tail->type = TALER_MINTDB_RO_WITHDRAW_COIN; + rh_tail->type = TALER_EXCHANGEDB_RO_WITHDRAW_COIN; rh_tail->details.withdraw = cbc; } ret = GNUNET_OK; @@ -2060,8 +2060,8 @@ postgres_get_reserve_history (void *cls, */ static int postgres_have_deposit (void *cls, - struct TALER_MINTDB_Session *session, - const struct TALER_MINTDB_Deposit *deposit) + struct TALER_EXCHANGEDB_Session *session, + const struct TALER_EXCHANGEDB_Deposit *deposit) { struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_auto_from_type (&deposit->coin.coin_pub), @@ -2090,7 +2090,7 @@ postgres_have_deposit (void *cls, /* Now we check that the other information in @a deposit also matches, and if not report inconsistencies. */ { - struct TALER_MINTDB_Deposit deposit2; + struct TALER_EXCHANGEDB_Deposit deposit2; struct GNUNET_PQ_ResultSpec rs[] = { TALER_PQ_result_spec_amount ("amount_with_fee", &deposit2.amount_with_fee), @@ -2151,7 +2151,7 @@ postgres_have_deposit (void *cls, */ static int postgres_mark_deposit_tiny (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, unsigned long long rowid) { uint64_t serial_id = rowid; @@ -2188,7 +2188,7 @@ postgres_mark_deposit_tiny (void *cls, */ static int postgres_mark_deposit_done (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, unsigned long long rowid) { uint64_t serial_id = rowid; @@ -2227,8 +2227,8 @@ postgres_mark_deposit_done (void *cls, */ static int postgres_get_ready_deposit (void *cls, - struct TALER_MINTDB_Session *session, - TALER_MINTDB_DepositIterator deposit_cb, + struct TALER_EXCHANGEDB_Session *session, + TALER_EXCHANGEDB_DepositIterator deposit_cb, void *deposit_cb_cls) { struct GNUNET_PQ_QueryParam params[] = { @@ -2325,10 +2325,10 @@ postgres_get_ready_deposit (void *cls, */ static int postgres_iterate_matching_deposits (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *h_wire, const struct TALER_MerchantPublicKeyP *merchant_pub, - TALER_MINTDB_DepositIterator deposit_cb, + TALER_EXCHANGEDB_DepositIterator deposit_cb, void *deposit_cb_cls, uint32_t limit) { @@ -2425,8 +2425,8 @@ postgres_iterate_matching_deposits (void *cls, */ static int postgres_insert_deposit (void *cls, - struct TALER_MINTDB_Session *session, - const struct TALER_MINTDB_Deposit *deposit) + struct TALER_EXCHANGEDB_Session *session, + const struct TALER_EXCHANGEDB_Deposit *deposit) { PGresult *result; int ret; @@ -2481,9 +2481,9 @@ postgres_insert_deposit (void *cls, */ static int postgres_get_refresh_session (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, - struct TALER_MINTDB_RefreshSession *refresh_session) + struct TALER_EXCHANGEDB_RefreshSession *refresh_session) { PGresult *result; struct GNUNET_PQ_QueryParam params[] = { @@ -2515,7 +2515,7 @@ postgres_get_refresh_session (void *cls, } memset (refresh_session, 0, - sizeof (struct TALER_MINTDB_RefreshSession)); + sizeof (struct TALER_EXCHANGEDB_RefreshSession)); { struct GNUNET_PQ_ResultSpec rs[] = { GNUNET_PQ_result_spec_uint16 ("num_oldcoins", @@ -2551,9 +2551,9 @@ postgres_get_refresh_session (void *cls, */ static int postgres_create_refresh_session (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, - const struct TALER_MINTDB_RefreshSession *refresh_session) + const struct TALER_EXCHANGEDB_RefreshSession *refresh_session) { PGresult *result; struct GNUNET_PQ_QueryParam params[] = { @@ -2589,7 +2589,7 @@ postgres_create_refresh_session (void *cls, */ static int insert_known_coin (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_CoinPublicInfo *coin_info) { PGresult *result; @@ -2626,7 +2626,7 @@ insert_known_coin (void *cls, */ static int get_known_coin (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_CoinSpendPublicKeyP *coin_pub, struct TALER_CoinPublicInfo *coin_info) { @@ -2691,9 +2691,9 @@ get_known_coin (void *cls, */ static int postgres_insert_refresh_melt (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, uint16_t oldcoin_index, - const struct TALER_MINTDB_RefreshMelt *melt) + const struct TALER_EXCHANGEDB_RefreshMelt *melt) { PGresult *result; struct GNUNET_PQ_QueryParam params[] = { @@ -2756,10 +2756,10 @@ postgres_insert_refresh_melt (void *cls, */ static int postgres_get_refresh_melt (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t oldcoin_index, - struct TALER_MINTDB_RefreshMelt *melt) + struct TALER_EXCHANGEDB_RefreshMelt *melt) { PGresult *result; struct TALER_CoinPublicInfo coin; @@ -2843,7 +2843,7 @@ postgres_get_refresh_melt (void *cls, */ static int postgres_insert_refresh_order (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t num_newcoins, const struct TALER_DenominationPublicKey *denom_pubs) @@ -2918,7 +2918,7 @@ free_dpk_result (struct TALER_DenominationPublicKey *denom_pubs, */ static int postgres_get_refresh_order (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t num_newcoins, struct TALER_DenominationPublicKey *denom_pubs) @@ -2992,11 +2992,11 @@ postgres_get_refresh_order (void *cls, */ static int postgres_insert_refresh_commit_coins (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t cnc_index, uint16_t num_newcoins, - const struct TALER_MINTDB_RefreshCommitCoin *commit_coins) + const struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coins) { char *rle; size_t rle_size; @@ -3056,7 +3056,7 @@ postgres_insert_refresh_commit_coins (void *cls, * @param commit_coins_len length of @a commit_coins array */ static void -free_cc_result (struct TALER_MINTDB_RefreshCommitCoin *commit_coins, +free_cc_result (struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coins, unsigned int commit_coins_len) { unsigned int i; @@ -3088,11 +3088,11 @@ free_cc_result (struct TALER_MINTDB_RefreshCommitCoin *commit_coins, */ static int postgres_get_refresh_commit_coins (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t cnc_index, uint16_t num_newcoins, - struct TALER_MINTDB_RefreshCommitCoin *commit_coins) + struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coins) { unsigned int i; @@ -3180,7 +3180,7 @@ postgres_get_refresh_commit_coins (void *cls, */ static int postgres_insert_refresh_commit_links (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t cnc_index, uint16_t num_links, @@ -3236,7 +3236,7 @@ postgres_insert_refresh_commit_links (void *cls, */ static int postgres_get_refresh_commit_links (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t cnc_index, uint16_t num_links, @@ -3299,13 +3299,13 @@ postgres_get_refresh_commit_links (void *cls, * @return NULL if the @a session_hash does not correspond to any known melt * operation */ -static struct TALER_MINTDB_MeltCommitment * +static struct TALER_EXCHANGEDB_MeltCommitment * postgres_get_melt_commitment (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash) { - struct TALER_MINTDB_RefreshSession rs; - struct TALER_MINTDB_MeltCommitment *mc; + struct TALER_EXCHANGEDB_RefreshSession rs; + struct TALER_EXCHANGEDB_MeltCommitment *mc; uint16_t cnc_index; unsigned int i; @@ -3315,11 +3315,11 @@ postgres_get_melt_commitment (void *cls, session_hash, &rs)) return NULL; - mc = GNUNET_new (struct TALER_MINTDB_MeltCommitment); + mc = GNUNET_new (struct TALER_EXCHANGEDB_MeltCommitment); mc->num_newcoins = rs.num_newcoins; mc->num_oldcoins = rs.num_oldcoins; mc->melts = GNUNET_malloc (mc->num_oldcoins * - sizeof (struct TALER_MINTDB_RefreshMelt)); + sizeof (struct TALER_EXCHANGEDB_RefreshMelt)); for (i=0;inum_oldcoins;i++) if (GNUNET_OK != postgres_get_refresh_melt (cls, @@ -3341,7 +3341,7 @@ postgres_get_melt_commitment (void *cls, { mc->commit_coins[cnc_index] = GNUNET_malloc (mc->num_newcoins * - sizeof (struct TALER_MINTDB_RefreshCommitCoin)); + sizeof (struct TALER_EXCHANGEDB_RefreshCommitCoin)); if (GNUNET_OK != postgres_get_refresh_commit_coins (cls, session, @@ -3385,7 +3385,7 @@ postgres_get_melt_commitment (void *cls, */ static int postgres_insert_refresh_out (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t newcoin_index, const struct TALER_DenominationSignature *ev_sig) @@ -3421,13 +3421,13 @@ postgres_insert_refresh_out (void *cls, * @param session_hash refresh session to get linkage data for * @return all known link data for the session */ -static struct TALER_MINTDB_LinkDataList * +static struct TALER_EXCHANGEDB_LinkDataList * postgres_get_link_data_list (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash) { - struct TALER_MINTDB_LinkDataList *ldl; - struct TALER_MINTDB_LinkDataList *pos; + struct TALER_EXCHANGEDB_LinkDataList *ldl; + struct TALER_EXCHANGEDB_LinkDataList *pos; int i; int nrows; struct GNUNET_PQ_QueryParam params[] = { @@ -3492,7 +3492,7 @@ postgres_get_link_data_list (void *cls, link_enc = TALER_refresh_link_encrypted_decode (ld_buf, ld_buf_size); GNUNET_free (ld_buf); - pos = GNUNET_new (struct TALER_MINTDB_LinkDataList); + pos = GNUNET_new (struct TALER_EXCHANGEDB_LinkDataList); pos->next = ldl; pos->link_data_enc = link_enc; pos->denom_pub.rsa_public_key = denom_pub; @@ -3520,9 +3520,9 @@ postgres_get_link_data_list (void *cls, */ static int postgres_get_transfer (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_CoinSpendPublicKeyP *coin_pub, - TALER_MINTDB_TransferDataCallback tdc, + TALER_EXCHANGEDB_TransferDataCallback tdc, void *tdc_cls) { struct GNUNET_PQ_QueryParam params[] = { @@ -3588,12 +3588,12 @@ postgres_get_transfer (void *cls, * @param coin_pub coin to investigate * @return list of transactions, NULL if coin is fresh */ -static struct TALER_MINTDB_TransactionList * +static struct TALER_EXCHANGEDB_TransactionList * postgres_get_coin_transactions (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_CoinSpendPublicKeyP *coin_pub) { - struct TALER_MINTDB_TransactionList *head; + struct TALER_EXCHANGEDB_TransactionList *head; head = NULL; /* check deposits */ @@ -3605,7 +3605,7 @@ postgres_get_coin_transactions (void *cls, int nrows; int i; PGresult *result; - struct TALER_MINTDB_TransactionList *tl; + struct TALER_EXCHANGEDB_TransactionList *tl; result = GNUNET_PQ_exec_prepared (session->conn, "get_deposit_with_coin_pub", @@ -3619,9 +3619,9 @@ postgres_get_coin_transactions (void *cls, nrows = PQntuples (result); for (i = 0; i < nrows; i++) { - struct TALER_MINTDB_Deposit *deposit; + struct TALER_EXCHANGEDB_Deposit *deposit; - deposit = GNUNET_new (struct TALER_MINTDB_Deposit); + deposit = GNUNET_new (struct TALER_EXCHANGEDB_Deposit); { struct GNUNET_PQ_ResultSpec rs[] = { GNUNET_PQ_result_spec_rsa_public_key ("denom_pub", @@ -3661,9 +3661,9 @@ postgres_get_coin_transactions (void *cls, } deposit->coin.coin_pub = *coin_pub; } - tl = GNUNET_new (struct TALER_MINTDB_TransactionList); + tl = GNUNET_new (struct TALER_EXCHANGEDB_TransactionList); tl->next = head; - tl->type = TALER_MINTDB_TT_DEPOSIT; + tl->type = TALER_EXCHANGEDB_TT_DEPOSIT; tl->details.deposit = deposit; head = tl; continue; @@ -3679,7 +3679,7 @@ postgres_get_coin_transactions (void *cls, int nrows; int i; PGresult *result; - struct TALER_MINTDB_TransactionList *tl; + struct TALER_EXCHANGEDB_TransactionList *tl; /* check if the melt record exists and get it */ result = GNUNET_PQ_exec_prepared (session->conn, @@ -3694,9 +3694,9 @@ postgres_get_coin_transactions (void *cls, nrows = PQntuples (result); for (i=0;icoin.coin_pub = *coin_pub; } - tl = GNUNET_new (struct TALER_MINTDB_TransactionList); + tl = GNUNET_new (struct TALER_EXCHANGEDB_TransactionList); tl->next = head; - tl->type = TALER_MINTDB_TT_REFRESH_MELT; + tl->type = TALER_EXCHANGEDB_TT_REFRESH_MELT; tl->details.melt = melt; head = tl; continue; @@ -3752,9 +3752,9 @@ postgres_get_coin_transactions (void *cls, */ static int postgres_lookup_wire_transfer (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_WireTransferIdentifierRawP *wtid, - TALER_MINTDB_WireTransferDataCallback cb, + TALER_EXCHANGEDB_WireTransferDataCallback cb, void *cb_cls) { PGresult *result; @@ -3843,13 +3843,13 @@ postgres_lookup_wire_transfer (void *cls, */ static int postgres_wire_lookup_deposit_wtid (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *h_contract, const struct GNUNET_HashCode *h_wire, const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_MerchantPublicKeyP *merchant_pub, uint64_t transaction_id, - TALER_MINTDB_DepositWtidCallback cb, + TALER_EXCHANGEDB_DepositWtidCallback cb, void *cb_cls) { PGresult *result; @@ -3987,12 +3987,12 @@ postgres_wire_lookup_deposit_wtid (void *cls, * @param transaction_id merchant's transaction ID for the payment * @param coin_pub which public key was this payment about * @param coin_value amount contributed by this coin in total - * @param coin_fee deposit fee charged by mint for this coin + * @param coin_fee deposit fee charged by exchange for this coin * @return #GNUNET_OK on success, #GNUNET_SYSERR on DB errors */ static int postgres_insert_aggregation_tracking (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_WireTransferIdentifierRawP *wtid, const struct TALER_MerchantPublicKeyP *merchant_pub, const struct GNUNET_HashCode *h_wire, @@ -4049,7 +4049,7 @@ postgres_insert_aggregation_tracking (void *cls, */ static int postgres_wire_prepare_data_insert (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const char *type, const char *buf, size_t buf_size) @@ -4085,7 +4085,7 @@ postgres_wire_prepare_data_insert (void *cls, */ static int postgres_wire_prepare_data_mark_finished (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, unsigned long long rowid) { uint64_t serial_id = rowid; @@ -4125,9 +4125,9 @@ postgres_wire_prepare_data_mark_finished (void *cls, */ static int postgres_wire_prepare_data_get (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const char *type, - TALER_MINTDB_WirePreparationCallback cb, + TALER_EXCHANGEDB_WirePreparationCallback cb, void *cb_cls) { PGresult *result; @@ -4194,14 +4194,14 @@ postgres_wire_prepare_data_get (void *cls, * Initialize Postgres database subsystem. * * @param cls a configuration instance - * @return NULL on error, otherwise a `struct TALER_MINTDB_Plugin` + * @return NULL on error, otherwise a `struct TALER_EXCHANGEDB_Plugin` */ void * -libtaler_plugin_mintdb_postgres_init (void *cls) +libtaler_plugin_exchangedb_postgres_init (void *cls) { struct GNUNET_CONFIGURATION_Handle *cfg = cls; struct PostgresClosure *pg; - struct TALER_MINTDB_Plugin *plugin; + struct TALER_EXCHANGEDB_Plugin *plugin; pg = GNUNET_new (struct PostgresClosure); @@ -4214,17 +4214,17 @@ libtaler_plugin_mintdb_postgres_init (void *cls) } if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, - "mintdb-postgres", + "exchangedb-postgres", "db_conn_str", &pg->connection_cfg_str)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "mintdb-postgres", + "exchangedb-postgres", "db_conn_str"); GNUNET_free (pg); return NULL; } - plugin = GNUNET_new (struct TALER_MINTDB_Plugin); + plugin = GNUNET_new (struct TALER_EXCHANGEDB_Plugin); plugin->cls = pg; plugin->get_session = &postgres_get_session; plugin->drop_temporary = &postgres_drop_temporary; @@ -4277,13 +4277,13 @@ libtaler_plugin_mintdb_postgres_init (void *cls) /** * Shutdown Postgres database subsystem. * - * @param cls a `struct TALER_MINTDB_Plugin` + * @param cls a `struct TALER_EXCHANGEDB_Plugin` * @return NULL (always) */ void * -libtaler_plugin_mintdb_postgres_done (void *cls) +libtaler_plugin_exchangedb_postgres_done (void *cls) { - struct TALER_MINTDB_Plugin *plugin = cls; + struct TALER_EXCHANGEDB_Plugin *plugin = cls; struct PostgresClosure *pg = plugin->cls; GNUNET_free (pg->connection_cfg_str); @@ -4292,4 +4292,4 @@ libtaler_plugin_mintdb_postgres_done (void *cls) return NULL; } -/* end of plugin_mintdb_postgres.c */ +/* end of plugin_exchangedb_postgres.c */ diff --git a/src/mintdb/test-mint-db-postgres.conf b/src/exchangedb/test-exchange-db-postgres.conf similarity index 82% rename from src/mintdb/test-mint-db-postgres.conf rename to src/exchangedb/test-exchange-db-postgres.conf index 2bdb63eb0..0822bab44 100644 --- a/src/mintdb/test-mint-db-postgres.conf +++ b/src/exchangedb/test-exchange-db-postgres.conf @@ -1,8 +1,8 @@ -[mint] +[exchange] #The DB plugin to use DB = postgres -[mintdb-postgres] +[exchangedb-postgres] #The connection string the plugin has to use for connecting to the database DB_CONN_STR = postgres:///talercheck diff --git a/src/mintdb/test_mintdb.c b/src/exchangedb/test_exchangedb.c similarity index 93% rename from src/mintdb/test_mintdb.c rename to src/exchangedb/test_exchangedb.c index 0938f8fab..df1adf561 100644 --- a/src/mintdb/test_mintdb.c +++ b/src/exchangedb/test_exchangedb.c @@ -14,13 +14,13 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file mintdb/test_mintdb.c + * @file exchangedb/test_exchangedb.c * @brief test cases for DB interaction functions * @author Sree Harsha Totakura */ #include "platform.h" -#include "taler_mintdb_lib.h" -#include "taler_mintdb_plugin.h" +#include "taler_exchangedb_lib.h" +#include "taler_exchangedb_plugin.h" static int result; @@ -41,7 +41,7 @@ static int result; #define CURRENCY "EUR" -static struct TALER_MINTDB_Plugin *plugin; +static struct TALER_EXCHANGEDB_Plugin *plugin; /** * Checks if the given reserve has the given amount of balance and expiry @@ -55,13 +55,13 @@ static struct TALER_MINTDB_Plugin *plugin; * as the given parameters; #GNUNET_SYSERR if not */ static int -check_reserve (struct TALER_MINTDB_Session *session, +check_reserve (struct TALER_EXCHANGEDB_Session *session, const struct TALER_ReservePublicKeyP *pub, uint64_t value, uint32_t fraction, const char *currency) { - struct TALER_MINTDB_Reserve reserve; + struct TALER_EXCHANGEDB_Reserve reserve; reserve.pub = *pub; @@ -109,14 +109,14 @@ destroy_denom_key_pair (struct DenomKeyPair *dkp) */ static struct DenomKeyPair * create_denom_key_pair (unsigned int size, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_Amount *value, const struct TALER_Amount *fee_withdraw, const struct TALER_Amount *fee_deposit, const struct TALER_Amount *fee_refresh) { struct DenomKeyPair *dkp; - struct TALER_MINTDB_DenominationKeyIssueInformation dki; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation dki; dkp = GNUNET_new (struct DenomKeyPair); dkp->priv.rsa_private_key = GNUNET_CRYPTO_rsa_private_key_create (size); @@ -128,7 +128,7 @@ create_denom_key_pair (unsigned int size, are not properly initialized for this test. */ memset (&dki, 0, - sizeof (struct TALER_MINTDB_DenominationKeyIssueInformation)); + sizeof (struct TALER_EXCHANGEDB_DenominationKeyIssueInformation)); dki.denom_pub = dkp->pub; dki.issue.properties.start = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ()); dki.issue.properties.expire_withdraw = GNUNET_TIME_absolute_hton @@ -168,12 +168,12 @@ static struct TALER_Amount fee_refresh; static struct TALER_Amount amount_with_fee; static void -free_refresh_commit_coins_array(struct TALER_MINTDB_RefreshCommitCoin +free_refresh_commit_coins_array(struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coins, unsigned int size) { unsigned int cnt; - struct TALER_MINTDB_RefreshCommitCoin *ccoin; + struct TALER_EXCHANGEDB_RefreshCommitCoin *ccoin; struct TALER_RefreshLinkEncrypted *rlink; for (cnt = 0; cnt < size; cnt++) @@ -189,15 +189,15 @@ free_refresh_commit_coins_array(struct TALER_MINTDB_RefreshCommitCoin #define MELT_NEW_COINS 5 static int -test_refresh_commit_coins (struct TALER_MINTDB_Session *session, - struct TALER_MINTDB_RefreshSession *refresh_session, +test_refresh_commit_coins (struct TALER_EXCHANGEDB_Session *session, + struct TALER_EXCHANGEDB_RefreshSession *refresh_session, const struct GNUNET_HashCode *session_hash) { - struct TALER_MINTDB_RefreshCommitCoin *commit_coins; - struct TALER_MINTDB_RefreshCommitCoin *ret_commit_coins; - struct TALER_MINTDB_RefreshCommitCoin *a_ccoin; + struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coins; + struct TALER_EXCHANGEDB_RefreshCommitCoin *ret_commit_coins; + struct TALER_EXCHANGEDB_RefreshCommitCoin *a_ccoin; struct TALER_RefreshLinkEncrypted *a_rlink; - struct TALER_MINTDB_RefreshCommitCoin *b_ccoin; + struct TALER_EXCHANGEDB_RefreshCommitCoin *b_ccoin; struct TALER_RefreshLinkEncrypted *b_rlink; size_t size; unsigned int cnt; @@ -208,12 +208,12 @@ test_refresh_commit_coins (struct TALER_MINTDB_Session *session, ret = GNUNET_SYSERR; ret_commit_coins = NULL; commit_coins = GNUNET_new_array (MELT_NEW_COINS, - struct TALER_MINTDB_RefreshCommitCoin); + struct TALER_EXCHANGEDB_RefreshCommitCoin); cnc_index = (uint16_t) GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, GNUNET_MIN (MELT_NEW_COINS, UINT16_MAX)); for (cnt=0; cnt < MELT_NEW_COINS; cnt++) { - struct TALER_MINTDB_RefreshCommitCoin *ccoin; + struct TALER_EXCHANGEDB_RefreshCommitCoin *ccoin; struct TALER_RefreshLinkEncrypted *rlink; ccoin = &commit_coins[cnt]; size = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, @@ -241,7 +241,7 @@ test_refresh_commit_coins (struct TALER_MINTDB_Session *session, MELT_NEW_COINS, commit_coins)); ret_commit_coins = GNUNET_new_array (MELT_NEW_COINS, - struct TALER_MINTDB_RefreshCommitCoin); + struct TALER_EXCHANGEDB_RefreshCommitCoin); FAILIF (GNUNET_OK != plugin->get_refresh_commit_coins (plugin->cls, session, @@ -286,16 +286,16 @@ test_refresh_commit_coins (struct TALER_MINTDB_Session *session, * @return #GNUNET_OK if everything went well; #GNUNET_SYSERR if not */ static int -test_melting (struct TALER_MINTDB_Session *session) +test_melting (struct TALER_EXCHANGEDB_Session *session) { #define MELT_OLD_COINS 10 - struct TALER_MINTDB_RefreshSession refresh_session; - struct TALER_MINTDB_RefreshSession ret_refresh_session; + struct TALER_EXCHANGEDB_RefreshSession refresh_session; + struct TALER_EXCHANGEDB_RefreshSession ret_refresh_session; struct GNUNET_HashCode session_hash; struct DenomKeyPair *dkp; struct DenomKeyPair **new_dkp; /* struct TALER_CoinPublicInfo *coins; */ - struct TALER_MINTDB_RefreshMelt *melts; + struct TALER_EXCHANGEDB_RefreshMelt *melts; struct TALER_DenominationPublicKey *new_denom_pubs; struct TALER_DenominationPublicKey *ret_denom_pubs; unsigned int cnt; @@ -332,7 +332,7 @@ test_melting (struct TALER_MINTDB_Session *session) &fee_deposit, &fee_refresh); /* create MELT_OLD_COINS number of refresh melts */ - melts = GNUNET_new_array (MELT_OLD_COINS, struct TALER_MINTDB_RefreshMelt); + melts = GNUNET_new_array (MELT_OLD_COINS, struct TALER_EXCHANGEDB_RefreshMelt); for (cnt=0; cnt < MELT_OLD_COINS; cnt++) { RND_BLK (&melts[cnt].coin.coin_pub); @@ -352,7 +352,7 @@ test_melting (struct TALER_MINTDB_Session *session) } for (cnt = 0; cnt < MELT_OLD_COINS; cnt++) { - struct TALER_MINTDB_RefreshMelt ret_melt; + struct TALER_EXCHANGEDB_RefreshMelt ret_melt; FAILIF (GNUNET_OK != plugin->get_refresh_melt (plugin->cls, session, &session_hash, @@ -556,17 +556,17 @@ run (void *cls, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) { - struct TALER_MINTDB_Session *session; + struct TALER_EXCHANGEDB_Session *session; struct TALER_ReservePublicKeyP reserve_pub; struct DenomKeyPair *dkp; - struct TALER_MINTDB_CollectableBlindcoin cbc; - struct TALER_MINTDB_CollectableBlindcoin cbc2; - struct TALER_MINTDB_ReserveHistory *rh; - struct TALER_MINTDB_ReserveHistory *rh_head; - struct TALER_MINTDB_BankTransfer *bt; - struct TALER_MINTDB_CollectableBlindcoin *withdraw; - struct TALER_MINTDB_Deposit deposit; - struct TALER_MINTDB_Deposit deposit2; + struct TALER_EXCHANGEDB_CollectableBlindcoin cbc; + struct TALER_EXCHANGEDB_CollectableBlindcoin cbc2; + struct TALER_EXCHANGEDB_ReserveHistory *rh; + struct TALER_EXCHANGEDB_ReserveHistory *rh_head; + struct TALER_EXCHANGEDB_BankTransfer *bt; + struct TALER_EXCHANGEDB_CollectableBlindcoin *withdraw; + struct TALER_EXCHANGEDB_Deposit deposit; + struct TALER_EXCHANGEDB_Deposit deposit2; struct TALER_WireTransferIdentifierRawP wtid; json_t *wire; json_t *just; @@ -587,7 +587,7 @@ run (void *cls, ZR_BLK (&cbc); ZR_BLK (&cbc2); if (NULL == - (plugin = TALER_MINTDB_plugin_load (cfg))) + (plugin = TALER_EXCHANGEDB_plugin_load (cfg))) { result = 1; return; @@ -705,7 +705,7 @@ run (void *cls, { switch (rh_head->type) { - case TALER_MINTDB_RO_BANK_TO_MINT: + case TALER_EXCHANGEDB_RO_BANK_TO_EXCHANGE: bt = rh_head->details.bank; FAILIF (0 != memcmp (&bt->reserve_pub, &reserve_pub, @@ -716,7 +716,7 @@ run (void *cls, FAILIF (0 != strcmp (CURRENCY, bt->amount.currency)); FAILIF (NULL == bt->wire); break; - case TALER_MINTDB_RO_WITHDRAW_COIN: + case TALER_EXCHANGEDB_RO_WITHDRAW_COIN: withdraw = rh_head->details.withdraw; FAILIF (0 != memcmp (&withdraw->reserve_pub, &reserve_pub, @@ -857,7 +857,7 @@ run (void *cls, if (NULL != cbc2.sig.rsa_signature) GNUNET_CRYPTO_rsa_signature_free (cbc2.sig.rsa_signature); dkp = NULL; - TALER_MINTDB_plugin_unload (plugin); + TALER_EXCHANGEDB_plugin_unload (plugin); plugin = NULL; } @@ -870,8 +870,8 @@ main (int argc, GNUNET_GETOPT_OPTION_END }; char *argv2[] = { - "test-mint-db-", /* will be replaced later */ - "-c", "test-mint-db-.conf", /* will be replaced later */ + "test-exchange-db-", /* will be replaced later */ + "-c", "test-exchange-db-.conf", /* will be replaced later */ NULL, }; const char *plugin_name; @@ -886,7 +886,7 @@ main (int argc, } plugin_name++; (void) GNUNET_asprintf (&testname, - "test-mint-db-%s", plugin_name); + "test-exchange-db-%s", plugin_name); (void) GNUNET_asprintf (&config_filename, "%s.conf", testname); argv2[0] = argv[0]; @@ -894,7 +894,7 @@ main (int argc, if (GNUNET_OK != GNUNET_PROGRAM_run ((sizeof (argv2)/sizeof (char *)) - 1, argv2, testname, - "Test cases for mint database helper functions.", + "Test cases for exchange database helper functions.", options, &run, NULL)) { GNUNET_free (config_filename); diff --git a/src/mintdb/test_mintdb_deposits.c b/src/exchangedb/test_exchangedb_deposits.c similarity index 82% rename from src/mintdb/test_mintdb_deposits.c rename to src/exchangedb/test_exchangedb_deposits.c index 3ce0a35a5..09c65b2b2 100644 --- a/src/mintdb/test_mintdb_deposits.c +++ b/src/exchangedb/test_exchangedb_deposits.c @@ -14,18 +14,18 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file mint/test_mint_deposits.c - * @brief testcase for mint deposits + * @file exchange/test_exchange_deposits.c + * @brief testcase for exchange deposits * @author Sree Harsha Totakura */ #include "platform.h" #include #include #include "taler_pq_lib.h" -#include "taler_mintdb_lib.h" -#include "taler_mintdb_plugin.h" +#include "taler_exchangedb_lib.h" +#include "taler_exchangedb_plugin.h" -#define MINT_CURRENCY "EUR" +#define EXCHANGE_CURRENCY "EUR" #define DB_URI "postgres:///taler" @@ -56,7 +56,7 @@ static int result; /** * The plugin. */ -static struct TALER_MINTDB_Plugin *plugin; +static struct TALER_EXCHANGEDB_Plugin *plugin; /** * Main function that will be run by the scheduler. @@ -78,23 +78,23 @@ run (void *cls, "\"NAME\":\"GNUNET E.V\"," "\"BIC\":\"GENODEF1SRL\"" "}"; - struct TALER_MINTDB_Deposit *deposit; + struct TALER_EXCHANGEDB_Deposit *deposit; uint64_t transaction_id; - struct TALER_MINTDB_Session *session; + struct TALER_EXCHANGEDB_Session *session; deposit = NULL; - EXITIF (NULL == (plugin = TALER_MINTDB_plugin_load (cfg))); + EXITIF (NULL == (plugin = TALER_EXCHANGEDB_plugin_load (cfg))); EXITIF (GNUNET_OK != plugin->create_tables (plugin->cls, ! persistent)); session = plugin->get_session (plugin->cls, ! persistent); EXITIF (NULL == session); - deposit = GNUNET_malloc (sizeof (struct TALER_MINTDB_Deposit) + sizeof (wire)); + deposit = GNUNET_malloc (sizeof (struct TALER_EXCHANGEDB_Deposit) + sizeof (wire)); /* Makeup a random coin public key */ GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK, deposit, - sizeof (struct TALER_MINTDB_Deposit)); + sizeof (struct TALER_EXCHANGEDB_Deposit)); /* Makeup a random 64bit transaction ID */ transaction_id = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX); @@ -104,8 +104,8 @@ run (void *cls, htonl (GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, UINT32_MAX)); deposit->amount_with_fee.fraction = htonl (GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, UINT32_MAX)); - GNUNET_assert (strlen (MINT_CURRENCY) < sizeof (deposit->amount_with_fee.currency)); - strcpy (deposit->amount_with_fee.currency, MINT_CURRENCY); + GNUNET_assert (strlen (EXCHANGE_CURRENCY) < sizeof (deposit->amount_with_fee.currency)); + strcpy (deposit->amount_with_fee.currency, EXCHANGE_CURRENCY); /* Copy wireformat */ deposit->wire = json_loads (wire, 0, NULL); EXITIF (GNUNET_OK != @@ -122,7 +122,7 @@ run (void *cls, GNUNET_free_non_null (deposit); if (NULL != plugin) { - TALER_MINTDB_plugin_unload (plugin); + TALER_EXCHANGEDB_plugin_unload (plugin); plugin = NULL; } } @@ -144,8 +144,8 @@ main (int argc, result = GNUNET_SYSERR; if (GNUNET_OK != GNUNET_PROGRAM_run (argc, argv, - "test-mint-deposits", - "testcase for mint deposits", + "test-exchange-deposits", + "testcase for exchange deposits", options, &run, NULL)) return 3; return (GNUNET_OK == result) ? 0 : 1; diff --git a/src/mintdb/test_mintdb_keyio.c b/src/exchangedb/test_exchangedb_keyio.c similarity index 83% rename from src/mintdb/test_mintdb_keyio.c rename to src/exchangedb/test_exchangedb_keyio.c index aa1ba2f20..2485da8ae 100644 --- a/src/mintdb/test_mintdb_keyio.c +++ b/src/exchangedb/test_exchangedb_keyio.c @@ -14,14 +14,14 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file mint/test_mint_common.c - * @brief test cases for some functions in mint/mint_common.c + * @file exchange/test_exchange_common.c + * @brief test cases for some functions in exchange/exchange_common.c * @author Sree Harsha Totakura */ #include "platform.h" #include "gnunet/gnunet_util_lib.h" #include "taler_signatures.h" -#include "taler_mintdb_lib.h" +#include "taler_exchangedb_lib.h" #define RSA_KEY_SIZE 1024 @@ -36,10 +36,10 @@ int main (int argc, const char *const argv[]) { - struct TALER_MINTDB_DenominationKeyIssueInformation dki; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation dki; char *enc; size_t enc_size; - struct TALER_MINTDB_DenominationKeyIssueInformation dki_read; + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation dki_read; char *enc_read; size_t enc_read_size; char *tmpfile; @@ -58,9 +58,9 @@ main (int argc, = GNUNET_CRYPTO_rsa_private_key_create (RSA_KEY_SIZE); enc_size = GNUNET_CRYPTO_rsa_private_key_encode (dki.denom_priv.rsa_private_key, &enc); - EXITIF (NULL == (tmpfile = GNUNET_DISK_mktemp ("test_mint_common"))); - EXITIF (GNUNET_OK != TALER_MINTDB_denomination_key_write (tmpfile, &dki)); - EXITIF (GNUNET_OK != TALER_MINTDB_denomination_key_read (tmpfile, &dki_read)); + EXITIF (NULL == (tmpfile = GNUNET_DISK_mktemp ("test_exchange_common"))); + EXITIF (GNUNET_OK != TALER_EXCHANGEDB_denomination_key_write (tmpfile, &dki)); + EXITIF (GNUNET_OK != TALER_EXCHANGEDB_denomination_key_read (tmpfile, &dki_read)); enc_read_size = GNUNET_CRYPTO_rsa_private_key_encode (dki_read.denom_priv.rsa_private_key, &enc_read); EXITIF (enc_size != enc_read_size); diff --git a/src/exchangedb/test_perf_taler_exchangedb.c b/src/exchangedb/test_perf_taler_exchangedb.c new file mode 100644 index 000000000..a4ec9591d --- /dev/null +++ b/src/exchangedb/test_perf_taler_exchangedb.c @@ -0,0 +1,182 @@ +/* + This file is part of TALER + Copyright (C) 2014, 2015 GNUnet e.V. + + TALER is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + TALER; see the file COPYING. If not, If not, see + */ +/** + * @file exchangedb/test_perf_taler_exchangedb.c + * @brief Exchange database performance analysis + * @author Nicolas Fournier + */ +#include "platform.h" +#include "perf_taler_exchangedb_interpreter.h" +#include "perf_taler_exchangedb_init.h" + + +#define NB_DENOMINATION_INIT 2 +#define NB_DENOMINATION_SAVE 2 + +#define NB_RESERVE_INIT 4 +#define NB_RESERVE_SAVE 1 + +#define NB_DEPOSIT_INIT 1 +#define NB_DEPOSIT_SAVE 1 + +#define NB_WITHDRAW_INIT 1 +#define NB_WITHDRAW_SAVE 1 + +/** + * Allocate, copies and free all the data used in the interpreter + * Used to check for memory leaks + */ +static void +test_allocate () +{ + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki, *dki_copy; + struct PERF_TALER_EXCHANGEDB_Reserve *reserve, *reserve_copy; + struct PERF_TALER_EXCHANGEDB_Coin *coin, *coin_copy; + struct TALER_EXCHANGEDB_Deposit *deposit, *deposit_copy; + + dki = PERF_TALER_EXCHANGEDB_denomination_init (); + reserve = PERF_TALER_EXCHANGEDB_reserve_init (); + coin = PERF_TALER_EXCHANGEDB_coin_init (dki, + reserve); + deposit = PERF_TALER_EXCHANGEDB_deposit_init (coin); + + dki_copy = PERF_TALER_EXCHANGEDB_denomination_copy (dki); + reserve_copy = PERF_TALER_EXCHANGEDB_reserve_copy (reserve); + coin_copy = PERF_TALER_EXCHANGEDB_coin_copy (coin); + deposit_copy = PERF_TALER_EXCHANGEDB_deposit_copy (deposit); + + PERF_TALER_EXCHANGEDB_denomination_free (dki); + PERF_TALER_EXCHANGEDB_denomination_free (dki_copy); + PERF_TALER_EXCHANGEDB_reserve_free (reserve); + PERF_TALER_EXCHANGEDB_reserve_free (reserve_copy); + PERF_TALER_EXCHANGEDB_coin_free (coin); + PERF_TALER_EXCHANGEDB_coin_free (coin_copy); + PERF_TALER_EXCHANGEDB_deposit_free (deposit); + PERF_TALER_EXCHANGEDB_deposit_free (deposit_copy); +} + +/** + * Runs the performances tests for the exchange database + * and logs the results using Gauger + */ +int +main (int argc, char ** argv) +{ + int ret = 0; + struct PERF_TALER_EXCHANGEDB_Cmd init[] = + { + PERF_TALER_EXCHANGEDB_INIT_CMD_END ("init") + }; + struct PERF_TALER_EXCHANGEDB_Cmd benchmark[] = + { + // Denomination used to create coins + PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG ("00 - Start of interpreter"), + + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("01 - denomination loop", + NB_DENOMINATION_INIT), + PERF_TALER_EXCHANGEDB_INIT_CMD_START_TRANSACTION ("01 - start transaction"), + PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_DENOMINATION ("01 - denomination"), + PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_DENOMINATION ("01 - insert", + "01 - denomination"), + PERF_TALER_EXCHANGEDB_INIT_CMD_COMMIT_TRANSACTION ("01 - commit transaction"), + PERF_TALER_EXCHANGEDB_INIT_CMD_SAVE_ARRAY ("01 - save denomination", + "01 - denomination loop", + "01 - denomination", + NB_DENOMINATION_SAVE), + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("01 - denomination loop end", + "01 - denomination loop"), + PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG ("01 - init denomination complete"), + // End of initialization + // Reserve initialization + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("02 - init reserve loop", + NB_RESERVE_INIT), + + PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_RESERVE ("02 - reserve"), + PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_RESERVE ("02 - insert", + "02 - reserve"), + PERF_TALER_EXCHANGEDB_INIT_CMD_SAVE_ARRAY ("02 - save reserve", + "02 - init reserve loop", + "02 - reserve", + NB_RESERVE_SAVE), + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("02 - init reserve end loop", + "02 - init reserve loop"), + PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG ("02 - reserve init complete"), + // End reserve init + // Withdrawal initialization + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("03 - init withdraw loop", + NB_WITHDRAW_INIT), + PERF_TALER_EXCHANGEDB_INIT_CMD_START_TRANSACTION ("03 - start transaction"), + PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY ("03 - denomination load", + "03 - init withdraw loop", + "01 - save denomination"), + PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY ("03 - reserve load", + "03 - init withdraw loop", + "02 - save reserve"), + PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_WITHDRAW ("03 - withdraw", + "03 - denomination load", + "03 - reserve load"), + PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_WITHDRAW ("03 - insert withdraw", + "03 - withdraw"), + PERF_TALER_EXCHANGEDB_INIT_CMD_COMMIT_TRANSACTION ("03 - commit transaction"), + PERF_TALER_EXCHANGEDB_INIT_CMD_SAVE_ARRAY ("03 - coin array", + "03 - init withdraw loop", + "03 - withdraw", + NB_WITHDRAW_SAVE), + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("03 - withdraw init end loop", + "03 - init withdraw loop"), + PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG ("03 - withdraw init complete"), + //End of withdrawal initialization + //Deposit initialization + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME ("04 - time start"), + PERF_TALER_EXCHANGEDB_INIT_CMD_LOOP ("04 - deposit init loop", + NB_DEPOSIT_INIT), + PERF_TALER_EXCHANGEDB_INIT_CMD_START_TRANSACTION ("04 - start transaction"), + PERF_TALER_EXCHANGEDB_INIT_CMD_LOAD_ARRAY ("04 - coin load", + "04 - deposit init loop", + "03 - coin array"), + PERF_TALER_EXCHANGEDB_INIT_CMD_CREATE_DEPOSIT ("04 - deposit", + "04 - coin load"), + PERF_TALER_EXCHANGEDB_INIT_CMD_INSERT_DEPOSIT ("04 - insert deposit", + "04 - deposit"), + PERF_TALER_EXCHANGEDB_INIT_CMD_COMMIT_TRANSACTION ("04 - commit transaction"), + PERF_TALER_EXCHANGEDB_INIT_CMD_SAVE_ARRAY ("04 - deposit array", + "04 - deposit init loop", + "04 - deposit", + NB_DEPOSIT_SAVE), + PERF_TALER_EXCHANGEDB_INIT_CMD_END_LOOP ("04 - deposit init loop end", + "04 - deposit init loop"), + PERF_TALER_EXCHANGEDB_INIT_CMD_GET_TIME ("04 - time stop"), + PERF_TALER_EXCHANGEDB_INIT_CMD_GAUGER ("04 - gauger", + "04 - time start", + "04 - time stop", + "TEST", + "time to insert a deposit", + "deposit/sec", + NB_DEPOSIT_SAVE), + PERF_TALER_EXCHANGEDB_INIT_CMD_DEBUG ("04 - deposit init complete"), + // End of deposit initialization + PERF_TALER_EXCHANGEDB_INIT_CMD_END ("end"), + }; + + test_allocate (); + ret = PERF_TALER_EXCHANGEDB_run_benchmark ("test-perf-taler-exchangedb", + "./test-exchange-db-postgres.conf", + init, + benchmark); + if (GNUNET_SYSERR == ret) + return 1; + return 0; +} diff --git a/src/include/Makefile.am b/src/include/Makefile.am index 4d7ae3cb2..6f7f53acb 100644 --- a/src/include/Makefile.am +++ b/src/include/Makefile.am @@ -16,9 +16,9 @@ talerinclude_HEADERS = \ taler_crypto_lib.h \ taler_json_lib.h \ taler_util.h \ - taler_mint_service.h \ - taler_mintdb_lib.h \ - taler_mintdb_plugin.h \ + taler_exchange_service.h \ + taler_exchangedb_lib.h \ + taler_exchangedb_plugin.h \ taler_pq_lib.h \ taler_signatures.h \ taler_wire_lib.h \ diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index 6056270fa..e948fa28a 100644 --- a/src/include/taler_crypto_lib.h +++ b/src/include/taler_crypto_lib.h @@ -140,23 +140,23 @@ struct TALER_TransferPrivateKeyP /** - * @brief Type of online public keys used by the mint to sign + * @brief Type of online public keys used by the exchange to sign * messages. */ -struct TALER_MintPublicKeyP +struct TALER_ExchangePublicKeyP { /** - * Taler uses EdDSA for online mint message signing. + * Taler uses EdDSA for online exchange message signing. */ struct GNUNET_CRYPTO_EddsaPublicKey eddsa_pub; }; /** - * @brief Type of online public keys used by the mint to + * @brief Type of online public keys used by the exchange to * sign messages. */ -struct TALER_MintPrivateKeyP +struct TALER_ExchangePrivateKeyP { /** * Taler uses EdDSA for online signatures sessions. @@ -166,9 +166,9 @@ struct TALER_MintPrivateKeyP /** - * @brief Type of signatures used by the mint to sign messages online. + * @brief Type of signatures used by the exchange to sign messages online. */ -struct TALER_MintSignatureP +struct TALER_ExchangeSignatureP { /** * Taler uses EdDSA for online signatures sessions. @@ -178,7 +178,7 @@ struct TALER_MintSignatureP /** - * @brief Type of the offline master public key used by the mint. + * @brief Type of the offline master public key used by the exchange. */ struct TALER_MasterPublicKeyP { @@ -214,7 +214,7 @@ struct TALER_AuditorSignatureP /** - * @brief Type of the offline master public keys used by the mint. + * @brief Type of the offline master public keys used by the exchange. */ struct TALER_MasterPrivateKeyP { @@ -226,7 +226,7 @@ struct TALER_MasterPrivateKeyP /** - * @brief Type of signatures by the offline master public key used by the mint. + * @brief Type of signatures by the offline master public key used by the exchange. */ struct TALER_MasterSignatureP { @@ -464,8 +464,8 @@ struct TALER_WireTransferIdentifierRawP /** * Binary information encoded in Crockford's Base32 in wire transfer * subjects of transfers from Taler to a merchant. The actual value - * is chosen by the mint and has no particular semantics, other than - * being unique so that the mint can lookup details about the wire + * is chosen by the exchange and has no particular semantics, other than + * being unique so that the exchange can lookup details about the wire * transfer when needed. */ struct TALER_WireTransferIdentifierP diff --git a/src/include/taler_mint_service.h b/src/include/taler_exchange_service.h similarity index 70% rename from src/include/taler_mint_service.h rename to src/include/taler_exchange_service.h index 1502edfbc..566dec6f8 100644 --- a/src/include/taler_mint_service.h +++ b/src/include/taler_exchange_service.h @@ -14,13 +14,13 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file include/taler_mint_service.h - * @brief C interface of libtalermint, a C library to use mint's HTTP API + * @file include/taler_exchange_service.h + * @brief C interface of libtalerexchange, a C library to use exchange's HTTP API * @author Sree Harsha Totakura * @author Christian Grothoff */ -#ifndef _TALER_MINT_SERVICE_H -#define _TALER_MINT_SERVICE_H +#ifndef _TALER_EXCHANGE_SERVICE_H +#define _TALER_EXCHANGE_SERVICE_H #include "taler_util.h" @@ -30,7 +30,7 @@ * @brief Handle to this library context. This is where the * main event loop logic lives. */ -struct TALER_MINT_Context; +struct TALER_EXCHANGE_Context; /** @@ -39,18 +39,18 @@ struct TALER_MINT_Context; * * @return the context, NULL on error (failure to initialize) */ -struct TALER_MINT_Context * -TALER_MINT_init (void); +struct TALER_EXCHANGE_Context * +TALER_EXCHANGE_init (void); /** * Obtain the information for a select() call to wait until - * #TALER_MINT_perform() is ready again. Note that calling - * any other TALER_MINT-API may also imply that the library - * is again ready for #TALER_MINT_perform(). + * #TALER_EXCHANGE_perform() is ready again. Note that calling + * any other TALER_EXCHANGE-API may also imply that the library + * is again ready for #TALER_EXCHANGE_perform(). * * Basically, a client should use this API to prepare for select(), - * then block on select(), then call #TALER_MINT_perform() and then + * then block on select(), then call #TALER_EXCHANGE_perform() and then * start again until the work with the context is done. * * This function will NOT zero out the sets and assumes that @a max_fd @@ -69,10 +69,10 @@ TALER_MINT_init (void); * to be passed to select().) * @param timeout set to the timeout in milliseconds (!); -1 means * no timeout (NULL, blocking forever is OK), 0 means to - * proceed immediately with #TALER_MINT_perform(). + * proceed immediately with #TALER_EXCHANGE_perform(). */ void -TALER_MINT_get_select_info (struct TALER_MINT_Context *ctx, +TALER_EXCHANGE_get_select_info (struct TALER_EXCHANGE_Context *ctx, fd_set *read_fd_set, fd_set *write_fd_set, fd_set *except_fd_set, @@ -86,7 +86,7 @@ TALER_MINT_get_select_info (struct TALER_MINT_Context *ctx, * @param ctx the library context */ void -TALER_MINT_perform (struct TALER_MINT_Context *ctx); +TALER_EXCHANGE_perform (struct TALER_EXCHANGE_Context *ctx); /** @@ -97,7 +97,7 @@ TALER_MINT_perform (struct TALER_MINT_Context *ctx); * @param ctx the library context */ void -TALER_MINT_fini (struct TALER_MINT_Context *ctx); +TALER_EXCHANGE_fini (struct TALER_EXCHANGE_Context *ctx); /* ********************* /keys *********************** */ @@ -105,27 +105,27 @@ TALER_MINT_fini (struct TALER_MINT_Context *ctx); /** * List of possible options to be passed to - * #TALER_MINT_connect(). + * #TALER_EXCHANGE_connect(). */ -enum TALER_MINT_Option +enum TALER_EXCHANGE_Option { /** * Terminator (end of option list). */ - TALER_MINT_OPTION_END = 0 + TALER_EXCHANGE_OPTION_END = 0 }; /** - * @brief Mint's signature key + * @brief Exchange's signature key */ -struct TALER_MINT_SigningPublicKey +struct TALER_EXCHANGE_SigningPublicKey { /** * The signing public key */ - struct TALER_MintPublicKeyP key; + struct TALER_ExchangePublicKeyP key; /** * Validity start time @@ -140,9 +140,9 @@ struct TALER_MINT_SigningPublicKey /** - * @brief Public information about a mint's denomination key + * @brief Public information about a exchange's denomination key */ -struct TALER_MINT_DenomPublicKey +struct TALER_EXCHANGE_DenomPublicKey { /** * The public key @@ -173,7 +173,7 @@ struct TALER_MINT_DenomPublicKey /** * When do signatures with this denomination key become invalid? * After this point, these signatures cannot be used in (legal) - * disputes anymore, as the Mint is then allowed to destroy its side + * disputes anymore, as the Exchange is then allowed to destroy its side * of the evidence. @e expire_legal is expected to be significantly * larger than @e expire_spend (by a year or more). */ @@ -202,9 +202,9 @@ struct TALER_MINT_DenomPublicKey /** - * @brief Information we get from the mint about auditors. + * @brief Information we get from the exchange about auditors. */ -struct TALER_MINT_AuditorInformation +struct TALER_EXCHANGE_AuditorInformation { /** * Public key of the auditing institution. @@ -234,35 +234,35 @@ struct TALER_MINT_AuditorInformation * elements point to the same locations as the entries * in the key's main `denom_keys` array. */ - const struct TALER_MINT_DenomPublicKey **denom_keys; + const struct TALER_EXCHANGE_DenomPublicKey **denom_keys; }; /** - * @brief Information about keys from the mint. + * @brief Information about keys from the exchange. */ -struct TALER_MINT_Keys +struct TALER_EXCHANGE_Keys { /** - * Long-term offline signing key of the mint. + * Long-term offline signing key of the exchange. */ struct TALER_MasterPublicKeyP master_pub; /** - * Array of the mint's online signing keys. + * Array of the exchange's online signing keys. */ - struct TALER_MINT_SigningPublicKey *sign_keys; + struct TALER_EXCHANGE_SigningPublicKey *sign_keys; /** - * Array of the mint's denomination keys. + * Array of the exchange's denomination keys. */ - struct TALER_MINT_DenomPublicKey *denom_keys; + struct TALER_EXCHANGE_DenomPublicKey *denom_keys; /** - * Array of the keys of the auditors of the mint. + * Array of the keys of the auditors of the exchange. */ - struct TALER_MINT_AuditorInformation *auditors; + struct TALER_EXCHANGE_AuditorInformation *auditors; /** * Length of the @e sign_keys array. @@ -284,101 +284,101 @@ struct TALER_MINT_Keys /** * Function called with information about who is auditing - * a particular mint and what key the mint is using. + * a particular exchange and what key the exchange is using. * * @param cls closure * @param keys information about the various keys used - * by the mint + * by the exchange */ typedef void -(*TALER_MINT_CertificationCallback) (void *cls, - const struct TALER_MINT_Keys *keys); +(*TALER_EXCHANGE_CertificationCallback) (void *cls, + const struct TALER_EXCHANGE_Keys *keys); /** - * @brief Handle to the mint. This is where we interact with - * a particular mint and keep the per-mint information. + * @brief Handle to the exchange. This is where we interact with + * a particular exchange and keep the per-exchange information. */ -struct TALER_MINT_Handle; +struct TALER_EXCHANGE_Handle; /** - * Initialise a connection to the mint. Will connect to the - * mint and obtain information about the mint's master public - * key and the mint's auditor. The respective information will + * Initialise a connection to the exchange. Will connect to the + * exchange and obtain information about the exchange's master public + * key and the exchange's auditor. The respective information will * be passed to the @a cert_cb once available, and all future - * interactions with the mint will be checked to be signed + * interactions with the exchange will be checked to be signed * (where appropriate) by the respective master key. * * @param ctx the context - * @param url HTTP base URL for the mint - * @param cert_cb function to call with the mint's certification information + * @param url HTTP base URL for the exchange + * @param cert_cb function to call with the exchange's certification information * @param cert_cb_cls closure for @a cert_cb - * @param ... list of additional arguments, terminated by #TALER_MINT_OPTION_END. - * @return the mint handle; NULL upon error + * @param ... list of additional arguments, terminated by #TALER_EXCHANGE_OPTION_END. + * @return the exchange handle; NULL upon error */ -struct TALER_MINT_Handle * -TALER_MINT_connect (struct TALER_MINT_Context *ctx, +struct TALER_EXCHANGE_Handle * +TALER_EXCHANGE_connect (struct TALER_EXCHANGE_Context *ctx, const char *url, - TALER_MINT_CertificationCallback cert_cb, + TALER_EXCHANGE_CertificationCallback cert_cb, void *cert_cb_cls, ...); /** - * Disconnect from the mint. + * Disconnect from the exchange. * - * @param mint the mint handle + * @param exchange the exchange handle */ void -TALER_MINT_disconnect (struct TALER_MINT_Handle *mint); +TALER_EXCHANGE_disconnect (struct TALER_EXCHANGE_Handle *exchange); /** - * Obtain the keys from the mint. + * Obtain the keys from the exchange. * - * @param mint the mint handle - * @return the mint's key set + * @param exchange the exchange handle + * @return the exchange's key set */ -const struct TALER_MINT_Keys * -TALER_MINT_get_keys (const struct TALER_MINT_Handle *mint); +const struct TALER_EXCHANGE_Keys * +TALER_EXCHANGE_get_keys (const struct TALER_EXCHANGE_Handle *exchange); /** - * Test if the given @a pub is a the current signing key from the mint + * Test if the given @a pub is a the current signing key from the exchange * according to @a keys. * - * @param keys the mint's key set - * @param pub claimed current online signing key for the mint + * @param keys the exchange's key set + * @param pub claimed current online signing key for the exchange * @return #GNUNET_OK if @a pub is (according to /keys) a current signing key */ int -TALER_MINT_test_signing_key (const struct TALER_MINT_Keys *keys, - const struct TALER_MintPublicKeyP *pub); +TALER_EXCHANGE_test_signing_key (const struct TALER_EXCHANGE_Keys *keys, + const struct TALER_ExchangePublicKeyP *pub); /** - * Obtain the denomination key details from the mint. + * Obtain the denomination key details from the exchange. * - * @param keys the mint's key set + * @param keys the exchange's key set * @param pk public key of the denomination to lookup * @return details about the given denomination key, NULL if the key is not * found */ -const struct TALER_MINT_DenomPublicKey * -TALER_MINT_get_denomination_key (const struct TALER_MINT_Keys *keys, +const struct TALER_EXCHANGE_DenomPublicKey * +TALER_EXCHANGE_get_denomination_key (const struct TALER_EXCHANGE_Keys *keys, const struct TALER_DenominationPublicKey *pk); /** - * Obtain the denomination key details from the mint. + * Obtain the denomination key details from the exchange. * - * @param keys the mint's key set + * @param keys the exchange's key set * @param hc hash of the public key of the denomination to lookup * @return details about the given denomination key */ -const struct TALER_MINT_DenomPublicKey * -TALER_MINT_get_denomination_key_by_hash (const struct TALER_MINT_Keys *keys, +const struct TALER_EXCHANGE_DenomPublicKey * +TALER_EXCHANGE_get_denomination_key_by_hash (const struct TALER_EXCHANGE_Keys *keys, const struct GNUNET_HashCode *hc); @@ -388,31 +388,31 @@ TALER_MINT_get_denomination_key_by_hash (const struct TALER_MINT_Keys *keys, /** * @brief A Wire format inquiry handle */ -struct TALER_MINT_WireHandle; +struct TALER_EXCHANGE_WireHandle; /** * Callbacks of this type are used to serve the result of submitting a - * wire format inquiry request to a mint. + * wire format inquiry request to a exchange. * * The callback is invoked multiple times, once for each supported @a * method. Finally, it is invoked one more time with cls/0/NULL/NULL * to indicate the end of the iteration. If any request fails to - * generate a valid response from the mint, @a http_status will also + * generate a valid response from the exchange, @a http_status will also * be zero and the iteration will also end. Thus, the iteration * always ends with a final call with an @a http_status of 0. If the * @a http_status is already 0 on the first call, then the response to * the /wire request was invalid. Later, clients can tell the * difference between @a http_status of 0 indicating a failed * /wire/method request and a regular end of the iteration by @a - * method being non-NULL. If the mint simply correctly asserts that + * method being non-NULL. If the exchange simply correctly asserts that * it does not support any methods, @a method will be NULL but the @a * http_status will be #MHD_HTTP_OK for the first call (followed by a * cls/0/NULL/NULL call to signal the end of the iteration). * * @param cls closure * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful request; - * 0 if the mint's reply is bogus (fails to follow the protocol) + * 0 if the exchange's reply is bogus (fails to follow the protocol) * @param method wire format method supported, i.e. "test" or "sepa", or NULL * if already the /wire request failed. * @param obj the received JSON reply, if successful this should be the wire @@ -422,17 +422,17 @@ struct TALER_MINT_WireHandle; * provide more information to the user about the @a method). */ typedef void -(*TALER_MINT_WireResultCallback) (void *cls, +(*TALER_EXCHANGE_WireResultCallback) (void *cls, unsigned int http_status, const char *method, json_t *obj); /** - * Obtain information about a mint's wire instructions. - * A mint may provide wire instructions for creating + * Obtain information about a exchange's wire instructions. + * A exchange may provide wire instructions for creating * a reserve. The wire instructions also indicate - * which wire formats merchants may use with the mint. + * which wire formats merchants may use with the exchange. * This API is typically used by a wallet for wiring * funds, and possibly by a merchant to determine * supported wire formats. @@ -440,17 +440,17 @@ typedef void * Note that while we return the (main) response verbatim to the * caller for further processing, we do already verify that the * response is well-formed (i.e. that signatures included in the - * response are all valid). If the mint's reply is not well-formed, + * response are all valid). If the exchange's reply is not well-formed, * we return an HTTP status code of zero to @a cb. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param wire_cb the callback to call when a reply for this request is available * @param wire_cb_cls closure for the above callback * @return a handle for this request */ -struct TALER_MINT_WireHandle * -TALER_MINT_wire (struct TALER_MINT_Handle *mint, - TALER_MINT_WireResultCallback wire_cb, +struct TALER_EXCHANGE_WireHandle * +TALER_EXCHANGE_wire (struct TALER_EXCHANGE_Handle *exchange, + TALER_EXCHANGE_WireResultCallback wire_cb, void *wire_cb_cls); @@ -461,7 +461,7 @@ TALER_MINT_wire (struct TALER_MINT_Handle *mint, * @param wh the wire information request handle */ void -TALER_MINT_wire_cancel (struct TALER_MINT_WireHandle *wh); +TALER_EXCHANGE_wire_cancel (struct TALER_EXCHANGE_WireHandle *wh); /* ********************* /deposit *********************** */ @@ -470,61 +470,61 @@ TALER_MINT_wire_cancel (struct TALER_MINT_WireHandle *wh); /** * @brief A Deposit Handle */ -struct TALER_MINT_DepositHandle; +struct TALER_EXCHANGE_DepositHandle; /** * Callbacks of this type are used to serve the result of submitting a - * deposit permission request to a mint. + * deposit permission request to a exchange. * * @param cls closure * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful deposit; - * 0 if the mint's reply is bogus (fails to follow the protocol) + * 0 if the exchange's reply is bogus (fails to follow the protocol) * @param obj the received JSON reply, should be kept as proof (and, in case of errors, * be forwarded to the customer) */ typedef void -(*TALER_MINT_DepositResultCallback) (void *cls, +(*TALER_EXCHANGE_DepositResultCallback) (void *cls, unsigned int http_status, json_t *obj); /** - * Submit a deposit permission to the mint and get the mint's + * Submit a deposit permission to the exchange and get the exchange's * response. This API is typically used by a merchant. Note that * while we return the response verbatim to the caller for further * processing, we do already verify that the response is well-formed * (i.e. that signatures included in the response are all valid). If - * the mint's reply is not well-formed, we return an HTTP status code + * the exchange's reply is not well-formed, we return an HTTP status code * of zero to @a cb. * * We also verify that the @a coin_sig is valid for this deposit * request, and that the @a ub_sig is a valid signature for @a - * coin_pub. Also, the @a mint must be ready to operate (i.e. have + * coin_pub. Also, the @a exchange must be ready to operate (i.e. have * finished processing the /keys reply). If either check fails, we do - * NOT initiate the transaction with the mint and instead return NULL. + * NOT initiate the transaction with the exchange and instead return NULL. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param amount the amount to be deposited - * @param wire_deadline execution date, until which the merchant would like the mint to settle the balance (advisory, the mint cannot be - * forced to settle in the past or upon very short notice, but of course a well-behaved mint will limit aggregation based on the advice received) - * @param wire_details the merchant’s account details, in a format supported by the mint - * @param h_contract hash of the contact of the merchant with the customer (further details are never disclosed to the mint) + * @param wire_deadline execution date, until which the merchant would like the exchange to settle the balance (advisory, the exchange cannot be + * forced to settle in the past or upon very short notice, but of course a well-behaved exchange will limit aggregation based on the advice received) + * @param wire_details the merchant’s account details, in a format supported by the exchange + * @param h_contract hash of the contact of the merchant with the customer (further details are never disclosed to the exchange) * @param coin_pub coin’s public key * @param denom_pub denomination key with which the coin is signed - * @param denom_sig mint’s unblinded signature of the coin - * @param timestamp timestamp when the contract was finalized, must match approximately the current time of the mint + * @param denom_sig exchange’s unblinded signature of the coin + * @param timestamp timestamp when the contract was finalized, must match approximately the current time of the exchange * @param transaction_id transaction id for the transaction between merchant and customer * @param merchant_pub the public key of the merchant (used to identify the merchant for refund requests) - * @param refund_deadline date until which the merchant can issue a refund to the customer via the mint (can be zero if refunds are not allowed) + * @param refund_deadline date until which the merchant can issue a refund to the customer via the exchange (can be zero if refunds are not allowed) * @param coin_sig the signature made with purpose #TALER_SIGNATURE_WALLET_COIN_DEPOSIT made by the customer with the coin’s private key. * @param cb the callback to call when a reply for this request is available * @param cb_cls closure for the above callback * @return a handle for this request; NULL if the inputs are invalid (i.e. * signatures fail to verify). In this case, the callback is not called. */ -struct TALER_MINT_DepositHandle * -TALER_MINT_deposit (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_DepositHandle * +TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange, const struct TALER_Amount *amount, struct GNUNET_TIME_Absolute wire_deadline, json_t *wire_details, @@ -537,7 +537,7 @@ TALER_MINT_deposit (struct TALER_MINT_Handle *mint, const struct TALER_MerchantPublicKeyP *merchant_pub, struct GNUNET_TIME_Absolute refund_deadline, const struct TALER_CoinSpendSignatureP *coin_sig, - TALER_MINT_DepositResultCallback cb, + TALER_EXCHANGE_DepositResultCallback cb, void *cb_cls); @@ -548,7 +548,7 @@ TALER_MINT_deposit (struct TALER_MINT_Handle *mint, * @param deposit the deposit permission request handle */ void -TALER_MINT_deposit_cancel (struct TALER_MINT_DepositHandle *deposit); +TALER_EXCHANGE_deposit_cancel (struct TALER_EXCHANGE_DepositHandle *deposit); /* ********************* /reserve/status *********************** */ @@ -557,23 +557,23 @@ TALER_MINT_deposit_cancel (struct TALER_MINT_DepositHandle *deposit); /** * @brief A /reserve/status Handle */ -struct TALER_MINT_ReserveStatusHandle; +struct TALER_EXCHANGE_ReserveStatusHandle; /** * Ways how a reserve's balance may change. */ -enum TALER_MINT_ReserveTransactionType { +enum TALER_EXCHANGE_ReserveTransactionType { /** * Deposit into the reserve. */ - TALER_MINT_RTT_DEPOSIT, + TALER_EXCHANGE_RTT_DEPOSIT, /** * Withdrawal from the reserve. */ - TALER_MINT_RTT_WITHDRAWAL + TALER_EXCHANGE_RTT_WITHDRAWAL }; @@ -581,13 +581,13 @@ enum TALER_MINT_ReserveTransactionType { /** * @brief Entry in the reserve's transaction history. */ -struct TALER_MINT_ReserveHistory +struct TALER_EXCHANGE_ReserveHistory { /** * Type of the transaction. */ - enum TALER_MINT_ReserveTransactionType type; + enum TALER_EXCHANGE_ReserveTransactionType type; /** * Amount transferred (in or out). @@ -616,45 +616,45 @@ struct TALER_MINT_ReserveHistory /** * Callbacks of this type are used to serve the result of submitting a - * deposit permission request to a mint. + * deposit permission request to a exchange. * * @param cls closure * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request - * 0 if the mint's reply is bogus (fails to follow the protocol) + * 0 if the exchange's reply is bogus (fails to follow the protocol) * @param[in] json original response in JSON format (useful only for diagnostics) * @param balance current balance in the reserve, NULL on error * @param history_length number of entries in the transaction history, 0 on error * @param history detailed transaction history, NULL on error */ typedef void -(*TALER_MINT_ReserveStatusResultCallback) (void *cls, +(*TALER_EXCHANGE_ReserveStatusResultCallback) (void *cls, unsigned int http_status, json_t *json, const struct TALER_Amount *balance, unsigned int history_length, - const struct TALER_MINT_ReserveHistory *history); + const struct TALER_EXCHANGE_ReserveHistory *history); /** * Submit a request to obtain the transaction history of a reserve - * from the mint. Note that while we return the full response to the + * from the exchange. Note that while we return the full response to the * caller for further processing, we do already verify that the * response is well-formed (i.e. that signatures included in the - * response are all valid and add up to the balance). If the mint's + * response are all valid and add up to the balance). If the exchange's * reply is not well-formed, we return an HTTP status code of zero to * @a cb. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param reserve_pub public key of the reserve to inspect * @param cb the callback to call when a reply for this request is available * @param cb_cls closure for the above callback * @return a handle for this request; NULL if the inputs are invalid (i.e. * signatures fail to verify). In this case, the callback is not called. */ -struct TALER_MINT_ReserveStatusHandle * -TALER_MINT_reserve_status (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_ReserveStatusHandle * +TALER_EXCHANGE_reserve_status (struct TALER_EXCHANGE_Handle *exchange, const struct TALER_ReservePublicKeyP *reserve_pub, - TALER_MINT_ReserveStatusResultCallback cb, + TALER_EXCHANGE_ReserveStatusResultCallback cb, void *cb_cls); @@ -665,7 +665,7 @@ TALER_MINT_reserve_status (struct TALER_MINT_Handle *mint, * @param wsh the withdraw status request handle */ void -TALER_MINT_reserve_status_cancel (struct TALER_MINT_ReserveStatusHandle *wsh); +TALER_EXCHANGE_reserve_status_cancel (struct TALER_EXCHANGE_ReserveStatusHandle *wsh); /* ********************* /reserve/withdraw *********************** */ @@ -674,35 +674,35 @@ TALER_MINT_reserve_status_cancel (struct TALER_MINT_ReserveStatusHandle *wsh); /** * @brief A /reserve/withdraw Handle */ -struct TALER_MINT_ReserveWithdrawHandle; +struct TALER_EXCHANGE_ReserveWithdrawHandle; /** * Callbacks of this type are used to serve the result of submitting a - * deposit permission request to a mint. + * deposit permission request to a exchange. * * @param cls closure * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request - * 0 if the mint's reply is bogus (fails to follow the protocol) + * 0 if the exchange's reply is bogus (fails to follow the protocol) * @param sig signature over the coin, NULL on error - * @param full_response full response from the mint (for logging, in case of errors) + * @param full_response full response from the exchange (for logging, in case of errors) */ typedef void -(*TALER_MINT_ReserveWithdrawResultCallback) (void *cls, +(*TALER_EXCHANGE_ReserveWithdrawResultCallback) (void *cls, unsigned int http_status, const struct TALER_DenominationSignature *sig, json_t *full_response); /** - * Withdraw a coin from the mint using a /reserve/withdraw request. This + * Withdraw a coin from the exchange using a /reserve/withdraw request. This * API is typically used by a wallet. Note that to ensure that no * money is lost in case of hardware failures, the caller must have * committed (most of) the arguments to disk before calling, and be * ready to repeat the request with the same arguments in case of * failures. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param pk kind of coin to create * @param reserve_priv private key of the reserve to withdraw from * @param coin_priv where to store the coin's private key, @@ -712,16 +712,16 @@ typedef void * @param res_cb the callback to call when the final result for this request is available * @param res_cb_cls closure for @a res_cb * @return NULL - * if the inputs are invalid (i.e. denomination key not with this mint). + * if the inputs are invalid (i.e. denomination key not with this exchange). * In this case, the callback is not called. */ -struct TALER_MINT_ReserveWithdrawHandle * -TALER_MINT_reserve_withdraw (struct TALER_MINT_Handle *mint, - const struct TALER_MINT_DenomPublicKey *pk, +struct TALER_EXCHANGE_ReserveWithdrawHandle * +TALER_EXCHANGE_reserve_withdraw (struct TALER_EXCHANGE_Handle *exchange, + const struct TALER_EXCHANGE_DenomPublicKey *pk, const struct TALER_ReservePrivateKeyP *reserve_priv, const struct TALER_CoinSpendPrivateKeyP *coin_priv, const struct TALER_DenominationBlindingKey *blinding_key, - TALER_MINT_ReserveWithdrawResultCallback res_cb, + TALER_EXCHANGE_ReserveWithdrawResultCallback res_cb, void *res_cb_cls); @@ -732,7 +732,7 @@ TALER_MINT_reserve_withdraw (struct TALER_MINT_Handle *mint, * @param sign the withdraw sign request handle */ void -TALER_MINT_reserve_withdraw_cancel (struct TALER_MINT_ReserveWithdrawHandle *sign); +TALER_EXCHANGE_reserve_withdraw_cancel (struct TALER_EXCHANGE_ReserveWithdrawHandle *sign); /* ********************* /refresh/melt+reveal ***************************** */ @@ -748,7 +748,7 @@ TALER_MINT_reserve_withdraw_cancel (struct TALER_MINT_ReserveWithdrawHandle *sig * no money is lost in case of hardware failures, is operation does * not actually initiate the request. Instead, it generates a buffer * which the caller must store before proceeding with the actual call - * to #TALER_MINT_refresh_melt() that will generate the request. + * to #TALER_EXCHANGE_refresh_melt() that will generate the request. * * This function does verify that the given request data is internally * consistent. However, the @a melts_sigs are only verified if @a @@ -775,20 +775,20 @@ TALER_MINT_reserve_withdraw_cancel (struct TALER_MINT_ReserveWithdrawHandle *sig * @param fresh_pks array of @a pks_len denominations of fresh coins to create * @param[out] res_size set to the size of the return value, or 0 on error * @return NULL - * if the inputs are invalid (i.e. denomination key not with this mint). + * if the inputs are invalid (i.e. denomination key not with this exchange). * Otherwise, pointer to a buffer of @a res_size to store persistently - * before proceeding to #TALER_MINT_refresh_melt(). + * before proceeding to #TALER_EXCHANGE_refresh_melt(). * Non-null results should be freed using #GNUNET_free(). */ char * -TALER_MINT_refresh_prepare (unsigned int num_melts, +TALER_EXCHANGE_refresh_prepare (unsigned int num_melts, const struct TALER_CoinSpendPrivateKeyP *melt_privs, const struct TALER_Amount *melt_amounts, const struct TALER_DenominationSignature *melt_sigs, - const struct TALER_MINT_DenomPublicKey *melt_pks, + const struct TALER_EXCHANGE_DenomPublicKey *melt_pks, int check_sigs, unsigned int fresh_pks_len, - const struct TALER_MINT_DenomPublicKey *fresh_pks, + const struct TALER_EXCHANGE_DenomPublicKey *fresh_pks, size_t *res_size); @@ -797,53 +797,53 @@ TALER_MINT_refresh_prepare (unsigned int num_melts, /** * @brief A /refresh/melt Handle */ -struct TALER_MINT_RefreshMeltHandle; +struct TALER_EXCHANGE_RefreshMeltHandle; /** * Callbacks of this type are used to notify the application about the * result of the /refresh/melt stage. If successful, the @a noreveal_index - * should be committed to disk prior to proceeding #TALER_MINT_refresh_reveal(). + * should be committed to disk prior to proceeding #TALER_EXCHANGE_refresh_reveal(). * * @param cls closure * @param http_status HTTP response code, never #MHD_HTTP_OK (200) as for successful intermediate response this callback is skipped. - * 0 if the mint's reply is bogus (fails to follow the protocol) - * @param noreveal_index choice by the mint in the cut-and-choose protocol, + * 0 if the exchange's reply is bogus (fails to follow the protocol) + * @param noreveal_index choice by the exchange in the cut-and-choose protocol, * UINT16_MAX on error - * @param full_response full response from the mint (for logging, in case of errors) + * @param full_response full response from the exchange (for logging, in case of errors) */ typedef void -(*TALER_MINT_RefreshMeltCallback) (void *cls, +(*TALER_EXCHANGE_RefreshMeltCallback) (void *cls, unsigned int http_status, uint16_t noreveal_index, json_t *full_response); /** - * Submit a melt request to the mint and get the mint's + * Submit a melt request to the exchange and get the exchange's * response. * * This API is typically used by a wallet. Note that to ensure that * no money is lost in case of hardware failures, the provided * argument should have been constructed using - * #TALER_MINT_refresh_prepare and committed to persistent storage + * #TALER_EXCHANGE_refresh_prepare and committed to persistent storage * prior to calling this function. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param refresh_data_length size of the @a refresh_data (returned - * in the `res_size` argument from #TALER_MINT_refresh_prepare()) + * in the `res_size` argument from #TALER_EXCHANGE_refresh_prepare()) * @param refresh_data the refresh data as returned from - #TALER_MINT_refresh_prepare()) + #TALER_EXCHANGE_refresh_prepare()) * @param melt_cb the callback to call with the result * @param melt_cb_cls closure for @a melt_cb * @return a handle for this request; NULL if the argument was invalid. * In this case, neither callback will be called. */ -struct TALER_MINT_RefreshMeltHandle * -TALER_MINT_refresh_melt (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_RefreshMeltHandle * +TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange, size_t refresh_data_length, const char *refresh_data, - TALER_MINT_RefreshMeltCallback melt_cb, + TALER_EXCHANGE_RefreshMeltCallback melt_cb, void *melt_cb_cls); @@ -854,7 +854,7 @@ TALER_MINT_refresh_melt (struct TALER_MINT_Handle *mint, * @param rmh the refresh handle */ void -TALER_MINT_refresh_melt_cancel (struct TALER_MINT_RefreshMeltHandle *rmh); +TALER_EXCHANGE_refresh_melt_cancel (struct TALER_EXCHANGE_RefreshMeltHandle *rmh); /* ********************* /refresh/reveal ***************************** */ @@ -862,7 +862,7 @@ TALER_MINT_refresh_melt_cancel (struct TALER_MINT_RefreshMeltHandle *rmh); /** * Callbacks of this type are used to return the final result of - * submitting a refresh request to a mint. If the operation was + * submitting a refresh request to a exchange. If the operation was * successful, this function returns the signatures over the coins * that were remelted. The @a coin_privs and @a sigs arrays give the * coins in the same order (and should have the same length) in which @@ -870,14 +870,14 @@ TALER_MINT_refresh_melt_cancel (struct TALER_MINT_RefreshMeltHandle *rmh); * * @param cls closure * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request - * 0 if the mint's reply is bogus (fails to follow the protocol) + * 0 if the exchange's reply is bogus (fails to follow the protocol) * @param num_coins number of fresh coins created, length of the @a sigs and @a coin_privs arrays, 0 if the operation failed * @param coin_privs array of @a num_coins private keys for the coins that were created, NULL on error * @param sigs array of signature over @a num_coins coins, NULL on error - * @param full_response full response from the mint (for logging, in case of errors) + * @param full_response full response from the exchange (for logging, in case of errors) */ typedef void -(*TALER_MINT_RefreshRevealCallback) (void *cls, +(*TALER_EXCHANGE_RefreshRevealCallback) (void *cls, unsigned int http_status, unsigned int num_coins, @@ -889,11 +889,11 @@ typedef void /** * @brief A /refresh/reveal Handle */ -struct TALER_MINT_RefreshRevealHandle; +struct TALER_EXCHANGE_RefreshRevealHandle; /** - * Submit a /refresh/reval request to the mint and get the mint's + * Submit a /refresh/reval request to the exchange and get the exchange's * response. * * This API is typically used by a wallet. Note that to ensure that @@ -901,25 +901,25 @@ struct TALER_MINT_RefreshRevealHandle; * arguments should have been committed to persistent storage * prior to calling this function. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param refresh_data_length size of the @a refresh_data (returned - * in the `res_size` argument from #TALER_MINT_refresh_prepare()) + * in the `res_size` argument from #TALER_EXCHANGE_refresh_prepare()) * @param refresh_data the refresh data as returned from - #TALER_MINT_refresh_prepare()) - * @param noreveal_index response from the mint to the - * #TALER_MINT_refresh_melt() invocation + #TALER_EXCHANGE_refresh_prepare()) + * @param noreveal_index response from the exchange to the + * #TALER_EXCHANGE_refresh_melt() invocation * @param reveal_cb the callback to call with the final result of the * refresh operation * @param reveal_cb_cls closure for the above callback * @return a handle for this request; NULL if the argument was invalid. * In this case, neither callback will be called. */ -struct TALER_MINT_RefreshRevealHandle * -TALER_MINT_refresh_reveal (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_RefreshRevealHandle * +TALER_EXCHANGE_refresh_reveal (struct TALER_EXCHANGE_Handle *exchange, size_t refresh_data_length, const char *refresh_data, uint16_t noreveal_index, - TALER_MINT_RefreshRevealCallback reveal_cb, + TALER_EXCHANGE_RefreshRevealCallback reveal_cb, void *reveal_cb_cls); @@ -930,7 +930,7 @@ TALER_MINT_refresh_reveal (struct TALER_MINT_Handle *mint, * @param rrh the refresh reval handle */ void -TALER_MINT_refresh_reveal_cancel (struct TALER_MINT_RefreshRevealHandle *rrh); +TALER_EXCHANGE_refresh_reveal_cancel (struct TALER_EXCHANGE_RefreshRevealHandle *rrh); /* ********************* /refresh/link ***************************** */ @@ -939,26 +939,26 @@ TALER_MINT_refresh_reveal_cancel (struct TALER_MINT_RefreshRevealHandle *rrh); /** * @brief A /refresh/link Handle */ -struct TALER_MINT_RefreshLinkHandle; +struct TALER_EXCHANGE_RefreshLinkHandle; /** * Callbacks of this type are used to return the final result of - * submitting a /refresh/link request to a mint. If the operation was + * submitting a /refresh/link request to a exchange. If the operation was * successful, this function returns the signatures over the coins * that were created when the original coin was melted. * * @param cls closure * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request - * 0 if the mint's reply is bogus (fails to follow the protocol) + * 0 if the exchange's reply is bogus (fails to follow the protocol) * @param num_coins number of fresh coins created, length of the @a sigs and @a coin_privs arrays, 0 if the operation failed * @param coin_privs array of @a num_coins private keys for the coins that were created, NULL on error * @param sigs array of signature over @a num_coins coins, NULL on error * @param pubs array of public keys for the @a sigs, NULL on error - * @param full_response full response from the mint (for logging, in case of errors) + * @param full_response full response from the exchange (for logging, in case of errors) */ typedef void -(*TALER_MINT_RefreshLinkCallback) (void *cls, +(*TALER_EXCHANGE_RefreshLinkCallback) (void *cls, unsigned int http_status, unsigned int num_coins, const struct TALER_CoinSpendPrivateKeyP *coin_privs, @@ -968,23 +968,23 @@ typedef void /** - * Submit a link request to the mint and get the mint's response. + * Submit a link request to the exchange and get the exchange's response. * * This API is typically not used by anyone, it is more a threat * against those trying to receive a funds transfer by abusing the * /refresh protocol. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param coin_priv private key to request link data for * @param link_cb the callback to call with the useful result of the * refresh operation the @a coin_priv was involved in (if any) * @param link_cb_cls closure for @a link_cb * @return a handle for this request */ -struct TALER_MINT_RefreshLinkHandle * -TALER_MINT_refresh_link (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_RefreshLinkHandle * +TALER_EXCHANGE_refresh_link (struct TALER_EXCHANGE_Handle *exchange, const struct TALER_CoinSpendPrivateKeyP *coin_priv, - TALER_MINT_RefreshLinkCallback link_cb, + TALER_EXCHANGE_RefreshLinkCallback link_cb, void *link_cb_cls); @@ -995,7 +995,7 @@ TALER_MINT_refresh_link (struct TALER_MINT_Handle *mint, * @param rlh the refresh link handle */ void -TALER_MINT_refresh_link_cancel (struct TALER_MINT_RefreshLinkHandle *rlh); +TALER_EXCHANGE_refresh_link_cancel (struct TALER_EXCHANGE_RefreshLinkHandle *rlh); /* ********************* /admin/add/incoming *********************** */ @@ -1004,31 +1004,31 @@ TALER_MINT_refresh_link_cancel (struct TALER_MINT_RefreshLinkHandle *rlh); /** * @brief A /admin/add/incoming Handle */ -struct TALER_MINT_AdminAddIncomingHandle; +struct TALER_EXCHANGE_AdminAddIncomingHandle; /** * Callbacks of this type are used to serve the result of submitting - * information about an incoming transaction to a mint. + * information about an incoming transaction to a exchange. * * @param cls closure * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request - * 0 if the mint's reply is bogus (fails to follow the protocol) - * @param full_response full response from the mint (for logging, in case of errors) + * 0 if the exchange's reply is bogus (fails to follow the protocol) + * @param full_response full response from the exchange (for logging, in case of errors) */ typedef void -(*TALER_MINT_AdminAddIncomingResultCallback) (void *cls, +(*TALER_EXCHANGE_AdminAddIncomingResultCallback) (void *cls, unsigned int http_status, json_t *full_response); /** - * Notify the mint that we have received an incoming transaction + * Notify the exchange that we have received an incoming transaction * which fills a reserve. Note that this API is an administrative - * API and thus not accessible to typical mint clients, but only - * to the operators of the mint. + * API and thus not accessible to typical exchange clients, but only + * to the operators of the exchange. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param reserve_pub public key of the reserve * @param amount amount that was deposited * @param execution_date when did we receive the amount @@ -1039,13 +1039,13 @@ typedef void * if the inputs are invalid (i.e. invalid amount). * In this case, the callback is not called. */ -struct TALER_MINT_AdminAddIncomingHandle * -TALER_MINT_admin_add_incoming (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_AdminAddIncomingHandle * +TALER_EXCHANGE_admin_add_incoming (struct TALER_EXCHANGE_Handle *exchange, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *amount, struct GNUNET_TIME_Absolute execution_date, const json_t *wire, - TALER_MINT_AdminAddIncomingResultCallback res_cb, + TALER_EXCHANGE_AdminAddIncomingResultCallback res_cb, void *res_cb_cls); @@ -1056,7 +1056,7 @@ TALER_MINT_admin_add_incoming (struct TALER_MINT_Handle *mint, * @param aai the admin add incoming request handle */ void -TALER_MINT_admin_add_incoming_cancel (struct TALER_MINT_AdminAddIncomingHandle *aai); +TALER_EXCHANGE_admin_add_incoming_cancel (struct TALER_EXCHANGE_AdminAddIncomingHandle *aai); /* ********************* /wire/deposits *********************** */ @@ -1064,12 +1064,12 @@ TALER_MINT_admin_add_incoming_cancel (struct TALER_MINT_AdminAddIncomingHandle * /** * @brief A /wire/deposits Handle */ -struct TALER_MINT_WireDepositsHandle; +struct TALER_EXCHANGE_WireDepositsHandle; /** * Details for one of the /deposit operations that the - * mint combined into a single wire transfer. + * exchange combined into a single wire transfer. */ struct TALER_WireDepositDetails { @@ -1089,7 +1089,7 @@ struct TALER_WireDepositDetails struct TALER_Amount coin_value; /** - * Fee charged by the mint for the deposit. + * Fee charged by the exchange for the deposit. */ struct TALER_Amount coin_fee; @@ -1106,18 +1106,18 @@ struct TALER_WireDepositDetails * of the coin transactions that were combined into the wire transfer. * * @param cls closure - * @param http_status HTTP status code we got, 0 on mint protocol violation + * @param http_status HTTP status code we got, 0 on exchange protocol violation * @param json original json reply (may include signatures, those have then been * validated already) - * @param wtid extracted wire transfer identifier, or NULL if the mint could + * @param wtid extracted wire transfer identifier, or NULL if the exchange could * not provide any (set only if @a http_status is #MHD_HTTP_OK) - * @param total_amount total amount of the wire transfer, or NULL if the mint could + * @param total_amount total amount of the wire transfer, or NULL if the exchange could * not provide any @a wtid (set only if @a http_status is #MHD_HTTP_OK) * @param details_length length of the @a details array * @param details array with details about the combined transactions */ typedef void -(*TALER_MINT_WireDepositsCallback)(void *cls, +(*TALER_EXCHANGE_WireDepositsCallback)(void *cls, unsigned int http_status, json_t *json, const struct GNUNET_HashCode *h_wire, @@ -1127,19 +1127,19 @@ typedef void /** - * Query the mint about which transactions were combined + * Query the exchange about which transactions were combined * to create a wire transfer. * - * @param mint mint to query + * @param exchange exchange to query * @param wtid raw wire transfer identifier to get information about * @param cb callback to call * @param cb_cls closure for @a cb * @return handle to cancel operation */ -struct TALER_MINT_WireDepositsHandle * -TALER_MINT_wire_deposits (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_WireDepositsHandle * +TALER_EXCHANGE_wire_deposits (struct TALER_EXCHANGE_Handle *exchange, const struct TALER_WireTransferIdentifierRawP *wtid, - TALER_MINT_WireDepositsCallback cb, + TALER_EXCHANGE_WireDepositsCallback cb, void *cb_cls); @@ -1150,7 +1150,7 @@ TALER_MINT_wire_deposits (struct TALER_MINT_Handle *mint, * @param wdh the wire deposits request handle */ void -TALER_MINT_wire_deposits_cancel (struct TALER_MINT_WireDepositsHandle *wdh); +TALER_EXCHANGE_wire_deposits_cancel (struct TALER_EXCHANGE_WireDepositsHandle *wdh); /* ********************* /deposit/wtid *********************** */ @@ -1159,23 +1159,23 @@ TALER_MINT_wire_deposits_cancel (struct TALER_MINT_WireDepositsHandle *wdh); /** * @brief A /deposit/wtid Handle */ -struct TALER_MINT_DepositWtidHandle; +struct TALER_EXCHANGE_DepositWtidHandle; /** * Function called with detailed wire transfer data. * * @param cls closure - * @param http_status HTTP status code we got, 0 on mint protocol violation + * @param http_status HTTP status code we got, 0 on exchange protocol violation * @param json original json reply (may include signatures, those have then been * validated already) - * @param wtid wire transfer identifier used by the mint, NULL if mint did not + * @param wtid wire transfer identifier used by the exchange, NULL if exchange did not * yet execute the transaction * @param execution_time actual or planned execution time for the wire transfer * @param coin_contribution contribution to the @a total_amount of the deposited coin (may be NULL) */ typedef void -(*TALER_MINT_DepositWtidCallback)(void *cls, +(*TALER_EXCHANGE_DepositWtidCallback)(void *cls, unsigned int http_status, json_t *json, const struct TALER_WireTransferIdentifierRawP *wtid, @@ -1186,7 +1186,7 @@ typedef void /** * Obtain the wire transfer details for a given deposit. * - * @param mint the mint to query + * @param exchange the exchange to query * @param merchant_priv the merchant's private key * @param h_wire hash of merchant's wire transfer details * @param h_contract hash of the contract @@ -1196,14 +1196,14 @@ typedef void * @param cb_cls closure for @a cb * @return handle to abort request */ -struct TALER_MINT_DepositWtidHandle * -TALER_MINT_deposit_wtid (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_DepositWtidHandle * +TALER_EXCHANGE_deposit_wtid (struct TALER_EXCHANGE_Handle *exchange, const struct TALER_MerchantPrivateKeyP *merchant_priv, const struct GNUNET_HashCode *h_wire, const struct GNUNET_HashCode *h_contract, const struct TALER_CoinSpendPublicKeyP *coin_pub, uint64_t transaction_id, - TALER_MINT_DepositWtidCallback cb, + TALER_EXCHANGE_DepositWtidCallback cb, void *cb_cls); @@ -1214,7 +1214,7 @@ TALER_MINT_deposit_wtid (struct TALER_MINT_Handle *mint, * @param dwh the wire deposits request handle */ void -TALER_MINT_deposit_wtid_cancel (struct TALER_MINT_DepositWtidHandle *dwh); +TALER_EXCHANGE_deposit_wtid_cancel (struct TALER_EXCHANGE_DepositWtidHandle *dwh); -#endif /* _TALER_MINT_SERVICE_H */ +#endif /* _TALER_EXCHANGE_SERVICE_H */ diff --git a/src/include/taler_mintdb_lib.h b/src/include/taler_exchangedb_lib.h similarity index 65% rename from src/include/taler_mintdb_lib.h rename to src/include/taler_exchangedb_lib.h index 70e314d9a..347ad0650 100644 --- a/src/include/taler_mintdb_lib.h +++ b/src/include/taler_exchangedb_lib.h @@ -14,62 +14,62 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file include/taler_mintdb_lib.h - * @brief IO operations for the mint's private keys + * @file include/taler_exchangedb_lib.h + * @brief IO operations for the exchange's private keys * @author Florian Dold * @author Benedikt Mueller * @author Christian Grothoff */ -#ifndef TALER_MINTDB_LIB_H -#define TALER_MINTDB_LIB_H +#ifndef TALER_EXCHANGEDB_LIB_H +#define TALER_EXCHANGEDB_LIB_H #include "taler_signatures.h" /** - * Subdirectroy under the mint's base directory which contains - * the mint's signing keys. + * Subdirectroy under the exchange's base directory which contains + * the exchange's signing keys. */ -#define TALER_MINTDB_DIR_SIGNING_KEYS "signkeys" +#define TALER_EXCHANGEDB_DIR_SIGNING_KEYS "signkeys" /** - * Subdirectory under the mint's base directory which contains - * the mint's denomination keys. + * Subdirectory under the exchange's base directory which contains + * the exchange's denomination keys. */ -#define TALER_MINTDB_DIR_DENOMINATION_KEYS "denomkeys" +#define TALER_EXCHANGEDB_DIR_DENOMINATION_KEYS "denomkeys" /** - * Subdirectory under the mint's base directory which contains - * the mint's auditing information. + * Subdirectory under the exchange's base directory which contains + * the exchange's auditing information. */ -#define TALER_MINTDB_DIR_AUDITORS "auditors" +#define TALER_EXCHANGEDB_DIR_AUDITORS "auditors" GNUNET_NETWORK_STRUCT_BEGIN /** - * @brief On disk format used for a mint signing key. Signing keys are used - * by the mint to affirm its messages, but not to create coins. + * @brief On disk format used for a exchange signing key. Signing keys are used + * by the exchange to affirm its messages, but not to create coins. * Includes the private key followed by the public information about * the signing key. */ -struct TALER_MINTDB_PrivateSigningKeyInformationP +struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP { /** - * Private key part of the mint's signing key. + * Private key part of the exchange's signing key. */ - struct TALER_MintPrivateKeyP signkey_priv; + struct TALER_ExchangePrivateKeyP signkey_priv; /** - * Public information about a mint signing key. + * Public information about a exchange signing key. */ - struct TALER_MintSigningKeyValidityPS issue; + struct TALER_ExchangeSigningKeyValidityPS issue; }; /** * Information about a denomination key. */ -struct TALER_MINTDB_DenominationKeyInformationP +struct TALER_EXCHANGEDB_DenominationKeyInformationP { /** @@ -91,7 +91,7 @@ GNUNET_NETWORK_STRUCT_END * @brief All information about a denomination key (which is used to * sign coins into existence). */ -struct TALER_MINTDB_DenominationKeyIssueInformation +struct TALER_EXCHANGEDB_DenominationKeyIssueInformation { /** * The private key of the denomination. Will be NULL if the private @@ -109,7 +109,7 @@ struct TALER_MINTDB_DenominationKeyIssueInformation /** * Signed public information about a denomination key. */ - struct TALER_MINTDB_DenominationKeyInformationP issue; + struct TALER_EXCHANGEDB_DenominationKeyInformationP issue; }; @@ -124,16 +124,16 @@ struct TALER_MINTDB_DenominationKeyIssueInformation * #GNUNET_SYSERR to abort iteration with error! */ typedef int -(*TALER_MINTDB_SigningKeyIterator)(void *cls, +(*TALER_EXCHANGEDB_SigningKeyIterator)(void *cls, const char *filename, - const struct TALER_MINTDB_PrivateSigningKeyInformationP *ski); + const struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP *ski); /** - * Call @a it for each signing key found in the @a mint_base_dir. + * Call @a it for each signing key found in the @a exchange_base_dir. * - * @param mint_base_dir base directory for the mint, - * the signing keys must be in the #TALER_MINTDB_DIR_SIGNING_KEYS + * @param exchange_base_dir base directory for the exchange, + * the signing keys must be in the #TALER_EXCHANGEDB_DIR_SIGNING_KEYS * subdirectory * @param it function to call on each signing key * @param it_cls closure for @a it @@ -142,8 +142,8 @@ typedef int * files are simply skipped), -1 on error */ int -TALER_MINTDB_signing_keys_iterate (const char *mint_base_dir, - TALER_MINTDB_SigningKeyIterator it, +TALER_EXCHANGEDB_signing_keys_iterate (const char *exchange_base_dir, + TALER_EXCHANGEDB_SigningKeyIterator it, void *it_cls); @@ -159,16 +159,16 @@ TALER_MINTDB_signing_keys_iterate (const char *mint_base_dir, * #GNUNET_SYSERR to abort iteration with error! */ typedef int -(*TALER_MINTDB_DenominationKeyIterator)(void *cls, +(*TALER_EXCHANGEDB_DenominationKeyIterator)(void *cls, const char *alias, - const struct TALER_MINTDB_DenominationKeyIssueInformation *dki); + const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki); /** - * Call @a it for each denomination key found in the @a mint_base_dir. + * Call @a it for each denomination key found in the @a exchange_base_dir. * - * @param mint_base_dir base directory for the mint, - * the signing keys must be in the #TALER_MINTDB_DIR_DENOMINATION_KEYS + * @param exchange_base_dir base directory for the exchange, + * the signing keys must be in the #TALER_EXCHANGEDB_DIR_DENOMINATION_KEYS * subdirectory * @param it function to call on each denomination key found * @param it_cls closure for @a it @@ -178,8 +178,8 @@ typedef int * as maybe none of the files were well-formed) */ int -TALER_MINTDB_denomination_keys_iterate (const char *mint_base_dir, - TALER_MINTDB_DenominationKeyIterator it, +TALER_EXCHANGEDB_denomination_keys_iterate (const char *exchange_base_dir, + TALER_EXCHANGEDB_DenominationKeyIterator it, void *it_cls); @@ -191,8 +191,8 @@ TALER_MINTDB_denomination_keys_iterate (const char *mint_base_dir, * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure. */ int -TALER_MINTDB_denomination_key_write (const char *filename, - const struct TALER_MINTDB_DenominationKeyIssueInformation *dki); +TALER_EXCHANGEDB_denomination_key_write (const char *filename, + const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki); /** @@ -203,8 +203,8 @@ TALER_MINTDB_denomination_key_write (const char *filename, * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure */ int -TALER_MINTDB_denomination_key_read (const char *filename, - struct TALER_MINTDB_DenominationKeyIssueInformation *dki); +TALER_EXCHANGEDB_denomination_key_read (const char *filename, + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki); /** @@ -212,7 +212,7 @@ TALER_MINTDB_denomination_key_read (const char *filename, * * @param cls closure * @param apub the auditor's public key - * @param mpub the mint's public key (as expected by the auditor) + * @param mpub the exchange's public key (as expected by the auditor) * @param dki_len length of @a asig and @a dki arrays * @param asigs array of the auditor's signatures over the @a dks, of length @a dki_len * @param dki array of denomination coin data signed by the auditor, of length @a dki_len @@ -221,7 +221,7 @@ TALER_MINTDB_denomination_key_read (const char *filename, * #GNUNET_SYSERR to abort iteration with error! */ typedef int -(*TALER_MINTDB_AuditorIterator)(void *cls, +(*TALER_EXCHANGEDB_AuditorIterator)(void *cls, const struct TALER_AuditorPublicKeyP *apub, const struct TALER_MasterPublicKeyP *mpub, unsigned int dki_len, @@ -230,10 +230,10 @@ typedef int /** - * Call @a it with information for each auditor found in the @a mint_base_dir. + * Call @a it with information for each auditor found in the @a exchange_base_dir. * - * @param mint_base_dir base directory for the mint, - * the signing keys must be in the #TALER_MINTDB_DIR_DENOMINATION_KEYS + * @param exchange_base_dir base directory for the exchange, + * the signing keys must be in the #TALER_EXCHANGEDB_DIR_DENOMINATION_KEYS * subdirectory * @param it function to call with auditor information * @param it_cls closure for @a it @@ -243,8 +243,8 @@ typedef int * as maybe none of the files were well-formed) */ int -TALER_MINTDB_auditor_iterate (const char *mint_base_dir, - TALER_MINTDB_AuditorIterator it, +TALER_EXCHANGEDB_auditor_iterate (const char *exchange_base_dir, + TALER_EXCHANGEDB_AuditorIterator it, void *it_cls); @@ -254,13 +254,13 @@ TALER_MINTDB_auditor_iterate (const char *mint_base_dir, * @param filename the file where to write the auditor information to * @param apub the auditor's public key * @param asigs the auditor's signatures, array of length @a dki_len - * @param mpub the mint's public key (as expected by the auditor) + * @param mpub the exchange's public key (as expected by the auditor) * @param dki_len length of @a dki and @a asigs arrays * @param dki array of denomination coin data signed by the auditor * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure. */ int -TALER_MINTDB_auditor_write (const char *filename, +TALER_EXCHANGEDB_auditor_write (const char *filename, const struct TALER_AuditorPublicKeyP *apub, const struct TALER_AuditorSignatureP *asigs, const struct TALER_MasterPublicKeyP *mpub, @@ -274,8 +274,8 @@ TALER_MINTDB_auditor_write (const char *filename, * @param cfg configuration to use * @return NULL on failure */ -struct TALER_MINTDB_Plugin * -TALER_MINTDB_plugin_load (const struct GNUNET_CONFIGURATION_Handle *cfg); +struct TALER_EXCHANGEDB_Plugin * +TALER_EXCHANGEDB_plugin_load (const struct GNUNET_CONFIGURATION_Handle *cfg); /** @@ -284,7 +284,7 @@ TALER_MINTDB_plugin_load (const struct GNUNET_CONFIGURATION_Handle *cfg); * @param plugin plugin to unload */ void -TALER_MINTDB_plugin_unload (struct TALER_MINTDB_Plugin *plugin); +TALER_EXCHANGEDB_plugin_unload (struct TALER_EXCHANGEDB_Plugin *plugin); diff --git a/src/include/taler_mintdb_plugin.h b/src/include/taler_exchangedb_plugin.h similarity index 84% rename from src/include/taler_mintdb_plugin.h rename to src/include/taler_exchangedb_plugin.h index b65b3e4f7..aecb050a7 100644 --- a/src/include/taler_mintdb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -14,22 +14,22 @@ TALER; see the file COPYING. If not, If not, see */ /** - * @file include/taler_mintdb_plugin.h - * @brief Low-level (statement-level) database access for the mint + * @file include/taler_exchangedb_plugin.h + * @brief Low-level (statement-level) database access for the exchange * @author Florian Dold * @author Christian Grothoff */ -#ifndef TALER_MINTDB_PLUGIN_H -#define TALER_MINTDB_PLUGIN_H +#ifndef TALER_EXCHANGEDB_PLUGIN_H +#define TALER_EXCHANGEDB_PLUGIN_H #include -#include "taler_mintdb_lib.h" +#include "taler_exchangedb_lib.h" /** * @brief Information we keep on bank transfer(s) that established a reserve. */ -struct TALER_MINTDB_BankTransfer +struct TALER_EXCHANGEDB_BankTransfer { /** @@ -38,13 +38,13 @@ struct TALER_MINTDB_BankTransfer struct TALER_ReservePublicKeyP reserve_pub; /** - * Amount that was transferred to the mint. + * Amount that was transferred to the exchange. */ struct TALER_Amount amount; /** - * When did the mint receive the incoming transaction? - * (This is the execution date of the mint's database, + * When did the exchange receive the incoming transaction? + * (This is the execution date of the exchange's database, * the execution date of the bank should be in @e wire). */ struct GNUNET_TIME_Absolute execution_date; @@ -60,7 +60,7 @@ struct TALER_MINTDB_BankTransfer /** * @brief A summary of a Reserve */ -struct TALER_MINTDB_Reserve +struct TALER_EXCHANGEDB_Reserve { /** * The reserve's public key. This uniquely identifies the reserve @@ -84,7 +84,7 @@ struct TALER_MINTDB_Reserve * the /withdraw operation if needed, and to have proof * that a reserve was drained by this amount. */ -struct TALER_MINTDB_CollectableBlindcoin +struct TALER_EXCHANGEDB_CollectableBlindcoin { /** @@ -98,7 +98,7 @@ struct TALER_MINTDB_CollectableBlindcoin struct TALER_DenominationPublicKey denom_pub; /** - * Value of the coin being minted (matching the denomination key) + * Value of the coin being exchangeed (matching the denomination key) * plus the transaction fee. We include this in what is being * signed so that we can verify a reserve's remaining total balance * without needing to access the respective denomination key @@ -107,14 +107,14 @@ struct TALER_MINTDB_CollectableBlindcoin struct TALER_Amount amount_with_fee; /** - * Withdrawl fee charged by the mint. This must match the Mint's + * Withdrawl fee charged by the exchange. This must match the Exchange's * denomination key's withdrawl fee. If the client puts in an * invalid withdrawl fee (too high or too low) that does not match - * the Mint's denomination key, the withdraw operation is invalid - * and will be rejected by the mint. The @e amount_with_fee minus + * the Exchange's denomination key, the withdraw operation is invalid + * and will be rejected by the exchange. The @e amount_with_fee minus * the @e withdraw_fee is must match the value of the generated * coin. We include this in what is being signed so that we can - * verify a mint's accounting without needing to access the + * verify a exchange's accounting without needing to access the * respective denomination key information each time. */ struct TALER_Amount withdraw_fee; @@ -142,17 +142,17 @@ struct TALER_MINTDB_CollectableBlindcoin /** * @brief Types of operations on a reserved. */ -enum TALER_MINTDB_ReserveOperation +enum TALER_EXCHANGEDB_ReserveOperation { /** * Money was deposited into the reserve via a bank transfer. */ - TALER_MINTDB_RO_BANK_TO_MINT = 0, + TALER_EXCHANGEDB_RO_BANK_TO_EXCHANGE = 0, /** * A Coin was withdrawn from the reserve using /withdraw. */ - TALER_MINTDB_RO_WITHDRAW_COIN = 1 + TALER_EXCHANGEDB_RO_WITHDRAW_COIN = 1 }; @@ -162,18 +162,18 @@ enum TALER_MINTDB_ReserveOperation * established the reserve and all /withdraw operations we have done * since). */ -struct TALER_MINTDB_ReserveHistory +struct TALER_EXCHANGEDB_ReserveHistory { /** * Next entry in the reserve history. */ - struct TALER_MINTDB_ReserveHistory *next; + struct TALER_EXCHANGEDB_ReserveHistory *next; /** * Type of the event, determins @e details. */ - enum TALER_MINTDB_ReserveOperation type; + enum TALER_EXCHANGEDB_ReserveOperation type; /** * Details of the operation, depending on @e type. @@ -182,14 +182,14 @@ struct TALER_MINTDB_ReserveHistory { /** - * Details about a bank transfer to the mint. + * Details about a bank transfer to the exchange. */ - struct TALER_MINTDB_BankTransfer *bank; + struct TALER_EXCHANGEDB_BankTransfer *bank; /** * Details about a /withdraw operation. */ - struct TALER_MINTDB_CollectableBlindcoin *withdraw; + struct TALER_EXCHANGEDB_CollectableBlindcoin *withdraw; } details; @@ -207,7 +207,7 @@ struct TALER_MINTDB_ReserveHistory * (as determined by transaction ID). (Note: we might want to * fix #3819 and include at least h_contract as well.) */ -struct TALER_MINTDB_Deposit +struct TALER_EXCHANGEDB_Deposit { /** * Information about the coin that is being deposited. @@ -230,14 +230,14 @@ struct TALER_MINTDB_Deposit /** * Hash over the contract between merchant and customer - * (remains unknown to the Mint). + * (remains unknown to the Exchange). */ struct GNUNET_HashCode h_contract; /** * Hash of the (canonical) representation of @e wire, used * to check the signature on the request. Generated by - * the mint from the detailed wire data provided by the + * the exchange from the detailed wire data provided by the * merchant. */ struct GNUNET_HashCode h_wire; @@ -256,12 +256,12 @@ struct TALER_MINTDB_Deposit /** * Time when this request was generated. Used, for example, to * assess when (roughly) the income was achieved for tax purposes. - * Note that the Mint will only check that the timestamp is not "too + * Note that the Exchange will only check that the timestamp is not "too * far" into the future (i.e. several days). The fact that the * timestamp falls within the validity period of the coin's * denomination key is irrelevant for the validity of the deposit * request, as obviously the customer and merchant could conspire to - * set any timestamp. Also, the Mint must accept very old deposit + * set any timestamp. Also, the Exchange must accept very old deposit * requests, as the merchant might have been unable to transmit the * deposit request in a timely fashion (so back-dating is not * prevented). @@ -302,7 +302,7 @@ struct TALER_MINTDB_Deposit * dimensions of the operation, security parameters and * client signatures from "/refresh/melt" and "/refresh/commit". */ -struct TALER_MINTDB_RefreshSession +struct TALER_EXCHANGEDB_RefreshSession { /** @@ -316,7 +316,7 @@ struct TALER_MINTDB_RefreshSession uint16_t num_newcoins; /** - * Index (smaller #TALER_CNC_KAPPA) which the mint has chosen to not + * Index (smaller #TALER_CNC_KAPPA) which the exchange has chosen to not * have revealed during cut and choose. */ uint16_t noreveal_index; @@ -327,7 +327,7 @@ struct TALER_MINTDB_RefreshSession /** * @brief Specification for coin in a /refresh/melt operation. */ -struct TALER_MINTDB_RefreshMelt +struct TALER_EXCHANGEDB_RefreshMelt { /** * Information about the coin that is being melted. @@ -355,11 +355,11 @@ struct TALER_MINTDB_RefreshMelt struct TALER_Amount amount_with_fee; /** - * Melting fee charged by the mint. This must match the Mint's + * Melting fee charged by the exchange. This must match the Exchange's * denomination key's melting fee. If the client puts in an invalid - * melting fee (too high or too low) that does not match the Mint's + * melting fee (too high or too low) that does not match the Exchange's * denomination key, the melting operation is invalid and will be - * rejected by the mint. The @e amount_with_fee minus the @e + * rejected by the exchange. The @e amount_with_fee minus the @e * melt_fee is the amount that will be credited to the melting * session. */ @@ -369,12 +369,12 @@ struct TALER_MINTDB_RefreshMelt /** - * @brief We have as many `struct TALER_MINTDB_RefreshCommitCoin` as there are new + * @brief We have as many `struct TALER_EXCHANGEDB_RefreshCommitCoin` as there are new * coins being created by the refresh (for each of the #TALER_CNC_KAPPA - * sets). These are the coins we ask the mint to sign if the + * sets). These are the coins we ask the exchange to sign if the * respective set is selected. */ -struct TALER_MINTDB_RefreshCommitCoin +struct TALER_EXCHANGEDB_RefreshCommitCoin { /** @@ -399,12 +399,12 @@ struct TALER_MINTDB_RefreshCommitCoin /** * @brief Linked list of refresh information linked to a coin. */ -struct TALER_MINTDB_LinkDataList +struct TALER_EXCHANGEDB_LinkDataList { /** * Information is stored in a NULL-terminated linked list. */ - struct TALER_MINTDB_LinkDataList *next; + struct TALER_EXCHANGEDB_LinkDataList *next; /** * Link data, used to recover the private key of the coin @@ -428,17 +428,17 @@ struct TALER_MINTDB_LinkDataList * @brief Enumeration to classify the different types of transactions * that can be done with a coin. */ -enum TALER_MINTDB_TransactionType +enum TALER_EXCHANGEDB_TransactionType { /** * /deposit operation. */ - TALER_MINTDB_TT_DEPOSIT = 0, + TALER_EXCHANGEDB_TT_DEPOSIT = 0, /** * /refresh/melt operation. */ - TALER_MINTDB_TT_REFRESH_MELT = 1 + TALER_EXCHANGEDB_TT_REFRESH_MELT = 1 }; @@ -446,18 +446,18 @@ enum TALER_MINTDB_TransactionType /** * @brief List of transactions we performed for a particular coin. */ -struct TALER_MINTDB_TransactionList +struct TALER_EXCHANGEDB_TransactionList { /** * Next pointer in the NULL-terminated linked list. */ - struct TALER_MINTDB_TransactionList *next; + struct TALER_EXCHANGEDB_TransactionList *next; /** * Type of the transaction, determines what is stored in @e details. */ - enum TALER_MINTDB_TransactionType type; + enum TALER_EXCHANGEDB_TransactionType type; /** * Details about the transaction, depending on @e type. @@ -468,12 +468,12 @@ struct TALER_MINTDB_TransactionList /** * Details if transaction was a /deposit operation. */ - struct TALER_MINTDB_Deposit *deposit; + struct TALER_EXCHANGEDB_Deposit *deposit; /** * Details if transaction was a /refresh/melt operation. */ - struct TALER_MINTDB_RefreshMelt *melt; + struct TALER_EXCHANGEDB_RefreshMelt *melt; } details; @@ -483,7 +483,7 @@ struct TALER_MINTDB_TransactionList /** * @brief All of the information from a /refresh/melt commitment. */ -struct TALER_MINTDB_MeltCommitment +struct TALER_EXCHANGEDB_MeltCommitment { /** @@ -499,7 +499,7 @@ struct TALER_MINTDB_MeltCommitment /** * Array of @e num_oldcoins melt operation details. */ - struct TALER_MINTDB_RefreshMelt *melts; + struct TALER_EXCHANGEDB_RefreshMelt *melts; /** * Array of @e num_newcoins denomination keys @@ -509,7 +509,7 @@ struct TALER_MINTDB_MeltCommitment /** * 2D-Array of #TALER_CNC_KAPPA and @e num_newcoins commitments. */ - struct TALER_MINTDB_RefreshCommitCoin *commit_coins[TALER_CNC_KAPPA]; + struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coins[TALER_CNC_KAPPA]; /** * 2D-Array of #TALER_CNC_KAPPA and @e new_oldcoins links. @@ -521,7 +521,7 @@ struct TALER_MINTDB_MeltCommitment /** * @brief Handle for a database session (per-thread, for transactions). */ -struct TALER_MINTDB_Session; +struct TALER_EXCHANGEDB_Session; /** @@ -535,7 +535,7 @@ struct TALER_MINTDB_Session; * @param merchant_pub public key of the merchant * @param coin_pub public key of the coin * @param amount_with_fee amount that was deposited including fee - * @param deposit_fee amount the mint gets to keep as transaction fees + * @param deposit_fee amount the exchange gets to keep as transaction fees * @param transaction_id unique transaction ID chosen by the merchant * @param h_contract hash of the contract between merchant and customer * @param wire_deadline by which the merchant adviced that he would like the @@ -544,7 +544,7 @@ struct TALER_MINTDB_Session; * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ typedef int -(*TALER_MINTDB_DepositIterator)(void *cls, +(*TALER_EXCHANGEDB_DepositIterator)(void *cls, unsigned long long rowid, const struct TALER_MerchantPublicKeyP *merchant_pub, const struct TALER_CoinSpendPublicKeyP *coin_pub, @@ -566,7 +566,7 @@ typedef int * @param shared_secret_enc set to shared secret for the session */ typedef void -(*TALER_MINTDB_TransferDataCallback)(void *cls, +(*TALER_EXCHANGEDB_TransferDataCallback)(void *cls, const struct GNUNET_HashCode *session_hash, const struct TALER_TransferPublicKeyP *transfer_pub, const struct TALER_EncryptedLinkSecretP *shared_secret_enc); @@ -582,12 +582,12 @@ typedef void * if the transaction was not yet done * @param coin_contribution how much did the coin we asked about * contribute to the total transfer value? (deposit value including fee) - * @param coin_fee how much did the mint charge for the deposit fee + * @param coin_fee how much did the exchange charge for the deposit fee * @param execution_time when was the transaction done, or * when we expect it to be done (if @a wtid was NULL) */ typedef void -(*TALER_MINTDB_DepositWtidCallback)(void *cls, +(*TALER_EXCHANGEDB_DepositWtidCallback)(void *cls, const struct TALER_WireTransferIdentifierRawP *wtid, const struct TALER_Amount *coin_contribution, const struct TALER_Amount *coin_fee, @@ -608,7 +608,7 @@ typedef void * @param coin_fee applicable fee for this coin */ typedef void -(*TALER_MINTDB_WireTransferDataCallback)(void *cls, +(*TALER_EXCHANGEDB_WireTransferDataCallback)(void *cls, const struct TALER_MerchantPublicKeyP *merchant_pub, const struct GNUNET_HashCode *h_wire, const struct GNUNET_HashCode *h_contract, @@ -627,7 +627,7 @@ typedef void * @param buf_size number of bytes in @a buf, 0 on error */ typedef void -(*TALER_MINTDB_WirePreparationCallback) (void *cls, +(*TALER_EXCHANGEDB_WirePreparationCallback) (void *cls, unsigned long long rowid, const char *buf, size_t buf_size); @@ -637,7 +637,7 @@ typedef void * @brief The plugin API, returned from the plugin's "init" function. * The argument given to "init" is simply a configuration handle. */ -struct TALER_MINTDB_Plugin +struct TALER_EXCHANGEDB_Plugin { /** @@ -660,7 +660,7 @@ struct TALER_MINTDB_Plugin * database default one * @param the database connection, or NULL on error */ - struct TALER_MINTDB_Session * + struct TALER_EXCHANGEDB_Session * (*get_session) (void *cls, int temporary); @@ -673,7 +673,7 @@ struct TALER_MINTDB_Plugin */ int (*drop_temporary) (void *cls, - struct TALER_MINTDB_Session *db); + struct TALER_EXCHANGEDB_Session *db); /** @@ -697,7 +697,7 @@ struct TALER_MINTDB_Plugin */ int (*start) (void *cls, - struct TALER_MINTDB_Session *session); + struct TALER_EXCHANGEDB_Session *session); /** @@ -710,7 +710,7 @@ struct TALER_MINTDB_Plugin */ int (*commit) (void *cls, - struct TALER_MINTDB_Session *session); + struct TALER_EXCHANGEDB_Session *session); /** @@ -721,7 +721,7 @@ struct TALER_MINTDB_Plugin */ void (*rollback) (void *cls, - struct TALER_MINTDB_Session *session); + struct TALER_EXCHANGEDB_Session *session); /** @@ -737,9 +737,9 @@ struct TALER_MINTDB_Plugin */ int (*insert_denomination_info) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_DenominationPublicKey *denom_pub, - const struct TALER_MINTDB_DenominationKeyInformationP *issue); + const struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue); /** @@ -753,9 +753,9 @@ struct TALER_MINTDB_Plugin */ int (*get_denomination_info) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_DenominationPublicKey *denom_pub, - struct TALER_MINTDB_DenominationKeyInformationP *issue); + struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue); /** @@ -770,8 +770,8 @@ struct TALER_MINTDB_Plugin */ int (*reserve_get) (void *cls, - struct TALER_MINTDB_Session *db, - struct TALER_MINTDB_Reserve *reserve); + struct TALER_EXCHANGEDB_Session *db, + struct TALER_EXCHANGEDB_Reserve *reserve); /** @@ -793,7 +793,7 @@ struct TALER_MINTDB_Plugin */ int (*reserves_in_insert) (void *cls, - struct TALER_MINTDB_Session *db, + struct TALER_EXCHANGEDB_Session *db, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *balance, struct GNUNET_TIME_Absolute execution_time, @@ -816,9 +816,9 @@ struct TALER_MINTDB_Plugin */ int (*get_withdraw_info) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *h_blind, - struct TALER_MINTDB_CollectableBlindcoin *collectable); + struct TALER_EXCHANGEDB_CollectableBlindcoin *collectable); /** @@ -835,8 +835,8 @@ struct TALER_MINTDB_Plugin */ int (*insert_withdraw_info) (void *cls, - struct TALER_MINTDB_Session *session, - const struct TALER_MINTDB_CollectableBlindcoin *collectable); + struct TALER_EXCHANGEDB_Session *session, + const struct TALER_EXCHANGEDB_CollectableBlindcoin *collectable); /** @@ -848,9 +848,9 @@ struct TALER_MINTDB_Plugin * @param reserve_pub public key of the reserve * @return known transaction history (NULL if reserve is unknown) */ - struct TALER_MINTDB_ReserveHistory * + struct TALER_EXCHANGEDB_ReserveHistory * (*get_reserve_history) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_ReservePublicKeyP *reserve_pub); @@ -862,7 +862,7 @@ struct TALER_MINTDB_Plugin */ void (*free_reserve_history) (void *cls, - struct TALER_MINTDB_ReserveHistory *rh); + struct TALER_EXCHANGEDB_ReserveHistory *rh); /** @@ -877,8 +877,8 @@ struct TALER_MINTDB_Plugin */ int (*have_deposit) (void *cls, - struct TALER_MINTDB_Session *session, - const struct TALER_MINTDB_Deposit *deposit); + struct TALER_EXCHANGEDB_Session *session, + const struct TALER_EXCHANGEDB_Deposit *deposit); /** @@ -891,8 +891,8 @@ struct TALER_MINTDB_Plugin */ int (*insert_deposit) (void *cls, - struct TALER_MINTDB_Session *session, - const struct TALER_MINTDB_Deposit *deposit); + struct TALER_EXCHANGEDB_Session *session, + const struct TALER_EXCHANGEDB_Deposit *deposit); /** @@ -907,7 +907,7 @@ struct TALER_MINTDB_Plugin */ int (*mark_deposit_tiny) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, unsigned long long rowid); @@ -923,7 +923,7 @@ struct TALER_MINTDB_Plugin */ int (*mark_deposit_done) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, unsigned long long rowid); @@ -941,8 +941,8 @@ struct TALER_MINTDB_Plugin */ int (*get_ready_deposit) (void *cls, - struct TALER_MINTDB_Session *session, - TALER_MINTDB_DepositIterator deposit_cb, + struct TALER_EXCHANGEDB_Session *session, + TALER_EXCHANGEDB_DepositIterator deposit_cb, void *deposit_cb_cls); @@ -962,10 +962,10 @@ struct TALER_MINTDB_Plugin */ int (*iterate_matching_deposits) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *h_wire, const struct TALER_MerchantPublicKeyP *merchant_pub, - TALER_MINTDB_DepositIterator deposit_cb, + TALER_EXCHANGEDB_DepositIterator deposit_cb, void *deposit_cb_cls, uint32_t limit); @@ -983,9 +983,9 @@ struct TALER_MINTDB_Plugin */ int (*get_refresh_session) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, - struct TALER_MINTDB_RefreshSession *refresh_session); + struct TALER_EXCHANGEDB_RefreshSession *refresh_session); /** @@ -1000,9 +1000,9 @@ struct TALER_MINTDB_Plugin */ int (*create_refresh_session) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, - const struct TALER_MINTDB_RefreshSession *refresh_session); + const struct TALER_EXCHANGEDB_RefreshSession *refresh_session); /** @@ -1018,9 +1018,9 @@ struct TALER_MINTDB_Plugin */ int (*insert_refresh_melt) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, uint16_t oldcoin_index, - const struct TALER_MINTDB_RefreshMelt *melt); + const struct TALER_EXCHANGEDB_RefreshMelt *melt); /** @@ -1036,10 +1036,10 @@ struct TALER_MINTDB_Plugin */ int (*get_refresh_melt) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t oldcoin_index, - struct TALER_MINTDB_RefreshMelt *melt); + struct TALER_EXCHANGEDB_RefreshMelt *melt); /** @@ -1056,7 +1056,7 @@ struct TALER_MINTDB_Plugin */ int (*insert_refresh_order) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t num_newcoins, const struct TALER_DenominationPublicKey *denom_pubs); @@ -1076,7 +1076,7 @@ struct TALER_MINTDB_Plugin */ int (*get_refresh_order) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t num_newcoins, struct TALER_DenominationPublicKey *denom_pubs); @@ -1097,11 +1097,11 @@ struct TALER_MINTDB_Plugin */ int (*insert_refresh_commit_coins) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t cnc_index, uint16_t num_newcoins, - const struct TALER_MINTDB_RefreshCommitCoin *commit_coins); + const struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coins); /** @@ -1120,11 +1120,11 @@ struct TALER_MINTDB_Plugin */ int (*get_refresh_commit_coins) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t cnc_index, uint16_t num_coins, - struct TALER_MINTDB_RefreshCommitCoin *commit_coins); + struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coins); /** @@ -1141,7 +1141,7 @@ struct TALER_MINTDB_Plugin */ int (*insert_refresh_commit_links) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t cnc_index, uint16_t num_links, @@ -1163,7 +1163,7 @@ struct TALER_MINTDB_Plugin */ int (*get_refresh_commit_links) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t cnc_index, uint16_t num_links, @@ -1179,9 +1179,9 @@ struct TALER_MINTDB_Plugin * @return NULL if the @a session_hash does not correspond to any known melt * operation */ - struct TALER_MINTDB_MeltCommitment * + struct TALER_EXCHANGEDB_MeltCommitment * (*get_melt_commitment) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash); @@ -1193,7 +1193,7 @@ struct TALER_MINTDB_Plugin */ void (*free_melt_commitment) (void *cls, - struct TALER_MINTDB_MeltCommitment *mc); + struct TALER_EXCHANGEDB_MeltCommitment *mc); /** @@ -1211,7 +1211,7 @@ struct TALER_MINTDB_Plugin */ int (*insert_refresh_out) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t newcoin_index, const struct TALER_DenominationSignature *ev_sig); @@ -1226,9 +1226,9 @@ struct TALER_MINTDB_Plugin * @param session_hash session to get linkage data for * @return all known link data for the session */ - struct TALER_MINTDB_LinkDataList * + struct TALER_EXCHANGEDB_LinkDataList * (*get_link_data_list) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash); @@ -1240,7 +1240,7 @@ struct TALER_MINTDB_Plugin */ void (*free_link_data_list) (void *cls, - struct TALER_MINTDB_LinkDataList *ldl); + struct TALER_EXCHANGEDB_LinkDataList *ldl); /** @@ -1261,9 +1261,9 @@ struct TALER_MINTDB_Plugin */ int (*get_transfer) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_CoinSpendPublicKeyP *coin_pub, - TALER_MINTDB_TransferDataCallback tdc, + TALER_EXCHANGEDB_TransferDataCallback tdc, void *tdc_cls); @@ -1276,9 +1276,9 @@ struct TALER_MINTDB_Plugin * @param coin_pub coin to investigate * @return list of transactions, NULL if coin is fresh */ - struct TALER_MINTDB_TransactionList * + struct TALER_EXCHANGEDB_TransactionList * (*get_coin_transactions) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_CoinSpendPublicKeyP *coin_pub); @@ -1290,7 +1290,7 @@ struct TALER_MINTDB_Plugin */ void (*free_coin_transaction_list) (void *cls, - struct TALER_MINTDB_TransactionList *list); + struct TALER_EXCHANGEDB_TransactionList *list); /** @@ -1307,9 +1307,9 @@ struct TALER_MINTDB_Plugin */ int (*lookup_wire_transfer) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_WireTransferIdentifierRawP *wtid, - TALER_MINTDB_WireTransferDataCallback cb, + TALER_EXCHANGEDB_WireTransferDataCallback cb, void *cb_cls); @@ -1332,13 +1332,13 @@ struct TALER_MINTDB_Plugin */ int (*wire_lookup_deposit_wtid)(void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *h_contract, const struct GNUNET_HashCode *h_wire, const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_MerchantPublicKeyP *merchant_pub, uint64_t transaction_id, - TALER_MINTDB_DepositWtidCallback cb, + TALER_EXCHANGEDB_DepositWtidCallback cb, void *cb_cls); @@ -1355,12 +1355,12 @@ struct TALER_MINTDB_Plugin * @param execution_time when did we execute the transaction * @param coin_pub which public key was this payment about * @param coin_value amount contributed by this coin in total - * @param coin_fee deposit fee charged by mint for this coin + * @param coin_fee deposit fee charged by exchange for this coin * @return #GNUNET_OK on success, #GNUNET_SYSERR on DB errors */ int (*insert_aggregation_tracking)(void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_WireTransferIdentifierRawP *wtid, const struct TALER_MerchantPublicKeyP *merchant_pub, const struct GNUNET_HashCode *h_wire, @@ -1384,7 +1384,7 @@ struct TALER_MINTDB_Plugin */ int (*wire_prepare_data_insert)(void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const char *type, const char *buf, size_t buf_size); @@ -1400,7 +1400,7 @@ struct TALER_MINTDB_Plugin */ int (*wire_prepare_data_mark_finished)(void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, unsigned long long rowid); @@ -1419,13 +1419,13 @@ struct TALER_MINTDB_Plugin */ int (*wire_prepare_data_get)(void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const char *type, - TALER_MINTDB_WirePreparationCallback cb, + TALER_EXCHANGEDB_WirePreparationCallback cb, void *cb_cls); }; -#endif /* _TALER_MINT_DB_H */ +#endif /* _TALER_EXCHANGE_DB_H */ diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h index 2526597ee..729bed262 100644 --- a/src/include/taler_signatures.h +++ b/src/include/taler_signatures.h @@ -54,62 +54,62 @@ #define TALER_IDLE_RESERVE_EXPIRATION_TIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_YEARS, 5) /*********************************************/ -/* Mint offline signatures (with master key) */ +/* Exchange offline signatures (with master key) */ /*********************************************/ /** - * Purpose for signing public keys signed by the mint master key. + * Purpose for signing public keys signed by the exchange master key. */ #define TALER_SIGNATURE_MASTER_SIGNING_KEY_VALIDITY 1024 /** - * Purpose for denomination keys signed by the mint master key. + * Purpose for denomination keys signed by the exchange master key. */ #define TALER_SIGNATURE_MASTER_DENOMINATION_KEY_VALIDITY 1025 /** - * Signature where the Mint confirms its SEPA details in + * Signature where the Exchange confirms its SEPA details in * the /wire/sepa response. */ #define TALER_SIGNATURE_MASTER_SEPA_DETAILS 1026 /*********************************************/ -/* Mint online signatures (with signing key) */ +/* Exchange online signatures (with signing key) */ /*********************************************/ /** - * Purpose for the state of a reserve, signed by the mint's signing + * Purpose for the state of a reserve, signed by the exchange's signing * key. */ -#define TALER_SIGNATURE_MINT_RESERVE_STATUS 1032 +#define TALER_SIGNATURE_EXCHANGE_RESERVE_STATUS 1032 /** - * Signature where the Mint confirms a deposit request. + * Signature where the Exchange confirms a deposit request. */ -#define TALER_SIGNATURE_MINT_CONFIRM_DEPOSIT 1033 +#define TALER_SIGNATURE_EXCHANGE_CONFIRM_DEPOSIT 1033 /** - * Signature where the mint (current signing key) confirms the + * Signature where the exchange (current signing key) confirms the * no-reveal index for cut-and-choose and the validity of the melted * coins. */ -#define TALER_SIGNATURE_MINT_CONFIRM_MELT 1034 +#define TALER_SIGNATURE_EXCHANGE_CONFIRM_MELT 1034 /** - * Signature where the Mint confirms the full /keys response set. + * Signature where the Exchange confirms the full /keys response set. */ -#define TALER_SIGNATURE_MINT_KEY_SET 1035 +#define TALER_SIGNATURE_EXCHANGE_KEY_SET 1035 /** - * Signature where the Mint confirms the /wire response. + * Signature where the Exchange confirms the /wire response. */ -#define TALER_SIGNATURE_MINT_WIRE_TYPES 1036 +#define TALER_SIGNATURE_EXCHANGE_WIRE_TYPES 1036 /** - * Signature where the Mint confirms the /deposit/wtid response. + * Signature where the Exchange confirms the /deposit/wtid response. */ -#define TALER_SIGNATURE_MINT_CONFIRM_WIRE 1036 +#define TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE 1036 /*********************/ @@ -118,9 +118,9 @@ /** * Signature where the auditor confirms that he is - * aware of certain denomination keys from the mint. + * aware of certain denomination keys from the exchange. */ -#define TALER_SIGNATURE_AUDITOR_MINT_KEYS 1064 +#define TALER_SIGNATURE_AUDITOR_EXCHANGE_KEYS 1064 /***********************/ @@ -176,7 +176,7 @@ /** * EdDSA test signature. */ -#define TALER_SIGNATURE_MINT_TEST_EDDSA 1303 +#define TALER_SIGNATURE_EXCHANGE_TEST_EDDSA 1303 @@ -202,7 +202,7 @@ struct TALER_WithdrawRequestPS struct TALER_ReservePublicKeyP reserve_pub; /** - * Value of the coin being minted (matching the denomination key) + * Value of the coin being exchangeed (matching the denomination key) * plus the transaction fee. We include this in what is being * signed so that we can verify a reserve's remaining total balance * without needing to access the respective denomination key @@ -211,14 +211,14 @@ struct TALER_WithdrawRequestPS struct TALER_AmountNBO amount_with_fee; /** - * Withdrawl fee charged by the mint. This must match the Mint's + * Withdrawl fee charged by the exchange. This must match the Exchange's * denomination key's withdrawl fee. If the client puts in an * invalid withdrawl fee (too high or too low) that does not match - * the Mint's denomination key, the withdraw operation is invalid - * and will be rejected by the mint. The @e amount_with_fee minus + * the Exchange's denomination key, the withdraw operation is invalid + * and will be rejected by the exchange. The @e amount_with_fee minus * the @e withdraw_fee is must match the value of the generated * coin. We include this in what is being signed so that we can - * verify a mint's accounting without needing to access the + * verify a exchange's accounting without needing to access the * respective denomination key information each time. */ struct TALER_AmountNBO withdraw_fee; @@ -229,7 +229,7 @@ struct TALER_WithdrawRequestPS struct GNUNET_HashCode h_denomination_pub GNUNET_PACKED; /** - * Hash of the (blinded) message to be signed by the Mint. + * Hash of the (blinded) message to be signed by the Exchange. */ struct GNUNET_HashCode h_coin_envelope GNUNET_PACKED; }; @@ -260,12 +260,12 @@ struct TALER_DepositRequestPS /** * Time when this request was generated. Used, for example, to * assess when (roughly) the income was achieved for tax purposes. - * Note that the Mint will only check that the timestamp is not "too + * Note that the Exchange will only check that the timestamp is not "too * far" into the future (i.e. several days). The fact that the * timestamp falls within the validity period of the coin's * denomination key is irrelevant for the validity of the deposit * request, as obviously the customer and merchant could conspire to - * set any timestamp. Also, the Mint must accept very old deposit + * set any timestamp. Also, the Exchange must accept very old deposit * requests, as the merchant might have been unable to transmit the * deposit request in a timely fashion (so back-dating is not * prevented). @@ -293,17 +293,17 @@ struct TALER_DepositRequestPS /** * Amount to be deposited, including deposit fee charged by the - * mint. This is the total amount that the coin's value at the mint + * exchange. This is the total amount that the coin's value at the exchange * will be reduced by. */ struct TALER_AmountNBO amount_with_fee; /** - * Depositing fee charged by the mint. This must match the Mint's + * Depositing fee charged by the exchange. This must match the Exchange's * denomination key's depositing fee. If the client puts in an * invalid deposit fee (too high or too low) that does not match the - * Mint's denomination key, the deposit operation is invalid and - * will be rejected by the mint. The @e amount_with_fee minus the + * Exchange's denomination key, the deposit operation is invalid and + * will be rejected by the exchange. The @e amount_with_fee minus the * @e deposit_fee is the amount that will be transferred to the * account identified by @e h_wire. */ @@ -317,7 +317,7 @@ struct TALER_DepositRequestPS /** * The coin's public key. This is the value that must have been - * signed (blindly) by the Mint. The deposit request is to be + * signed (blindly) by the Exchange. The deposit request is to be * signed by the corresponding private key (using EdDSA). */ struct TALER_CoinSpendPublicKeyP coin_pub; @@ -327,13 +327,13 @@ struct TALER_DepositRequestPS /** * @brief Format used to generate the signature on a confirmation - * from the mint that a deposit request succeeded. + * from the exchange that a deposit request succeeded. */ struct TALER_DepositConfirmationPS { /** - * Purpose must be #TALER_SIGNATURE_MINT_CONFIRM_DEPOSIT. Signed - * by a `struct TALER_MintPublicKeyP` using EdDSA. + * Purpose must be #TALER_SIGNATURE_EXCHANGE_CONFIRM_DEPOSIT. Signed + * by a `struct TALER_ExchangePublicKeyP` using EdDSA. */ struct GNUNET_CRYPTO_EccSignaturePurpose purpose; @@ -362,7 +362,7 @@ struct TALER_DepositConfirmationPS * How much time does the @e merchant have to issue a refund * request? Zero if refunds are not allowed. After this time, the * coin cannot be refunded. Note that the wire transfer will not be - * performed by the mint until the refund deadline. This value + * performed by the exchange until the refund deadline. This value * is taken from the original deposit request. */ struct GNUNET_TIME_AbsoluteNBO refund_deadline; @@ -375,7 +375,7 @@ struct TALER_DepositConfirmationPS /** * The coin's public key. This is the value that must have been - * signed (blindly) by the Mint. The deposit request is to be + * signed (blindly) by the Exchange. The deposit request is to be * signed by the corresponding private key (using EdDSA). */ struct TALER_CoinSpendPublicKeyP coin_pub; @@ -417,11 +417,11 @@ struct TALER_RefreshMeltCoinAffirmationPS struct TALER_AmountNBO amount_with_fee; /** - * Melting fee charged by the mint. This must match the Mint's + * Melting fee charged by the exchange. This must match the Exchange's * denomination key's melting fee. If the client puts in an invalid - * melting fee (too high or too low) that does not match the Mint's + * melting fee (too high or too low) that does not match the Exchange's * denomination key, the melting operation is invalid and will be - * rejected by the mint. The @e amount_with_fee minus the @e + * rejected by the exchange. The @e amount_with_fee minus the @e * melt_fee is the amount that will be credited to the melting * session. */ @@ -429,7 +429,7 @@ struct TALER_RefreshMeltCoinAffirmationPS /** * The coin's public key. This is the value that must have been - * signed (blindly) by the Mint. The deposit request is to be + * signed (blindly) by the Exchange. The deposit request is to be * signed by the corresponding private key (using EdDSA). */ struct TALER_CoinSpendPublicKeyP coin_pub; @@ -437,16 +437,16 @@ struct TALER_RefreshMeltCoinAffirmationPS /** - * @brief Format of the block signed by the Mint in response to a successful - * "/refresh/melt" request. Hereby the mint affirms that all of the - * coins were successfully melted. This also commits the mint to a + * @brief Format of the block signed by the Exchange in response to a successful + * "/refresh/melt" request. Hereby the exchange affirms that all of the + * coins were successfully melted. This also commits the exchange to a * particular index to not be revealed during the refresh. */ struct TALER_RefreshMeltConfirmationPS { /** - * Purpose is #TALER_SIGNATURE_MINT_CONFIRM_MELT. Signed - * by a `struct TALER_MintPublicKeyP` using EdDSA. + * Purpose is #TALER_SIGNATURE_EXCHANGE_CONFIRM_MELT. Signed + * by a `struct TALER_ExchangePublicKeyP` using EdDSA. */ struct GNUNET_CRYPTO_EccSignaturePurpose purpose; @@ -469,14 +469,14 @@ struct TALER_RefreshMeltConfirmationPS /** - * @brief Information about a signing key of the mint. Signing keys are used - * to sign mint messages other than coins, i.e. to confirm that a + * @brief Information about a signing key of the exchange. Signing keys are used + * to sign exchange messages other than coins, i.e. to confirm that a * deposit was successful or that a refresh was accepted. */ -struct TALER_MintSigningKeyValidityPS +struct TALER_ExchangeSigningKeyValidityPS { /** - * Signature over the signing key (by the master key of the mint). + * Signature over the signing key (by the master key of the exchange). * * FIXME: should be moved outside of the "PS" struct, this is ugly. * (and makes this struct different from all of the others) @@ -489,8 +489,8 @@ struct TALER_MintSigningKeyValidityPS struct GNUNET_CRYPTO_EccSignaturePurpose purpose; /** - * Master public key of the mint corresponding to @e signature. - * This is the long-term offline master key of the mint. + * Master public key of the exchange corresponding to @e signature. + * This is the long-term offline master key of the exchange. */ struct TALER_MasterPublicKeyP master_public_key; @@ -501,7 +501,7 @@ struct TALER_MintSigningKeyValidityPS /** * When does this signing key expire? Note: This is currently when - * the Mint will definitively stop using it. Signatures made with + * the Exchange will definitively stop using it. Signatures made with * the key remain valid until @e end. When checking validity periods, * clients should allow for some overlap between keys and tolerate * the use of either key during the overlap time (due to the @@ -512,31 +512,31 @@ struct TALER_MintSigningKeyValidityPS /** * When do signatures with this signing key become invalid? After * this point, these signatures cannot be used in (legal) disputes - * anymore, as the Mint is then allowed to destroy its side of the + * anymore, as the Exchange is then allowed to destroy its side of the * evidence. @e end is expected to be significantly larger than @e * expire (by a year or more). */ struct GNUNET_TIME_AbsoluteNBO end; /** - * The public online signing key that the mint will use + * The public online signing key that the exchange will use * between @e start and @e expire. */ - struct TALER_MintPublicKeyP signkey_pub; + struct TALER_ExchangePublicKeyP signkey_pub; }; /** - * @brief Signature made by the mint over the full set of keys, used - * to detect cheating mints that give out different sets to + * @brief Signature made by the exchange over the full set of keys, used + * to detect cheating exchanges that give out different sets to * different users. */ -struct TALER_MintKeySetPS +struct TALER_ExchangeKeySetPS { /** - * Purpose is #TALER_SIGNATURE_MINT_KEY_SET. Signed - * by a `struct TALER_MintPublicKeyP` using EdDSA. + * Purpose is #TALER_SIGNATURE_EXCHANGE_KEY_SET. Signed + * by a `struct TALER_ExchangePublicKeyP` using EdDSA. */ struct GNUNET_CRYPTO_EccSignaturePurpose purpose; @@ -565,7 +565,7 @@ struct TALER_DenominationKeyValidityPS struct GNUNET_CRYPTO_EccSignaturePurpose purpose; /** - * The long-term offline master key of the mint that was + * The long-term offline master key of the exchange that was * used to create @e signature. */ struct TALER_MasterPublicKeyP master; @@ -576,14 +576,14 @@ struct TALER_DenominationKeyValidityPS struct GNUNET_TIME_AbsoluteNBO start; /** - * The mint will sign fresh coins between @e start and this time. + * The exchange will sign fresh coins between @e start and this time. * @e expire_withdraw will be somewhat larger than @e start to * ensure a sufficiently large anonymity set, while also allowing - * the Mint to limit the financial damage in case of a key being - * compromised. Thus, mints with low volume are expected to have a - * longer withdraw period (@e expire_withdraw - @e start) than mints + * the Exchange to limit the financial damage in case of a key being + * compromised. Thus, exchanges with low volume are expected to have a + * longer withdraw period (@e expire_withdraw - @e start) than exchanges * with high transaction volume. The period may also differ between - * types of coins. A mint may also have a few denomination keys + * types of coins. A exchange may also have a few denomination keys * with the same value with overlapping validity periods, to address * issues such as clock skew. */ @@ -592,7 +592,7 @@ struct TALER_DenominationKeyValidityPS /** * Coins signed with the denomination key must be spent or refreshed * between @e start and this expiration time. After this time, the - * mint will refuse transactions involving this key as it will + * exchange will refuse transactions involving this key as it will * "drop" the table with double-spending information (shortly after) * this time. Note that wallets should refresh coins significantly * before this time to be on the safe side. @e expire_spend must be @@ -604,7 +604,7 @@ struct TALER_DenominationKeyValidityPS /** * When do signatures with this denomination key become invalid? * After this point, these signatures cannot be used in (legal) - * disputes anymore, as the Mint is then allowed to destroy its side + * disputes anymore, as the Exchange is then allowed to destroy its side * of the evidence. @e expire_legal is expected to be significantly * larger than @e expire_spend (by a year or more). */ @@ -616,19 +616,19 @@ struct TALER_DenominationKeyValidityPS struct TALER_AmountNBO value; /** - * The fee the mint charges when a coin of this type is withdrawn. + * The fee the exchange charges when a coin of this type is withdrawn. * (can be zero). */ struct TALER_AmountNBO fee_withdraw; /** - * The fee the mint charges when a coin of this type is deposited. + * The fee the exchange charges when a coin of this type is deposited. * (can be zero). */ struct TALER_AmountNBO fee_deposit; /** - * The fee the mint charges when a coin of this type is refreshed. + * The fee the exchange charges when a coin of this type is refreshed. * (can be zero). */ struct TALER_AmountNBO fee_refresh; @@ -645,18 +645,18 @@ struct TALER_DenominationKeyValidityPS /** * @brief Information signed by an auditor affirming * the master public key and the denomination keys - * of a mint. + * of a exchange. */ -struct TALER_MintKeyValidityPS +struct TALER_ExchangeKeyValidityPS { /** - * Purpose is #TALER_SIGNATURE_AUDITOR_MINT_KEYS. + * Purpose is #TALER_SIGNATURE_AUDITOR_EXCHANGE_KEYS. */ struct GNUNET_CRYPTO_EccSignaturePurpose purpose; /** - * The long-term offline master key of the mint, affirmed by the + * The long-term offline master key of the exchange, affirmed by the * auditor. */ struct TALER_MasterPublicKeyP master; @@ -667,14 +667,14 @@ struct TALER_MintKeyValidityPS struct GNUNET_TIME_AbsoluteNBO start; /** - * The mint will sign fresh coins between @e start and this time. + * The exchange will sign fresh coins between @e start and this time. * @e expire_withdraw will be somewhat larger than @e start to * ensure a sufficiently large anonymity set, while also allowing - * the Mint to limit the financial damage in case of a key being - * compromised. Thus, mints with low volume are expected to have a - * longer withdraw period (@e expire_withdraw - @e start) than mints + * the Exchange to limit the financial damage in case of a key being + * compromised. Thus, exchanges with low volume are expected to have a + * longer withdraw period (@e expire_withdraw - @e start) than exchanges * with high transaction volume. The period may also differ between - * types of coins. A mint may also have a few denomination keys + * types of coins. A exchange may also have a few denomination keys * with the same value with overlapping validity periods, to address * issues such as clock skew. */ @@ -683,7 +683,7 @@ struct TALER_MintKeyValidityPS /** * Coins signed with the denomination key must be spent or refreshed * between @e start and this expiration time. After this time, the - * mint will refuse transactions involving this key as it will + * exchange will refuse transactions involving this key as it will * "drop" the table with double-spending information (shortly after) * this time. Note that wallets should refresh coins significantly * before this time to be on the safe side. @e expire_spend must be @@ -695,7 +695,7 @@ struct TALER_MintKeyValidityPS /** * When do signatures with this denomination key become invalid? * After this point, these signatures cannot be used in (legal) - * disputes anymore, as the Mint is then allowed to destroy its side + * disputes anymore, as the Exchange is then allowed to destroy its side * of the evidence. @e expire_legal is expected to be significantly * larger than @e expire_spend (by a year or more). */ @@ -707,19 +707,19 @@ struct TALER_MintKeyValidityPS struct TALER_AmountNBO value; /** - * The fee the mint charges when a coin of this type is withdrawn. + * The fee the exchange charges when a coin of this type is withdrawn. * (can be zero). */ struct TALER_AmountNBO fee_withdraw; /** - * The fee the mint charges when a coin of this type is deposited. + * The fee the exchange charges when a coin of this type is deposited. * (can be zero). */ struct TALER_AmountNBO fee_deposit; /** - * The fee the mint charges when a coin of this type is refreshed. + * The fee the exchange charges when a coin of this type is refreshed. * (can be zero). */ struct TALER_AmountNBO fee_refresh; @@ -737,7 +737,7 @@ struct TALER_MintKeyValidityPS * @brief For each (old) coin being melted, we have a `struct * RefreshCommitLinkP` that allows the user to find the shared secret * to decrypt the respective refresh links for the new coins in the - * `struct TALER_MINTDB_RefreshCommitCoin`. + * `struct TALER_EXCHANGEDB_RefreshCommitCoin`. * * Part of the construction of the refresh session's hash and * thus of what is signed there. @@ -759,8 +759,8 @@ struct TALER_RefreshCommitLinkP /** - * @brief Information signed by the mint's master - * key affirming the SEPA details for the mint. + * @brief Information signed by the exchange's master + * key affirming the SEPA details for the exchange. */ struct TALER_MasterWireSepaDetailsPS { @@ -780,19 +780,19 @@ struct TALER_MasterWireSepaDetailsPS /** - * @brief Information signed by a mint's online signing key affirming - * the wire formats supported by the mint. + * @brief Information signed by a exchange's online signing key affirming + * the wire formats supported by the exchange. */ -struct TALER_MintWireSupportMethodsPS +struct TALER_ExchangeWireSupportMethodsPS { /** - * Purpose is #TALER_SIGNATURE_MINT_WIRE_TYPES. + * Purpose is #TALER_SIGNATURE_EXCHANGE_WIRE_TYPES. */ struct GNUNET_CRYPTO_EccSignaturePurpose purpose; /** - * Hash over the various wire formats supported by this mint + * Hash over the various wire formats supported by this exchange * (all as 0-terminated strings). */ struct GNUNET_HashCode h_wire_types GNUNET_PACKED; @@ -841,7 +841,7 @@ struct TALER_DepositTrackPS /** * The coin's public key. This is the value that must have been - * signed (blindly) by the Mint. + * signed (blindly) by the Exchange. */ struct TALER_CoinSpendPublicKeyP coin_pub; @@ -896,14 +896,14 @@ struct TALER_ContractPS /** - * Details affirmed by the mint about a wire transfer the mint + * Details affirmed by the exchange about a wire transfer the exchange * claims to have done with respect to a deposit operation. */ struct TALER_ConfirmWirePS { /** * Purpose header for the signature over the contract with - * purpose #TALER_SIGNATURE_MINT_CONFIRM_WIRE. + * purpose #TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE. */ struct GNUNET_CRYPTO_EccSignaturePurpose purpose; @@ -924,7 +924,7 @@ struct TALER_ConfirmWirePS /** * The coin's public key. This is the value that must have been - * signed (blindly) by the Mint. + * signed (blindly) by the Exchange. */ struct TALER_CoinSpendPublicKeyP coin_pub; @@ -941,7 +941,7 @@ struct TALER_ConfirmWirePS uint64_t transaction_id GNUNET_PACKED; /** - * When did the mint execute this transfer? Note that the + * When did the exchange execute this transfer? Note that the * timestamp may not be exactly the same on the wire, i.e. * because the wire has a different timezone or resolution. */ diff --git a/src/mint-lib/Makefile.am b/src/mint-lib/Makefile.am deleted file mode 100644 index 171a42464..000000000 --- a/src/mint-lib/Makefile.am +++ /dev/null @@ -1,62 +0,0 @@ -# This Makefile.am is in the public domain -AM_CPPFLAGS = -I$(top_srcdir)/src/include - -if USE_COVERAGE - AM_CFLAGS = --coverage -O0 - XLIB = -lgcov -endif - -lib_LTLIBRARIES = \ - libtalermint.la - -libtalermint_la_LDFLAGS = \ - -version-info 0:0:0 \ - -no-undefined - -libtalermint_la_SOURCES = \ - mint_api_common.c mint_api_common.h \ - mint_api_context.c mint_api_context.h \ - mint_api_json.c mint_api_json.h \ - mint_api_handle.c mint_api_handle.h \ - mint_api_admin.c \ - mint_api_deposit.c \ - mint_api_deposit_wtid.c \ - mint_api_refresh.c \ - mint_api_refresh_link.c \ - mint_api_reserve.c \ - mint_api_wire.c \ - mint_api_wire_deposits.c - -libtalermint_la_LIBADD = \ - -lgnunetutil \ - -ljansson \ - $(XLIB) - -if HAVE_LIBCURL -libtalermint_la_LIBADD += -lcurl -else -if HAVE_LIBGNURL -libtalermint_la_LIBADD += -lgnurl -endif -endif - -check_PROGRAMS = \ - test_mint_api - -TESTS = \ - $(check_PROGRAMS) - -test_mint_api_SOURCES = \ - test_mint_api.c -test_mint_api_LDADD = \ - libtalermint.la \ - $(LIBGCRYPT_LIBS) \ - $(top_builddir)/src/util/libtalerutil.la \ - -lgnunetutil \ - -ljansson - -EXTRA_DIST = \ - test-mint-home/config/mint-common.conf \ - test-mint-home/master.priv \ - test-mint-home/denomkeys/ \ - test-mint-home/signkeys/ diff --git a/src/mint-tools/Makefile.am b/src/mint-tools/Makefile.am deleted file mode 100644 index 94b8fb391..000000000 --- a/src/mint-tools/Makefile.am +++ /dev/null @@ -1,81 +0,0 @@ -# This Makefile.am is in the public domain -AM_CPPFLAGS = -I$(top_srcdir)/src/include - -if USE_COVERAGE - AM_CFLAGS = --coverage -O0 - XLIB = -lgcov -endif - -bin_PROGRAMS = \ - taler-auditor-sign \ - taler-mint-keyup \ - taler-mint-keycheck \ - taler-mint-reservemod \ - taler-mint-sepa \ - taler-mint-dbinit - -taler_mint_keyup_SOURCES = \ - taler-mint-keyup.c -taler_mint_keyup_LDADD = \ - $(LIBGCRYPT_LIBS) \ - $(top_builddir)/src/util/libtalerutil.la \ - $(top_builddir)/src/pq/libtalerpq.la \ - $(top_builddir)/src/mintdb/libtalermintdb.la \ - -lgnunetutil $(XLIB) -taler_mint_keyup_LDFLAGS = $(POSTGRESQL_LDFLAGS) - -taler_auditor_sign_SOURCES = \ - taler-auditor-sign.c -taler_auditor_sign_LDADD = \ - $(LIBGCRYPT_LIBS) \ - $(top_builddir)/src/util/libtalerutil.la \ - $(top_builddir)/src/mintdb/libtalermintdb.la \ - -lgnunetutil $(XLIB) - - -taler_mint_sepa_SOURCES = \ - taler-mint-sepa.c -taler_mint_sepa_LDADD = \ - $(LIBGCRYPT_LIBS) \ - $(top_builddir)/src/util/libtalerutil.la \ - -lgnunetutil -ljansson $(XLIB) -taler_mint_sepa_LDFLAGS = $(POSTGRESQL_LDFLAGS) - -taler_mint_keycheck_SOURCES = \ - taler-mint-keycheck.c -taler_mint_keycheck_LDADD = \ - $(LIBGCRYPT_LIBS) \ - $(top_builddir)/src/util/libtalerutil.la \ - $(top_builddir)/src/mintdb/libtalermintdb.la \ - -lgnunetutil $(XLIB) -taler_mint_keycheck_LDFLAGS = $(POSTGRESQL_LDFLAGS) - -taler_mint_reservemod_SOURCES = \ - taler-mint-reservemod.c -taler_mint_reservemod_LDADD = \ - $(LIBGCRYPT_LIBS) \ - $(top_builddir)/src/util/libtalerutil.la \ - $(top_builddir)/src/pq/libtalerpq.la \ - $(top_builddir)/src/mintdb/libtalermintdb.la \ - -lgnunetutil -ljansson $(XLIB) -taler_mint_reservemod_LDFLAGS = \ - $(POSTGRESQL_LDFLAGS) -taler_mint_reservemod_CPPFLAGS = \ - -I$(top_srcdir)/src/include \ - -I$(top_srcdir)/src/pq/ \ - $(POSTGRESQL_CPPFLAGS) - -taler_mint_dbinit_SOURCES = \ - taler-mint-dbinit.c -taler_mint_dbinit_LDADD = \ - $(LIBGCRYPT_LIBS) \ - $(top_builddir)/src/util/libtalerutil.la \ - $(top_builddir)/src/pq/libtalerpq.la \ - $(top_builddir)/src/mintdb/libtalermintdb.la \ - -lgnunetutil $(XLIB) -taler_mint_dbinit_LDFLAGS = \ - $(POSTGRESQL_LDFLAGS) -taler_mint_dbinit_CPPFLAGS = \ - -I$(top_srcdir)/src/include \ - -I$(top_srcdir)/src/pq/ \ - $(POSTGRESQL_CPPFLAGS) diff --git a/src/mint/.gitignore b/src/mint/.gitignore deleted file mode 100644 index a2e71d5da..000000000 --- a/src/mint/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -taler-mint-dbinit -taler-mint-keycheck -taler-mint-keyup -taler-mint-pursemod -taler-mint-reservemod -taler-mint-httpd \ No newline at end of file diff --git a/src/mint/Makefile.am b/src/mint/Makefile.am deleted file mode 100644 index 8e2eae77b..000000000 --- a/src/mint/Makefile.am +++ /dev/null @@ -1,59 +0,0 @@ -# This Makefile.am is in the public domain -AM_CPPFLAGS = -I$(top_srcdir)/src/include - -if USE_COVERAGE - AM_CFLAGS = --coverage -O0 - XLIB = -lgcov -endif - -bin_PROGRAMS = \ - taler-mint-aggregator \ - taler-mint-httpd - -taler_mint_aggregator_SOURCES = \ - taler-mint-aggregator.c -taler_mint_aggregator_LDADD = \ - $(LIBGCRYPT_LIBS) \ - $(top_builddir)/src/util/libtalerutil.la \ - $(top_builddir)/src/wire/libtalerwire.la \ - $(top_builddir)/src/mintdb/libtalermintdb.la \ - -ljansson \ - -lgnunetutil - -taler_mint_httpd_SOURCES = \ - taler-mint-httpd.c taler-mint-httpd.h \ - taler-mint-httpd_admin.c taler-mint-httpd_admin.h \ - taler-mint-httpd_db.c taler-mint-httpd_db.h \ - taler-mint-httpd_deposit.c taler-mint-httpd_deposit.h \ - taler-mint-httpd_keystate.c taler-mint-httpd_keystate.h \ - taler-mint-httpd_mhd.c taler-mint-httpd_mhd.h \ - taler-mint-httpd_parsing.c taler-mint-httpd_parsing.h \ - taler-mint-httpd_refresh.c taler-mint-httpd_refresh.h \ - taler-mint-httpd_reserve.c taler-mint-httpd_reserve.h \ - taler-mint-httpd_responses.c taler-mint-httpd_responses.h \ - taler-mint-httpd_tracking.c taler-mint-httpd_tracking.h \ - taler-mint-httpd_wire.c taler-mint-httpd_wire.h \ - taler-mint-httpd_validation.c taler-mint-httpd_validation.h -taler_mint_httpd_LDADD = \ - $(LIBGCRYPT_LIBS) \ - $(top_builddir)/src/util/libtalerutil.la \ - $(top_builddir)/src/mintdb/libtalermintdb.la \ - -lmicrohttpd \ - -ljansson \ - -lgnunetutil \ - -lpthread - -if HAVE_DEVELOPER -taler_mint_httpd_SOURCES += \ - taler-mint-httpd_test.c taler-mint-httpd_test.h -endif - -check_SCRIPTS = \ - test_taler_mint_httpd.sh - -if HAVE_EXPENSIVE_TESTS -check_SCRIPTS += \ - test_taler_mint_httpd_afl.sh -endif - -TESTS = $(check_SCRIPTS) diff --git a/src/mintdb/Makefile.am b/src/mintdb/Makefile.am deleted file mode 100644 index e3d37b2e5..000000000 --- a/src/mintdb/Makefile.am +++ /dev/null @@ -1,110 +0,0 @@ -# This Makefile.am is in the public domain -AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_srcdir)/src/pq/ $(POSTGRESQL_CPPFLAGS) - -if USE_COVERAGE - AM_CFLAGS = --coverage -O0 - XLIB = -lgcov -endif - -plugindir = $(libdir)/taler - -if HAVE_POSTGRESQL -plugin_LTLIBRARIES = \ - libtaler_plugin_mintdb_postgres.la -endif - -EXTRA_DIST = \ - plugin_mintdb_common.c \ - test-mint-db-postgres.conf - -libtaler_plugin_mintdb_postgres_la_SOURCES = \ - plugin_mintdb_postgres.c -libtaler_plugin_mintdb_postgres_la_LIBADD = \ - $(LTLIBINTL) -libtaler_plugin_mintdb_postgres_la_LDFLAGS = \ - $(TALER_PLUGIN_LDFLAGS) \ - $(top_builddir)/src/pq/libtalerpq.la \ - $(top_builddir)/src/util/libtalerutil.la \ - -lpq \ - -lgnunetpq \ - -lgnunetutil $(XLIB) - -lib_LTLIBRARIES = \ - libtalermintdb.la - -libtalermintdb_la_SOURCES = \ - mintdb_keyio.c \ - mintdb_plugin.c - -libtalermintdb_la_LIBADD = \ - $(top_builddir)/src/util/libtalerutil.la \ - -lgnunetutil $(XLIB) - -libtalermintdb_la_LDFLAGS = \ - $(POSTGRESQL_LDFLAGS) \ - -version-info 0:0:0 \ - -no-undefined - - -check_PROGRAMS = \ - test-mintdb-deposits \ - test-mintdb-keyio \ - test-mintdb-postgres \ - test-perf-taler-mintdb \ - perf-mintdb - -TESTS = \ - test-mintdb-postgres \ - test-perf-taler-mintdb - -test_mintdb_deposits_SOURCES = \ - test_mintdb_deposits.c -test_mintdb_deposits_LDADD = \ - libtalermintdb.la \ - $(top_srcdir)/src/util/libtalerutil.la \ - $(top_srcdir)/src/pq/libtalerpq.la \ - -lgnunetutil \ - -ljansson \ - -lpq - -test_mintdb_keyio_SOURCES = \ - test_mintdb_keyio.c -test_mintdb_keyio_LDADD = \ - libtalermintdb.la \ - $(top_srcdir)/src/util/libtalerutil.la \ - $(top_srcdir)/src/pq/libtalerpq.la \ - -lgnunetutil - -test_mintdb_postgres_SOURCES = \ - test_mintdb.c -test_mintdb_postgres_LDADD = \ - libtalermintdb.la \ - $(top_srcdir)/src/util/libtalerutil.la \ - $(top_srcdir)/src/pq/libtalerpq.la \ - -lgnunetutil -ljansson - -test_perf_taler_mintdb_SOURCES = \ - test_perf_taler_mintdb.c \ - perf_taler_mintdb_init.c \ - perf_taler_mintdb_interpreter.c -test_perf_taler_mintdb_LDADD = \ - libtalermintdb.la \ - $(top_srcdir)/src/util/libtalerutil.la \ - $(top_srcdir)/src/pq/libtalerpq.la \ - -ljansson \ - -lgnunetutil - -perf_mintdb_SOURCES = \ - perf_taler_mintdb.c \ - perf_taler_mintdb_init.c \ - perf_taler_mintdb_interpreter.c -perf_mintdb_LDADD = \ - libtalermintdb.la \ - $(top_srcdir)/src/util/libtalerutil.la \ - $(top_srcdir)/src/pq/libtalerpq.la \ - -ljansson \ - -lgnunetutil - - -EXTRA_test_mintdb_postgres_DEPENDENCIES = \ - libtaler_plugin_mintdb_postgres.la diff --git a/src/mintdb/perf_taler_mintdb_init.h b/src/mintdb/perf_taler_mintdb_init.h deleted file mode 100644 index f94beef10..000000000 --- a/src/mintdb/perf_taler_mintdb_init.h +++ /dev/null @@ -1,257 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2014, 2015 GNUnet e.V. - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - TALER; see the file COPYING. If not, If not, see - */ -/** - * @file mintdb/perf_taler_mintdb_init.h - * @brief Heler function for creating dummy inputs for the mint database - * @author Nicolas Fournier - */ -#ifndef __PERF_TALER_MINTDB_INIT_H___ -#define __PERF_TALER_MINTDB_INIT_H___ - -#include "taler_mintdb_plugin.h" - - -#define CURRENCY "EUR" - -/** - * All information about a reserve - */ -struct PERF_TALER_MINTDB_Reserve -{ - /** - * Information about a rserve available to the Mint - */ - struct TALER_MINTDB_Reserve reserve; - - /** - * Private key of a reserve - */ - struct GNUNET_CRYPTO_EddsaPrivateKey private; -}; - - -/** - * All informations about a coin - */ -struct PERF_TALER_MINTDB_Coin -{ - /** - * Blinded coin, known by the mint - */ - struct TALER_MINTDB_CollectableBlindcoin blind; - - /** - * Public key of the coin and othes informations - */ - struct TALER_CoinPublicInfo public_info; - - /** - * Private key of the coin - */ - struct GNUNET_CRYPTO_EddsaPrivateKey priv; -}; - - -/** - * Generate a dummy DenominationKeyInformation for testing purposes - * @return a dummy denomination key - */ -struct TALER_MINTDB_DenominationKeyIssueInformation * -PERF_TALER_MINTDB_denomination_init (void); - - -/** - * Copies the given denomination - * @param reserve the deposit copy - * @return a copy of @a deposit; NULL if error - */ -struct TALER_MINTDB_DenominationKeyIssueInformation * -PERF_TALER_MINTDB_denomination_copy ( - const struct TALER_MINTDB_DenominationKeyIssueInformation *dki); - - -/** - * Free memory of a DenominationKeyIssueInformation - * @param dki pointer to the struct to free - */ -int -PERF_TALER_MINTDB_denomination_free ( - struct TALER_MINTDB_DenominationKeyIssueInformation *dki); - - -/** - * Generate a dummy reserve for testing - * @return a reserve with 1000 EUR in it - */ -struct PERF_TALER_MINTDB_Reserve * -PERF_TALER_MINTDB_reserve_init (void); - - -/** - * Copies the given reserve - * @param reserve the reserve to copy - * @return a copy of @a reserve; NULL if error - */ -struct PERF_TALER_MINTDB_Reserve * -PERF_TALER_MINTDB_reserve_copy (const struct PERF_TALER_MINTDB_Reserve *reserve); - - -/** - * Free memory of a reserve - * @param reserve pointer to the structure to be freed - */ -int -PERF_TALER_MINTDB_reserve_free (struct PERF_TALER_MINTDB_Reserve *reserve); - - -/** - * Generate a dummy deposit for testing purposes - * @param dki the denomination key used to sign the key - */ -struct TALER_MINTDB_Deposit * -PERF_TALER_MINTDB_deposit_init ( - const struct PERF_TALER_MINTDB_Coin *coin); - - -/** - * Copies the given deposit - * @param reserve the deposit copy - * @return a copy of @a deposit; NULL if error - */ -struct TALER_MINTDB_Deposit * -PERF_TALER_MINTDB_deposit_copy (const struct TALER_MINTDB_Deposit *deposit); - - -/** - * Free memory of a deposit - * @param deposit pointer to the structure to free - */ -int -PERF_TALER_MINTDB_deposit_free (struct TALER_MINTDB_Deposit *deposit); - - -/** - * Generate a coin for testing purpuses - * @param dki denomination key used to sign the coin - * @param reserve reserve providing the money for the coin - * @return a randomly generated CollectableBlindcoin - */ -struct PERF_TALER_MINTDB_Coin * -PERF_TALER_MINTDB_coin_init ( - const struct TALER_MINTDB_DenominationKeyIssueInformation *dki, - const struct PERF_TALER_MINTDB_Reserve *reserve); - - -/** - * Copies the given coin - * @param coin the coin to copy - * @return a copy of coin; NULL if error - */ -struct PERF_TALER_MINTDB_Coin * -PERF_TALER_MINTDB_coin_copy ( - const struct PERF_TALER_MINTDB_Coin *coin); - - -/** - * Liberate memory of @a coin - * @param coin pointer to the structure to free - */ -int -PERF_TALER_MINTDB_coin_free ( - struct PERF_TALER_MINTDB_Coin *coin); - - -/** - * @return a randomly generated refresh session - */ -struct TALER_MINTDB_RefreshSession * -PERF_TALER_MINTDB_refresh_session_init (void); - - -/** - * @return #GNUNET_OK if the copy was successful, #GNUNET_SYSERR if it wasn't - */ -int -PERF_TALER_MINTDB_refresh_session_copy (struct TALER_MINTDB_RefreshSession *session, - struct TALER_MINTDB_RefreshSession *copy); - - -/** - * Frees memory of a refresh_session - */ -int -PERF_TALER_MINTDB_refresh_session_free ( - struct TALER_MINTDB_RefreshSession *refresh_session); - - -/** - * Create a melt operation - * - * @param session the refresh session - * @param dki the denomination the melted coin uses - * @return a pointer to a #TALER_MINTDB_RefreshMelt - */ -struct TALER_MINTDB_RefreshMelt * -PERF_TALER_MINTDB_refresh_melt_init (struct GNUNET_HashCode *session, - struct PERF_TALER_MINTDB_Coin *coin); - - -/** - * Copies the internals of a #TALER_MINTDB_RefreshMelt - * - * @param melt the refresh melt to copy - * @return an copy of @ melt - */ -struct TALER_MINTDB_RefreshMelt * -PERF_TALER_MINTDB_refresh_melt_copy (const struct TALER_MINTDB_RefreshMelt *melt); - - -/** - * Free the internal memory of a #TALER_MINTDB_RefreshMelt - * - * @param melt the #TALER_MINTDB_RefreshMelt to free - * @return #GNUNET_OK if the operation was successful, #GNUNET_SYSERROR - */ -int -PERF_TALER_MINTDB_refresh_melt_free (struct TALER_MINTDB_RefreshMelt *melt); - - -/** - * Create a #TALER_MINTDB_RefreshCommitCoin - */ -struct TALER_MINTDB_RefreshCommitCoin * -PERF_TALER_MINTDB_refresh_commit_coin_init (void); - - -/** - * Copies a #TALER_MINTDB_RefreshCommitCoin - * - * @param commit_coin the commit to copy - * @return a copy of @a commit_coin - */ -struct TALER_MINTDB_RefreshCommitCoin * -PERF_TALER_MINTDB_refresh_commit_coin_copy (struct TALER_MINTDB_RefreshCommitCoin *commit_coin); - - -/** - * Free a #TALER_MINTDB_RefreshCommitCoin - * - * @param commit_coin the coin to free - */ -void -PERF_TALER_MINTDB_refresh_commit_coin_free (struct TALER_MINTDB_RefreshCommitCoin *commit_coin); - -#endif diff --git a/src/mintdb/test_perf_taler_mintdb.c b/src/mintdb/test_perf_taler_mintdb.c deleted file mode 100644 index 789a0dd4f..000000000 --- a/src/mintdb/test_perf_taler_mintdb.c +++ /dev/null @@ -1,182 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2014, 2015 GNUnet e.V. - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - TALER; see the file COPYING. If not, If not, see - */ -/** - * @file mintdb/test_perf_taler_mintdb.c - * @brief Mint database performance analysis - * @author Nicolas Fournier - */ -#include "platform.h" -#include "perf_taler_mintdb_interpreter.h" -#include "perf_taler_mintdb_init.h" - - -#define NB_DENOMINATION_INIT 2 -#define NB_DENOMINATION_SAVE 2 - -#define NB_RESERVE_INIT 4 -#define NB_RESERVE_SAVE 1 - -#define NB_DEPOSIT_INIT 1 -#define NB_DEPOSIT_SAVE 1 - -#define NB_WITHDRAW_INIT 1 -#define NB_WITHDRAW_SAVE 1 - -/** - * Allocate, copies and free all the data used in the interpreter - * Used to check for memory leaks - */ -static void -test_allocate () -{ - struct TALER_MINTDB_DenominationKeyIssueInformation *dki, *dki_copy; - struct PERF_TALER_MINTDB_Reserve *reserve, *reserve_copy; - struct PERF_TALER_MINTDB_Coin *coin, *coin_copy; - struct TALER_MINTDB_Deposit *deposit, *deposit_copy; - - dki = PERF_TALER_MINTDB_denomination_init (); - reserve = PERF_TALER_MINTDB_reserve_init (); - coin = PERF_TALER_MINTDB_coin_init (dki, - reserve); - deposit = PERF_TALER_MINTDB_deposit_init (coin); - - dki_copy = PERF_TALER_MINTDB_denomination_copy (dki); - reserve_copy = PERF_TALER_MINTDB_reserve_copy (reserve); - coin_copy = PERF_TALER_MINTDB_coin_copy (coin); - deposit_copy = PERF_TALER_MINTDB_deposit_copy (deposit); - - PERF_TALER_MINTDB_denomination_free (dki); - PERF_TALER_MINTDB_denomination_free (dki_copy); - PERF_TALER_MINTDB_reserve_free (reserve); - PERF_TALER_MINTDB_reserve_free (reserve_copy); - PERF_TALER_MINTDB_coin_free (coin); - PERF_TALER_MINTDB_coin_free (coin_copy); - PERF_TALER_MINTDB_deposit_free (deposit); - PERF_TALER_MINTDB_deposit_free (deposit_copy); -} - -/** - * Runs the performances tests for the mint database - * and logs the results using Gauger - */ -int -main (int argc, char ** argv) -{ - int ret = 0; - struct PERF_TALER_MINTDB_Cmd init[] = - { - PERF_TALER_MINTDB_INIT_CMD_END ("init") - }; - struct PERF_TALER_MINTDB_Cmd benchmark[] = - { - // Denomination used to create coins - PERF_TALER_MINTDB_INIT_CMD_DEBUG ("00 - Start of interpreter"), - - PERF_TALER_MINTDB_INIT_CMD_LOOP ("01 - denomination loop", - NB_DENOMINATION_INIT), - PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION ("01 - start transaction"), - PERF_TALER_MINTDB_INIT_CMD_CREATE_DENOMINATION ("01 - denomination"), - PERF_TALER_MINTDB_INIT_CMD_INSERT_DENOMINATION ("01 - insert", - "01 - denomination"), - PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION ("01 - commit transaction"), - PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("01 - save denomination", - "01 - denomination loop", - "01 - denomination", - NB_DENOMINATION_SAVE), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("01 - denomination loop end", - "01 - denomination loop"), - PERF_TALER_MINTDB_INIT_CMD_DEBUG ("01 - init denomination complete"), - // End of initialization - // Reserve initialization - PERF_TALER_MINTDB_INIT_CMD_LOOP ("02 - init reserve loop", - NB_RESERVE_INIT), - - PERF_TALER_MINTDB_INIT_CMD_CREATE_RESERVE ("02 - reserve"), - PERF_TALER_MINTDB_INIT_CMD_INSERT_RESERVE ("02 - insert", - "02 - reserve"), - PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("02 - save reserve", - "02 - init reserve loop", - "02 - reserve", - NB_RESERVE_SAVE), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("02 - init reserve end loop", - "02 - init reserve loop"), - PERF_TALER_MINTDB_INIT_CMD_DEBUG ("02 - reserve init complete"), - // End reserve init - // Withdrawal initialization - PERF_TALER_MINTDB_INIT_CMD_LOOP ("03 - init withdraw loop", - NB_WITHDRAW_INIT), - PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION ("03 - start transaction"), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("03 - denomination load", - "03 - init withdraw loop", - "01 - save denomination"), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("03 - reserve load", - "03 - init withdraw loop", - "02 - save reserve"), - PERF_TALER_MINTDB_INIT_CMD_CREATE_WITHDRAW ("03 - withdraw", - "03 - denomination load", - "03 - reserve load"), - PERF_TALER_MINTDB_INIT_CMD_INSERT_WITHDRAW ("03 - insert withdraw", - "03 - withdraw"), - PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION ("03 - commit transaction"), - PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("03 - coin array", - "03 - init withdraw loop", - "03 - withdraw", - NB_WITHDRAW_SAVE), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("03 - withdraw init end loop", - "03 - init withdraw loop"), - PERF_TALER_MINTDB_INIT_CMD_DEBUG ("03 - withdraw init complete"), - //End of withdrawal initialization - //Deposit initialization - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("04 - time start"), - PERF_TALER_MINTDB_INIT_CMD_LOOP ("04 - deposit init loop", - NB_DEPOSIT_INIT), - PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION ("04 - start transaction"), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("04 - coin load", - "04 - deposit init loop", - "03 - coin array"), - PERF_TALER_MINTDB_INIT_CMD_CREATE_DEPOSIT ("04 - deposit", - "04 - coin load"), - PERF_TALER_MINTDB_INIT_CMD_INSERT_DEPOSIT ("04 - insert deposit", - "04 - deposit"), - PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION ("04 - commit transaction"), - PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("04 - deposit array", - "04 - deposit init loop", - "04 - deposit", - NB_DEPOSIT_SAVE), - PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("04 - deposit init loop end", - "04 - deposit init loop"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("04 - time stop"), - PERF_TALER_MINTDB_INIT_CMD_GAUGER ("04 - gauger", - "04 - time start", - "04 - time stop", - "TEST", - "time to insert a deposit", - "deposit/sec", - NB_DEPOSIT_SAVE), - PERF_TALER_MINTDB_INIT_CMD_DEBUG ("04 - deposit init complete"), - // End of deposit initialization - PERF_TALER_MINTDB_INIT_CMD_END ("end"), - }; - - test_allocate (); - ret = PERF_TALER_MINTDB_run_benchmark ("test-perf-taler-mintdb", - "./test-mint-db-postgres.conf", - init, - benchmark); - if (GNUNET_SYSERR == ret) - return 1; - return 0; -} diff --git a/src/util/os_installation.c b/src/util/os_installation.c index 0eab118fe..757dba4b6 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c @@ -394,7 +394,7 @@ os_get_taler_path () if (NULL != (ret = get_path_from_proc_maps ())) return ret; /* try path *first*, before /proc/exe, as /proc/exe can be wrong */ - if (NULL != (ret = get_path_from_PATH ("taler-mint-httpd"))) + if (NULL != (ret = get_path_from_PATH ("taler-exchange-httpd"))) return ret; if (NULL != (ret = get_path_from_proc_exe ())) return ret; @@ -409,7 +409,7 @@ os_get_taler_path () if (NULL != (ret = get_path_from_NSGetExecutablePath ())) return ret; #endif - if (NULL != (ret = get_path_from_PATH ("taler-mint-httpd"))) + if (NULL != (ret = get_path_from_PATH ("taler-exchange-httpd"))) return ret; /* other attempts here */ LOG (GNUNET_ERROR_TYPE_ERROR, diff --git a/src/util/wireformats.c b/src/util/wireformats.c index cd5a9c3d4..a69e8a093 100644 --- a/src/util/wireformats.c +++ b/src/util/wireformats.c @@ -421,7 +421,7 @@ TALER_json_validate_wireformat (const char **allowed, if (NULL == allowed[i]) { GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Wireformat `%s' does not match mint's allowed formats\n", + "Wireformat `%s' does not match exchange's allowed formats\n", stype); return GNUNET_NO; } diff --git a/src/wire/plugin_wire_sepa.c b/src/wire/plugin_wire_sepa.c index 00d19d4b0..4d902f962 100644 --- a/src/wire/plugin_wire_sepa.c +++ b/src/wire/plugin_wire_sepa.c @@ -501,12 +501,12 @@ libtaler_plugin_wire_sepa_init (void *cls) sc = GNUNET_new (struct SepaClosure); if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, - "mint", + "exchange", "CURRENCY", &sc->currency)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "mint", + "exchange", "CURRENCY"); GNUNET_free (sc); return NULL; diff --git a/src/wire/plugin_wire_template.c b/src/wire/plugin_wire_template.c index baf0ee7d5..2e9512e57 100644 --- a/src/wire/plugin_wire_template.c +++ b/src/wire/plugin_wire_template.c @@ -197,12 +197,12 @@ libtaler_plugin_wire_template_init (void *cls) } if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, - "mint", + "exchange", "CURRENCY", &tc->currency)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "mint", + "exchange", "CURRENCY"); GNUNET_free (tc->bank_uri); GNUNET_free (tc); diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c index 8a6f98ea2..2f679bbaa 100644 --- a/src/wire/plugin_wire_test.c +++ b/src/wire/plugin_wire_test.c @@ -553,12 +553,12 @@ libtaler_plugin_wire_test_init (void *cls) tc = GNUNET_new (struct TestClosure); if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, - "mint", + "exchange", "CURRENCY", &tc->currency)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "mint", + "exchange", "CURRENCY"); GNUNET_free (uri); GNUNET_free (tc); diff --git a/src/wire/test_sepa_wireformat.c b/src/wire/test_sepa_wireformat.c index edbe5bc45..5081cbe86 100644 --- a/src/wire/test_sepa_wireformat.c +++ b/src/wire/test_sepa_wireformat.c @@ -77,7 +77,7 @@ main(int argc, NULL); cfg = GNUNET_CONFIGURATION_create (); GNUNET_CONFIGURATION_set_value_string (cfg, - "mint", + "exchange", "currency", "EUR"); plugin = TALER_WIRE_plugin_load (cfg, From 89a7de3d307d9881af09bc4d6d5fe55629889eb2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 1 Mar 2016 15:58:22 +0100 Subject: [PATCH 04/91] fix config --- ...est_taler_mint_httpd.data => test_taler_exchange_httpd.data} | 0 src/exchange/test_taler_exchange_httpd.sh | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename src/exchange/{test_taler_mint_httpd.data => test_taler_exchange_httpd.data} (100%) mode change 100644 => 100755 src/exchange/test_taler_exchange_httpd.sh diff --git a/src/exchange/test_taler_mint_httpd.data b/src/exchange/test_taler_exchange_httpd.data similarity index 100% rename from src/exchange/test_taler_mint_httpd.data rename to src/exchange/test_taler_exchange_httpd.data diff --git a/src/exchange/test_taler_exchange_httpd.sh b/src/exchange/test_taler_exchange_httpd.sh old mode 100644 new mode 100755 index c8df7cb9f..209ee06fd --- a/src/exchange/test_taler_exchange_httpd.sh +++ b/src/exchange/test_taler_exchange_httpd.sh @@ -26,7 +26,7 @@ taler-exchange-keyup -d test-exchange-home -m test-exchange-home/master.priv # Run Exchange HTTPD (in background) taler-exchange-httpd -d test-exchange-home & # Give HTTP time to start -sleep 2 +sleep 5 # Run test... cat test_taler_exchange_httpd.data | grep -v ^\# | awk '{ print "curl -d '\''" $2 "'\'' http://localhost:8081"$1 }' | bash # Stop HTTP server From fc0f9d0aaa833a57b48f2d177d0e3db6f214713c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 1 Mar 2016 16:02:20 +0100 Subject: [PATCH 05/91] fix rename issue --- .../config/{mint-common.conf => exchange-common.conf} | 6 +++--- .../config/{mint-keyup.conf => exchange-keyup.conf} | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename src/exchange-lib/test-exchange-home/config/{mint-common.conf => exchange-common.conf} (92%) rename src/exchange-lib/test-exchange-home/config/{mint-keyup.conf => exchange-keyup.conf} (100%) diff --git a/src/exchange-lib/test-exchange-home/config/mint-common.conf b/src/exchange-lib/test-exchange-home/config/exchange-common.conf similarity index 92% rename from src/exchange-lib/test-exchange-home/config/mint-common.conf rename to src/exchange-lib/test-exchange-home/config/exchange-common.conf index 01dd6c896..9e46fcb3b 100644 --- a/src/exchange-lib/test-exchange-home/config/mint-common.conf +++ b/src/exchange-lib/test-exchange-home/config/exchange-common.conf @@ -20,11 +20,11 @@ DB = postgres TESTRUN = YES [exchangedb-postgres] - DB_CONN_STR = "postgres:///talercheck" -[exchange-wire-sepa] +[wire-sepa] SEPA_RESPONSE_FILE = "test-exchange-home/sepa.json" -[exchange-wire-test] +[wire-test] REDIRECT_URL = "http://www.taler.net/" +BANK_URI = "http://localhost/" diff --git a/src/exchange-lib/test-exchange-home/config/mint-keyup.conf b/src/exchange-lib/test-exchange-home/config/exchange-keyup.conf similarity index 100% rename from src/exchange-lib/test-exchange-home/config/mint-keyup.conf rename to src/exchange-lib/test-exchange-home/config/exchange-keyup.conf From f746efecf78e06f56ad7193591574d374c19958a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 1 Mar 2016 16:10:41 +0100 Subject: [PATCH 06/91] rename section from exchange-wire- to wire- --- contrib/exchange-template/config/exchange-common.conf | 7 ++++--- src/exchange/taler-exchange-httpd_wire.c | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/contrib/exchange-template/config/exchange-common.conf b/contrib/exchange-template/config/exchange-common.conf index cb34ddcd9..5214fd816 100644 --- a/contrib/exchange-template/config/exchange-common.conf +++ b/contrib/exchange-template/config/exchange-common.conf @@ -15,14 +15,15 @@ MASTER_PUBLIC_KEY = NEGTF62MNGVPZNW19V7S3CRS9D7K04MAHDGX3N6WY2NXREN26J80 # How to access our database DB = postgres +# Is this for testing, or for real? TESTRUN = YES [exchangedb-postgres] - DB_CONN_STR = "postgres:///talercheck" -[exchange-wire-sepa] +[wire-sepa] SEPA_RESPONSE_FILE = "sepa.json" -[exchange-wire-test] +[wire-test] REDIRECT_URL = "http://test/" +BANK_URI = "http://bank/ diff --git a/src/exchange/taler-exchange-httpd_wire.c b/src/exchange/taler-exchange-httpd_wire.c index ba763b64d..faf018b99 100644 --- a/src/exchange/taler-exchange-httpd_wire.c +++ b/src/exchange/taler-exchange-httpd_wire.c @@ -104,7 +104,7 @@ TMH_WIRE_handler_wire_test (struct TMH_RequestHandler *rh, } if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, - "exchange-wire-test", + "wire-test", "REDIRECT_URL", &wire_test_redirect)) { @@ -168,7 +168,7 @@ TMH_WIRE_handler_wire_sepa (struct TMH_RequestHandler *rh, /* Fetch reply */ if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, - "exchange-wire-sepa", + "wire-sepa", "SEPA_RESPONSE_FILE", &sepa_wire_file)) { From 68f1a7b4a6c6451c1cc183db96485b7f5d53d41e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 1 Mar 2016 16:13:54 +0100 Subject: [PATCH 07/91] fix JSON for test wire formats to pass wire format validation --- src/exchange-lib/test_exchange_api.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/exchange-lib/test_exchange_api.c b/src/exchange-lib/test_exchange_api.c index a6da380df..80e2c6add 100644 --- a/src/exchange-lib/test_exchange_api.c +++ b/src/exchange-lib/test_exchange_api.c @@ -2349,7 +2349,7 @@ run (void *cls, { .oc = OC_ADMIN_ADD_INCOMING, .label = "create-reserve-1", .expected_response_code = MHD_HTTP_OK, - .details.admin_add_incoming.wire = "{ \"type\":\"TEST\", \"bank\":\"source bank\", \"account\":42 }", + .details.admin_add_incoming.wire = "{ \"type\":\"TEST\", \"bank\":\"source bank\", \"account_number\":42 }", .details.admin_add_incoming.amount = "EUR:5.01" }, /* Withdraw a 5 EUR coin, at fee of 1 ct */ { .oc = OC_WITHDRAW_SIGN, @@ -2370,7 +2370,7 @@ run (void *cls, .expected_response_code = MHD_HTTP_OK, .details.deposit.amount = "EUR:5", .details.deposit.coin_ref = "withdraw-coin-1", - .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account\":42 }", + .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account_number\":42 }", .details.deposit.contract = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":1 } ] }", .details.deposit.transaction_id = 1 }, @@ -2387,7 +2387,7 @@ run (void *cls, .expected_response_code = MHD_HTTP_FORBIDDEN, .details.deposit.amount = "EUR:5", .details.deposit.coin_ref = "withdraw-coin-1", - .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account\":43 }", + .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account_number\":43 }", .details.deposit.contract = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":1 } ] }", .details.deposit.transaction_id = 1 }, /* Try to double-spend the 5 EUR coin at the same merchant (but different @@ -2397,7 +2397,7 @@ run (void *cls, .expected_response_code = MHD_HTTP_FORBIDDEN, .details.deposit.amount = "EUR:5", .details.deposit.coin_ref = "withdraw-coin-1", - .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account\":42 }", + .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account_number\":42 }", .details.deposit.contract = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":1 } ] }", .details.deposit.transaction_id = 2 }, /* Try to double-spend the 5 EUR coin at the same merchant (but different @@ -2407,7 +2407,7 @@ run (void *cls, .expected_response_code = MHD_HTTP_FORBIDDEN, .details.deposit.amount = "EUR:5", .details.deposit.coin_ref = "withdraw-coin-1", - .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account\":42 }", + .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account_number\":42 }", .details.deposit.contract = "{ \"items\":[{ \"name\":\"ice cream\", \"value\":2 } ] }", .details.deposit.transaction_id = 1 }, @@ -2417,7 +2417,7 @@ run (void *cls, { .oc = OC_ADMIN_ADD_INCOMING, .label = "refresh-create-reserve-1", .expected_response_code = MHD_HTTP_OK, - .details.admin_add_incoming.wire = "{ \"type\":\"TEST\", \"bank\":\"source bank\", \"account\":424 }", + .details.admin_add_incoming.wire = "{ \"type\":\"TEST\", \"bank\":\"source bank\", \"account_number\":424 }", .details.admin_add_incoming.amount = "EUR:5.01" }, /* Withdraw a 5 EUR coin, at fee of 1 ct */ { .oc = OC_WITHDRAW_SIGN, @@ -2432,7 +2432,7 @@ run (void *cls, .expected_response_code = MHD_HTTP_OK, .details.deposit.amount = "EUR:1", .details.deposit.coin_ref = "refresh-withdraw-coin-1", - .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account\":42 }", + .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account_number\":42 }", .details.deposit.contract = "{ \"items\" : [ { \"name\":\"ice cream\", \"value\":\"EUR:1\" } ] }", .details.deposit.transaction_id = 42421 }, @@ -2466,7 +2466,7 @@ run (void *cls, .details.deposit.amount = "EUR:1", .details.deposit.coin_ref = "refresh-reveal-1", .details.deposit.coin_idx = 0, - .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account\":42 }", + .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account_number\":42 }", .details.deposit.contract = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":3 } ] }", .details.deposit.transaction_id = 2 }, @@ -2478,7 +2478,7 @@ run (void *cls, .details.deposit.amount = "EUR:0.1", .details.deposit.coin_ref = "refresh-reveal-1", .details.deposit.coin_idx = 4, - .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account\":42 }", + .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account_number\":42 }", .details.deposit.contract = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":3 } ] }", .details.deposit.transaction_id = 2 }, From 77cd82c34fa8fc14583c8ebf5b197c5ed42ee01d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 1 Mar 2016 16:14:41 +0100 Subject: [PATCH 08/91] update ignore file --- .gitignore | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index de64370a9..14d8fdb48 100644 --- a/.gitignore +++ b/.gitignore @@ -27,16 +27,18 @@ GPATH GRTAGS GTAGS *.swp -src/lib/test_mint_api +src/lib/test_exchange_api doc/doxygen/doxygen_sqlite3.db -src/mint-lib/test_mint_api -src/mint-tools/taler-auditor-sign -src/mint-tools/taler-mint-dbinit -src/mint-tools/taler-mint-keycheck -src/mint-tools/taler-mint-keyup -src/mint-tools/taler-mint-reservemod -src/mint-tools/taler-mint-sepa -src/mintdb/perf-mintdb +src/bank-lib/test_bank_api +src/exchange-lib/test_exchange_api +src/exchange/taler-exchange-aggregator +src/exchange-tools/taler-auditor-sign +src/exchange-tools/taler-exchange-dbinit +src/exchange-tools/taler-exchange-keycheck +src/exchange-tools/taler-exchange-keyup +src/exchange-tools/taler-exchange-reservemod +src/exchange-tools/taler-exchange-sepa +src/exchangedb/perf-exchangedb src/pq/test_pq src/util/test_amount src/util/test_crypto From 201b2b3d1af2a4d44fe32c8b0312d935845cf129 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 2 Mar 2016 01:21:32 +0100 Subject: [PATCH 09/91] make bootstrap executable again --- bootstrap | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 bootstrap diff --git a/bootstrap b/bootstrap old mode 100644 new mode 100755 From 531272a92a5aa08559436138ff5106a6bff1b361 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 2 Mar 2016 21:02:46 +0100 Subject: [PATCH 10/91] towards fixing #4230 --- src/bank-lib/bank_api_admin.c | 13 ++++++++----- src/bank-lib/test_bank_api.c | 15 +++++++++++---- src/include/taler_bank_service.h | 6 ++++-- src/wire/plugin_wire_test.c | 20 ++++++-------------- 4 files changed, 29 insertions(+), 25 deletions(-) diff --git a/src/bank-lib/bank_api_admin.c b/src/bank-lib/bank_api_admin.c index bfcf16a23..5deb4aa72 100644 --- a/src/bank-lib/bank_api_admin.c +++ b/src/bank-lib/bank_api_admin.c @@ -150,7 +150,8 @@ handle_admin_add_incoming_finished (void *cls, * @param reserve_pub public key of the reserve * @param amount amount that was deposited * @param execution_date when did we receive the amount - * @param account_no account number (53 bits at most) + * @param debit_account_no account number to withdraw from (53 bits at most) + * @param credit_account_no account number to deposit into (53 bits at most) * @param res_cb the callback to call when the final result for this request is available * @param res_cb_cls closure for the above callback * @return NULL @@ -161,7 +162,8 @@ struct TALER_BANK_AdminAddIncomingHandle * TALER_BANK_admin_add_incoming (struct TALER_BANK_Context *bank, const struct TALER_WireTransferIdentifierRawP *wtid, const struct TALER_Amount *amount, - uint64_t account_no, + uint64_t debit_account_no, + uint64_t credit_account_no, TALER_BANK_AdminAddIncomingResultCallback res_cb, void *res_cb_cls) { @@ -169,12 +171,13 @@ TALER_BANK_admin_add_incoming (struct TALER_BANK_Context *bank, json_t *admin_obj; CURL *eh; - admin_obj = json_pack ("{s:o, s:o," /* reserve_pub/amount */ - " s:I}", /* execution_Date/wire */ + admin_obj = json_pack ("{s:o, s:o," + " s:I, s:I}", "wtid", TALER_json_from_data (wtid, sizeof (*wtid)), "amount", TALER_json_from_amount (amount), - "account", (json_int_t) account_no); + "debit_account", (json_int_t) debit_account_no, + "credit_account", (json_int_t) credit_account_no); aai = GNUNET_new (struct TALER_BANK_AdminAddIncomingHandle); aai->bank = bank; aai->cb = res_cb; diff --git a/src/bank-lib/test_bank_api.c b/src/bank-lib/test_bank_api.c index b14f523ba..5e38ae2ec 100644 --- a/src/bank-lib/test_bank_api.c +++ b/src/bank-lib/test_bank_api.c @@ -103,9 +103,14 @@ struct Command const char *amount; /** - * Account number. + * Credited account number. */ - uint64_t account_no; + uint64_t credit_account_no; + + /** + * Debited account number. + */ + uint64_t debit_account_no; /** * Wire transfer identifier to use. Initialized to @@ -310,7 +315,8 @@ interpreter_run (void *cls, = TALER_BANK_admin_add_incoming (ctx, &cmd->details.admin_add_incoming.wtid, &amount, - cmd->details.admin_add_incoming.account_no, + cmd->details.admin_add_incoming.debit_account_no, + cmd->details.admin_add_incoming.credit_account_no, &add_incoming_cb, is); if (NULL == cmd->details.admin_add_incoming.aih) @@ -470,7 +476,8 @@ run (void *cls, { .oc = OC_ADMIN_ADD_INCOMING, .label = "deposit-1", .expected_response_code = MHD_HTTP_OK, - .details.admin_add_incoming.account_no = 42, + .details.admin_add_incoming.credit_account_no = 1, + .details.admin_add_incoming.debit_account_no = 2, .details.admin_add_incoming.amount = "EUR:5.01" }, { .oc = OC_END } diff --git a/src/include/taler_bank_service.h b/src/include/taler_bank_service.h index a4f33fc97..508ca714b 100644 --- a/src/include/taler_bank_service.h +++ b/src/include/taler_bank_service.h @@ -133,7 +133,8 @@ typedef void * @param reserve_pub public key of the reserve * @param amount amount that was deposited * @param execution_date when did we receive the amount - * @param account_no account number (53 bits at most) + * @param debit_account_no account number to withdraw from (53 bits at most) + * @param credit_account_no account number to deposit into (53 bits at most) * @param res_cb the callback to call when the final result for this request is available * @param res_cb_cls closure for the above callback * @return NULL @@ -144,7 +145,8 @@ struct TALER_BANK_AdminAddIncomingHandle * TALER_BANK_admin_add_incoming (struct TALER_BANK_Context *bank, const struct TALER_WireTransferIdentifierRawP *wtid, const struct TALER_Amount *amount, - uint64_t account_no, + uint64_t debit_account_no, + uint64_t credit_account_no, TALER_BANK_AdminAddIncomingResultCallback res_cb, void *res_cb_cls); diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c index 8a6f98ea2..d6bf411c1 100644 --- a/src/wire/plugin_wire_test.c +++ b/src/wire/plugin_wire_test.c @@ -43,6 +43,11 @@ struct TestClosure */ char *currency; + /** + * Number of the account that the exchange has at the bank. + */ + uint64_t exchange_account_no; + /** * Handle to the bank task, or NULL. */ @@ -482,7 +487,7 @@ test_execute_wire_transfer (void *cls, GNUNET_break (0); return NULL; } - + eh = GNUNET_new (struct TALER_WIRE_ExecuteHandle); eh->cc = cc; eh->cc_cls = cc_cls; @@ -551,19 +556,6 @@ libtaler_plugin_wire_test_init (void *cls) return NULL; } tc = GNUNET_new (struct TestClosure); - if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_string (cfg, - "mint", - "CURRENCY", - &tc->currency)) - { - GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "mint", - "CURRENCY"); - GNUNET_free (uri); - GNUNET_free (tc); - return NULL; - } tc->bank = TALER_BANK_init (uri); if (NULL == tc->bank) { From d06fb4d8182e5213e6d59cf0c5fe2c8d4c4cef36 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 4 Mar 2016 11:43:11 +0100 Subject: [PATCH 11/91] towards returning account numbers in /wire/test --- .../config/exchange-common.conf | 4 +- .../config/exchange-common.conf | 2 +- src/exchange/taler-exchange-httpd_wire.c | 37 ++++++++++++------- src/wire/plugin_wire_test.c | 6 +-- 4 files changed, 30 insertions(+), 19 deletions(-) diff --git a/contrib/exchange-template/config/exchange-common.conf b/contrib/exchange-template/config/exchange-common.conf index 5214fd816..183ae47ad 100644 --- a/contrib/exchange-template/config/exchange-common.conf +++ b/contrib/exchange-template/config/exchange-common.conf @@ -25,5 +25,5 @@ DB_CONN_STR = "postgres:///talercheck" SEPA_RESPONSE_FILE = "sepa.json" [wire-test] -REDIRECT_URL = "http://test/" -BANK_URI = "http://bank/ +BANK_URI = "http://bank/" +BANK_ACCOUNT_NUMBER = 1 diff --git a/src/exchange-lib/test-exchange-home/config/exchange-common.conf b/src/exchange-lib/test-exchange-home/config/exchange-common.conf index 9e46fcb3b..35711a8f3 100644 --- a/src/exchange-lib/test-exchange-home/config/exchange-common.conf +++ b/src/exchange-lib/test-exchange-home/config/exchange-common.conf @@ -26,5 +26,5 @@ DB_CONN_STR = "postgres:///talercheck" SEPA_RESPONSE_FILE = "test-exchange-home/sepa.json" [wire-test] -REDIRECT_URL = "http://www.taler.net/" BANK_URI = "http://localhost/" +BANK_ACCOUNT_NUMBER = 1 diff --git a/src/exchange/taler-exchange-httpd_wire.c b/src/exchange/taler-exchange-httpd_wire.c index faf018b99..0d1e3f3f1 100644 --- a/src/exchange/taler-exchange-httpd_wire.c +++ b/src/exchange/taler-exchange-httpd_wire.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2015 GNUnet e.V. + Copyright (C) 2015, 2016 GNUnet e.V. and INRIA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software @@ -83,7 +83,8 @@ TMH_WIRE_handler_wire_test (struct TMH_RequestHandler *rh, { struct MHD_Response *response; int ret; - char *wire_test_redirect; + char *bank_uri; + unsigned long long account_number; response = MHD_create_response_from_buffer (0, NULL, MHD_RESPMEM_PERSISTENT); @@ -105,22 +106,32 @@ TMH_WIRE_handler_wire_test (struct TMH_RequestHandler *rh, if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, "wire-test", - "REDIRECT_URL", - &wire_test_redirect)) + "BANK_URI", + &bank_uri)) { /* oopsie, configuration error */ MHD_destroy_response (response); return TMH_RESPONSE_reply_internal_error (connection, - "REDIRECT_URL not configured"); + "BANK_URI not configured"); } - MHD_add_response_header (response, - MHD_HTTP_HEADER_LOCATION, - wire_test_redirect); - GNUNET_free (wire_test_redirect); - ret = MHD_queue_response (connection, - rh->response_code, - response); - MHD_destroy_response (response); + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_number (cfg, + "wire-test", + "BANK_ACCOUNT_NUMBER", + &account_number)) + { + /* oopsie, configuration error */ + MHD_destroy_response (response); + return TMH_RESPONSE_reply_internal_error (connection, + "BANK_URI not configured"); + } + ret = TMH_RESPONSE_reply_json_pack (connection, + MHD_HTTP_OK, + "{s:s, s:I, s:s}", + "type", "test", + "account_number", (json_int_t) account_number, + "bank_uri", bank_uri); + GNUNET_free (bank_uri); return ret; } diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c index 2f679bbaa..98d9281ce 100644 --- a/src/wire/plugin_wire_test.c +++ b/src/wire/plugin_wire_test.c @@ -482,7 +482,7 @@ test_execute_wire_transfer (void *cls, GNUNET_break (0); return NULL; } - + eh = GNUNET_new (struct TALER_WIRE_ExecuteHandle); eh->cc = cc; eh->cc_cls = cc_cls; @@ -542,12 +542,12 @@ libtaler_plugin_wire_test_init (void *cls) if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, "wire-test", - "bank_uri", + "BANK_URI", &uri)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, "wire-test", - "bank_uri"); + "BANK_URI"); return NULL; } tc = GNUNET_new (struct TestClosure); From 55d5696b78eb4e488c7fc8fad1d37dcb13948494 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 15 Mar 2016 20:08:48 +0100 Subject: [PATCH 12/91] rename --- doc/doxygen/{taler-mint.doxy => taler-exchange.doxy} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/doxygen/{taler-mint.doxy => taler-exchange.doxy} (100%) diff --git a/doc/doxygen/taler-mint.doxy b/doc/doxygen/taler-exchange.doxy similarity index 100% rename from doc/doxygen/taler-mint.doxy rename to doc/doxygen/taler-exchange.doxy From 77801f054a8eae3cebac1d258711545293aef25e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 15 Mar 2016 20:09:59 +0100 Subject: [PATCH 13/91] exclude priv keys --- src/exchange-lib/Makefile.am | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/exchange-lib/Makefile.am b/src/exchange-lib/Makefile.am index f5e58b401..6d5e842be 100644 --- a/src/exchange-lib/Makefile.am +++ b/src/exchange-lib/Makefile.am @@ -57,6 +57,4 @@ test_exchange_api_LDADD = \ EXTRA_DIST = \ test-exchange-home/config/exchange-common.conf \ - test-exchange-home/master.priv \ - test-exchange-home/denomkeys/ \ - test-exchange-home/signkeys/ + test-exchange-home/master.priv From d229f78da3b0b7f851d3541f59651b4f600c879d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 15 Mar 2016 20:11:23 +0100 Subject: [PATCH 14/91] include AUTHORS --- Makefile.am | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile.am b/Makefile.am index cbf014371..26d364975 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,3 +2,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/include SUBDIRS = src doc ACLOCAL_AMFLAGS = -I m4 + + +EXTRA_DIST = AUTHORS From 7479f3a2e53655c6190bf5bcdb31736bf41a56c6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 17 Mar 2016 16:14:28 +0100 Subject: [PATCH 15/91] add APP target --- Makefile.am | 6 ++++++ configure.ac | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index cbf014371..a0ff82d54 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,3 +2,9 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/include SUBDIRS = src doc ACLOCAL_AMFLAGS = -I m4 + +app: + mkdir -p $(PACKAGE)-$(VERSION)-app + tar cf - configure.ac AUTHORS README doc/*.1 doc/*.5 doc/Makefile.am Makefile.am `find src/ -name "*.c" -o -name "*.h" -o -name Makefile.am` | (cd $(PACKAGE)-$(VERSION)-app ; tar xf -) + tar cf $(PACKAGE)-$(VERSION)-app.tgz $(PACKAGE)-$(VERSION)-app + rm -rf $(PACKAGE)-$(VERSION)-app diff --git a/configure.ac b/configure.ac index 6004a7d66..5958785e7 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. # # This file is part of TALER -# Copyright (C) 2014, 2015 GNUnet e.V. +# Copyright (C) 2014, 2015, 2016 GNUnet e.V. and Inria # # TALER is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software From 0d1eced630f4ed05ad95fdbb4354fd428c9cdbf6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 19 Mar 2016 15:23:11 +0100 Subject: [PATCH 16/91] first refactoring of JSON logic to address #4150 and #4237 --- configure.ac | 11 +- src/Makefile.am | 2 +- src/bank-lib/Makefile.am | 3 +- src/bank-lib/bank_api_admin.c | 7 +- src/bank-lib/bank_api_context.h | 1 + src/bank-lib/bank_api_json.c | 525 ------------------ src/bank-lib/bank_api_json.h | 352 ------------ src/exchange-lib/Makefile.am | 4 + src/exchange-lib/exchange_api_admin.c | 10 +- src/exchange-lib/exchange_api_deposit.c | 28 +- src/exchange-lib/exchange_api_deposit_wtid.c | 11 +- src/exchange-lib/exchange_api_json.c | 48 +- src/exchange-lib/exchange_api_refresh.c | 26 +- src/exchange-lib/exchange_api_reserve.c | 9 +- src/exchange-lib/exchange_api_wire.c | 146 +---- src/exchange-lib/exchange_api_wire_deposits.c | 1 + src/exchange-lib/test-exchange-home/sepa.json | 9 +- src/exchange-lib/test_exchange_api.c | 27 +- src/exchange-tools/Makefile.am | 4 +- src/exchange-tools/taler-exchange-keyup.c | 14 +- src/exchange-tools/taler-exchange-sepa.c | 38 +- src/exchange/Makefile.am | 5 +- src/exchange/taler-exchange-aggregator.c | 3 +- src/exchange/taler-exchange-httpd.c | 4 +- src/exchange/taler-exchange-httpd.h | 2 +- src/exchange/taler-exchange-httpd_db.c | 10 +- src/exchange/taler-exchange-httpd_deposit.c | 4 +- src/exchange/taler-exchange-httpd_keystate.c | 49 +- src/exchange/taler-exchange-httpd_parsing.c | 19 +- src/exchange/taler-exchange-httpd_responses.c | 90 +-- src/exchange/taler-exchange-httpd_test.c | 19 +- .../taler-exchange-httpd_validation.c | 5 +- src/exchange/taler-exchange-httpd_wire.c | 5 +- src/include/taler_exchange_service.h | 23 +- src/include/taler_exchangedb_plugin.h | 1 + src/include/taler_json_lib.h | 127 +---- src/include/taler_pq_lib.h | 1 + src/include/taler_util.h | 26 - src/include/taler_wire_plugin.h | 6 +- src/json/Makefile.am | 38 ++ src/json/json.c | 53 ++ src/json/json_helper.c | 146 +++++ src/json/test_json.c | 71 +++ src/pq/pq_result_helper.c | 25 +- src/util/Makefile.am | 20 +- src/util/json.c | 400 ------------- src/util/test_json.c | 182 ------ src/util/util.c | 42 +- src/util/wireformats.c | 441 --------------- src/wire/Makefile.am | 3 +- src/wire/plugin_wire_sepa.c | 151 +++-- src/wire/plugin_wire_template.c | 6 +- src/wire/plugin_wire_test.c | 119 ++-- src/wire/test_sepa_wireformat.c | 40 +- 54 files changed, 887 insertions(+), 2525 deletions(-) delete mode 100644 src/bank-lib/bank_api_json.c delete mode 100644 src/bank-lib/bank_api_json.h create mode 100644 src/json/Makefile.am create mode 100644 src/json/json.c create mode 100644 src/json/json_helper.c create mode 100644 src/json/test_json.c delete mode 100644 src/util/json.c delete mode 100644 src/util/test_json.c delete mode 100644 src/util/wireformats.c diff --git a/configure.ac b/configure.ac index 6004a7d66..bd8ad9f50 100644 --- a/configure.ac +++ b/configure.ac @@ -18,7 +18,7 @@ # AC_PREREQ([2.69]) AC_INIT([taler-exchange], [0.0.0], [taler-bug@gnunet.org]) -AC_CONFIG_SRCDIR([src/util/json.c]) +AC_CONFIG_SRCDIR([src/util/util.c]) AC_CONFIG_HEADERS([taler_config.h]) # support for non-recursive builds AM_INIT_AUTOMAKE([subdir-objects]) @@ -354,14 +354,15 @@ AC_CONFIG_FILES([Makefile doc/Makefile doc/doxygen/Makefile src/Makefile - src/include/Makefile - src/util/Makefile - src/pq/Makefile src/bank-lib/Makefile - src/wire/Makefile src/exchangedb/Makefile src/exchange/Makefile src/exchange-tools/Makefile src/exchange-lib/Makefile + src/include/Makefile + src/json/Makefile + src/pq/Makefile + src/util/Makefile + src/wire/Makefile ]) AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am index 37c902e65..6e0fb2049 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,7 +15,7 @@ if WALLET_ONLY SUBDIRS = include util else -SUBDIRS = include util $(PQ_DIR) $(BANK_LIB) wire exchangedb exchange exchange-tools +SUBDIRS = include util json $(PQ_DIR) $(BANK_LIB) wire exchangedb exchange exchange-tools if HAVE_LIBCURL SUBDIRS += exchange-lib else diff --git a/src/bank-lib/Makefile.am b/src/bank-lib/Makefile.am index 2f44adada..4cf3472ec 100644 --- a/src/bank-lib/Makefile.am +++ b/src/bank-lib/Makefile.am @@ -15,10 +15,11 @@ libtalerbank_la_LDFLAGS = \ libtalerbank_la_SOURCES = \ bank_api_context.c bank_api_context.h \ - bank_api_json.c bank_api_json.h \ bank_api_admin.c libtalerbank_la_LIBADD = \ + $(top_builddir)/src/json/libtalerjson.la \ + -lgnunetjson \ -lgnunetutil \ -ljansson \ $(XLIB) diff --git a/src/bank-lib/bank_api_admin.c b/src/bank-lib/bank_api_admin.c index 5deb4aa72..443f24a8a 100644 --- a/src/bank-lib/bank_api_admin.c +++ b/src/bank-lib/bank_api_admin.c @@ -24,8 +24,9 @@ #include #include /* just for HTTP status codes */ #include +#include #include "taler_bank_service.h" -#include "bank_api_json.h" +#include "taler_json_lib.h" #include "bank_api_context.h" #include "taler_signatures.h" @@ -173,9 +174,9 @@ TALER_BANK_admin_add_incoming (struct TALER_BANK_Context *bank, admin_obj = json_pack ("{s:o, s:o," " s:I, s:I}", - "wtid", TALER_json_from_data (wtid, + "wtid", GNUNET_JSON_from_data (wtid, sizeof (*wtid)), - "amount", TALER_json_from_amount (amount), + "amount", TALER_JSON_from_amount (amount), "debit_account", (json_int_t) debit_account_no, "credit_account", (json_int_t) credit_account_no); aai = GNUNET_new (struct TALER_BANK_AdminAddIncomingHandle); diff --git a/src/bank-lib/bank_api_context.h b/src/bank-lib/bank_api_context.h index 552cbe440..1f21cb8d2 100644 --- a/src/bank-lib/bank_api_context.h +++ b/src/bank-lib/bank_api_context.h @@ -21,6 +21,7 @@ * @author Christian Grothoff */ #include "platform.h" +#include #include #include #include "taler_bank_service.h" diff --git a/src/bank-lib/bank_api_json.c b/src/bank-lib/bank_api_json.c deleted file mode 100644 index 2a09e5272..000000000 --- a/src/bank-lib/bank_api_json.c +++ /dev/null @@ -1,525 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2014, 2015 GNUnet e.V. - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU Affero General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License along with - TALER; see the file COPYING. If not, If not, see -*/ -/** - * @file bank-lib/bank_api_json.c - * @brief functions to parse incoming requests (JSON snippets) - * @author Florian Dold - * @author Benedikt Mueller - * @author Christian Grothoff - */ -#include "platform.h" -#include "bank_api_json.h" - -/** - * Navigate and parse data in a JSON tree. - * - * @param root the JSON node to start the navigation at. - * @param spec parse specification array - * @return offset in @a spec where parsing failed, -1 on success (!) - */ -static int -parse_json (json_t *root, - struct BAJ_Specification *spec) -{ - int i; - json_t *pos; /* what's our current position? */ - - pos = root; - for (i=0;BAJ_CMD_END != spec[i].cmd;i++) - { - pos = json_object_get (root, - spec[i].field); - if (NULL == pos) - { - GNUNET_break_op (0); - return i; - } - switch (spec[i].cmd) - { - case BAJ_CMD_END: - GNUNET_assert (0); - return i; - case BAJ_CMD_AMOUNT: - if (GNUNET_OK != - TALER_json_to_amount (pos, - spec[i].details.amount)) - { - GNUNET_break_op (0); - return i; - } - break; - case BAJ_CMD_TIME_ABSOLUTE: - if (GNUNET_OK != - TALER_json_to_abs (pos, - spec[i].details.abs_time)) - { - GNUNET_break_op (0); - return i; - } - break; - - case BAJ_CMD_STRING: - { - const char *str; - - str = json_string_value (pos); - if (NULL == str) - { - GNUNET_break_op (0); - return i; - } - *spec[i].details.strptr = str; - } - break; - - case BAJ_CMD_BINARY_FIXED: - { - const char *str; - int res; - - str = json_string_value (pos); - if (NULL == str) - { - GNUNET_break_op (0); - return i; - } - res = GNUNET_STRINGS_string_to_data (str, strlen (str), - spec[i].details.fixed_data.dest, - spec[i].details.fixed_data.dest_size); - if (GNUNET_OK != res) - { - GNUNET_break_op (0); - return i; - } - } - break; - - case BAJ_CMD_BINARY_VARIABLE: - { - const char *str; - size_t size; - void *data; - int res; - - str = json_string_value (pos); - if (NULL == str) - { - GNUNET_break_op (0); - return i; - } - size = (strlen (str) * 5) / 8; - if (size >= 1024) - { - GNUNET_break_op (0); - return i; - } - data = GNUNET_malloc (size); - res = GNUNET_STRINGS_string_to_data (str, - strlen (str), - data, - size); - if (GNUNET_OK != res) - { - GNUNET_break_op (0); - GNUNET_free (data); - return i; - } - *spec[i].details.variable_data.dest_p = data; - *spec[i].details.variable_data.dest_size_p = size; - } - break; - - case BAJ_CMD_RSA_PUBLIC_KEY: - { - size_t size; - const char *str; - int res; - void *buf; - - str = json_string_value (pos); - if (NULL == str) - { - GNUNET_break_op (0); - return i; - } - size = (strlen (str) * 5) / 8; - buf = GNUNET_malloc (size); - res = GNUNET_STRINGS_string_to_data (str, - strlen (str), - buf, - size); - if (GNUNET_OK != res) - { - GNUNET_free (buf); - GNUNET_break_op (0); - return i; - } - *spec[i].details.rsa_public_key - = GNUNET_CRYPTO_rsa_public_key_decode (buf, - size); - GNUNET_free (buf); - if (NULL == spec[i].details.rsa_public_key) - { - GNUNET_break_op (0); - return i; - } - } - break; - - case BAJ_CMD_RSA_SIGNATURE: - { - size_t size; - const char *str; - int res; - void *buf; - - str = json_string_value (pos); - if (NULL == str) - { - GNUNET_break_op (0); - return i; - } - size = (strlen (str) * 5) / 8; - buf = GNUNET_malloc (size); - res = GNUNET_STRINGS_string_to_data (str, - strlen (str), - buf, - size); - if (GNUNET_OK != res) - { - GNUNET_free (buf); - GNUNET_break_op (0); - return i; - } - *spec[i].details.rsa_signature - = GNUNET_CRYPTO_rsa_signature_decode (buf, - size); - GNUNET_free (buf); - if (NULL == spec[i].details.rsa_signature) - return i; - } - break; - - case BAJ_CMD_UINT16: - { - json_int_t val; - - if (! json_is_integer (pos)) - { - GNUNET_break_op (0); - return i; - } - val = json_integer_value (pos); - if ( (0 > val) || (val > UINT16_MAX) ) - { - GNUNET_break_op (0); - return i; - } - *spec[i].details.u16 = (uint16_t) val; - } - break; - - case BAJ_CMD_UINT64: - { - json_int_t val; - - if (! json_is_integer (pos)) - { - GNUNET_break_op (0); - return i; - } - val = json_integer_value (pos); - *spec[i].details.u64 = (uint64_t) val; - } - break; - - case BAJ_CMD_JSON_OBJECT: - { - if (! (json_is_object (pos) || json_is_array (pos)) ) - { - GNUNET_break_op (0); - return i; - } - json_incref (pos); - *spec[i].details.obj = pos; - } - break; - - default: - GNUNET_break (0); - return i; - } - } - return -1; /* all OK! */ -} - - -/** - * Free all elements allocated during a - * #BAJ_parse_json() operation. - * - * @param spec specification of the parse operation - * @param end number of elements in @a spec to process - */ -static void -parse_free (struct BAJ_Specification *spec, - int end) -{ - int i; - - for (i=0;i -*/ -/** - * @file exchange-lib/exchange_api_json.h - * @brief functions to parse incoming requests (JSON snippets) - * @author Florian Dold - * @author Benedikt Mueller - * @author Christian Grothoff - */ -#include "platform.h" -#include -#include "taler_util.h" -#include - - -/** - * Enumeration with the various commands for the - * #BAJ_parse_json interpreter. - */ -enum BAJ_Command -{ - - /** - * End of command list. - */ - BAJ_CMD_END, - - /** - * Parse amount at current position. - */ - BAJ_CMD_AMOUNT, - - /** - * Parse absolute time at current position. - */ - BAJ_CMD_TIME_ABSOLUTE, - - /** - * Parse fixed binary value at current position. - */ - BAJ_CMD_BINARY_FIXED, - - /** - * Parse variable-size binary value at current position. - */ - BAJ_CMD_BINARY_VARIABLE, - - /** - * Parse RSA public key at current position. - */ - BAJ_CMD_RSA_PUBLIC_KEY, - - /** - * Parse RSA signature at current position. - */ - BAJ_CMD_RSA_SIGNATURE, - - /** - * Parse `const char *` JSON string at current position. - */ - BAJ_CMD_STRING, - - /** - * Parse `uint16_t` integer at the current position. - */ - BAJ_CMD_UINT16, - - /** - * Parse `uint64_t` integer at the current position. - */ - BAJ_CMD_UINT64, - - /** - * Parse JSON object at the current position. - */ - BAJ_CMD_JSON_OBJECT, - - /** - * Parse ??? at current position. - */ - BAJ_CMD_C - -}; - - -/** - * @brief Entry in parser specification for #BAJ_parse_json. - */ -struct BAJ_Specification -{ - - /** - * Command to execute. - */ - enum BAJ_Command cmd; - - /** - * Name of the field to access. - */ - const char *field; - - /** - * Further details for the command. - */ - union { - - /** - * Where to store amount for #BAJ_CMD_AMOUNT. - */ - struct TALER_Amount *amount; - - /** - * Where to store time, for #BAJ_CMD_TIME_ABSOLUTE. - */ - struct GNUNET_TIME_Absolute *abs_time; - - /** - * Where to write binary data, for #BAJ_CMD_BINARY_FIXED. - */ - struct { - /** - * Where to write the data. - */ - void *dest; - - /** - * How many bytes to write to @e dest. - */ - size_t dest_size; - - } fixed_data; - - /** - * Where to write binary data, for #BAJ_CMD_BINARY_VARIABLE. - */ - struct { - /** - * Where to store the pointer with the data (is allocated). - */ - void **dest_p; - - /** - * Where to store the number of bytes allocated at `*dest`. - */ - size_t *dest_size_p; - - } variable_data; - - /** - * Where to store the RSA public key for #BAJ_CMD_RSA_PUBLIC_KEY - */ - struct GNUNET_CRYPTO_rsa_PublicKey **rsa_public_key; - - /** - * Where to store the RSA signature for #BAJ_CMD_RSA_SIGNATURE - */ - struct GNUNET_CRYPTO_rsa_Signature **rsa_signature; - - /** - * Details for #BAJ_CMD_EDDSA_SIGNATURE - */ - struct { - - /** - * Where to store the purpose. - */ - struct GNUNET_CRYPTO_EccSignaturePurpose **purpose_p; - - /** - * Key to verify the signature against. - */ - const struct GNUNET_CRYPTO_EddsaPublicKey *pub_key; - - } eddsa_signature; - - /** - * Where to store a pointer to the string. - */ - const char **strptr; - - /** - * Where to store 16-bit integer. - */ - uint16_t *u16; - - /** - * Where to store 64-bit integer. - */ - uint64_t *u64; - - /** - * Where to store a JSON object. - */ - json_t **obj; - - } details; - -}; - - -/** - * Navigate and parse data in a JSON tree. - * - * @param root the JSON node to start the navigation at. - * @param spec parse specification array - * @return #GNUNET_OK on success, #GNUNET_SYSERR on error - */ -int -BAJ_parse_json (const json_t *root, - struct BAJ_Specification *spec); - - -/** - * Free all elements allocated during a - * #BAJ_parse_json() operation. - * - * @param spec specification of the parse operation - */ -void -BAJ_parse_free (struct BAJ_Specification *spec); - - -/** - * End of a parser specification. - */ -#define BAJ_spec_end { .cmd = BAJ_CMD_END } - -/** - * Fixed size object (in network byte order, encoded using Crockford - * Base32hex encoding). - * - * @param name name of the JSON field - * @param obj pointer where to write the data (type of `*obj` will determine size) - */ -#define BAJ_spec_fixed_auto(name,obj) { .cmd = BAJ_CMD_BINARY_FIXED, .field = name, .details.fixed_data.dest = obj, .details.fixed_data.dest_size = sizeof (*obj) } - - -/** - * Variable size object (in network byte order, encoded using Crockford - * Base32hex encoding). - * - * @param name name of the JSON field - * @param obj pointer where to write the data (a `void **`) - * @param size where to store the number of bytes allocated for @a obj (of type `size_t *` - */ -#define BAJ_spec_varsize(name,obj,size) { .cmd = BAJ_CMD_BINARY_VARIABLE, .field = name, .details.variable_data.dest_p = obj, .details.variable_data.dest_size_p = size } - - -/** - * The expected field stores a string. - * - * @param name name of the JSON field - * @param strptr where to store a pointer to the field - */ -struct BAJ_Specification -BAJ_spec_string (const char *name, - const char **strptr); - - -/** - * Absolute time. - * - * @param name name of the JSON field - * @param[out] at where to store the absolute time found under @a name - */ -struct BAJ_Specification -BAJ_spec_absolute_time (const char *name, - struct GNUNET_TIME_Absolute *at); - - -/** - * 16-bit integer. - * - * @param name name of the JSON field - * @param[out] u16 where to store the integer found under @a name - */ -struct BAJ_Specification -BAJ_spec_uint16 (const char *name, - uint16_t *u16); - - -/** - * 64-bit integer. - * - * @param name name of the JSON field - * @param[out] u64 where to store the integer found under @a name - */ -struct BAJ_Specification -BAJ_spec_uint64 (const char *name, - uint64_t *u64); - - -/** - * JSON object. - * - * @param name name of the JSON field - * @param[out] jsonp where to store the JSON found under @a name - */ -struct BAJ_Specification -BAJ_spec_json (const char *name, - json_t **jsonp); - - -/** - * Specification for parsing an amount value. - * - * @param name name of the JSON field - * @param amount where to store the amount under @a name - */ -struct BAJ_Specification -BAJ_spec_amount (const char *name, - struct TALER_Amount *amount); - - -/** - * Specification for parsing an RSA public key. - * - * @param name name of the JSON field - * @param pk where to store the RSA key found under @a name - */ -struct BAJ_Specification -BAJ_spec_rsa_public_key (const char *name, - struct GNUNET_CRYPTO_rsa_PublicKey **pk); - - -/** - * Specification for parsing an RSA signature. - * - * @param name name of the JSON field - * @param sig where to store the RSA signature found under @a name - */ -struct BAJ_Specification -BAJ_spec_rsa_signature (const char *name, - struct GNUNET_CRYPTO_rsa_Signature **sig); - - - - -/* end of exchange_api_json.h */ diff --git a/src/exchange-lib/Makefile.am b/src/exchange-lib/Makefile.am index 6d5e842be..a043e8601 100644 --- a/src/exchange-lib/Makefile.am +++ b/src/exchange-lib/Makefile.am @@ -28,6 +28,9 @@ libtalerexchange_la_SOURCES = \ exchange_api_wire_deposits.c libtalerexchange_la_LIBADD = \ + $(top_builddir)/src/json/libtalerjson.la \ + $(top_builddir)/src/util/libtalerutil.la \ + -lgnunetjson \ -lgnunetutil \ -ljansson \ $(XLIB) @@ -51,6 +54,7 @@ test_exchange_api_SOURCES = \ test_exchange_api_LDADD = \ libtalerexchange.la \ $(LIBGCRYPT_LIBS) \ + $(top_builddir)/src/json/libtalerjson.la \ $(top_builddir)/src/util/libtalerutil.la \ -lgnunetutil \ -ljansson diff --git a/src/exchange-lib/exchange_api_admin.c b/src/exchange-lib/exchange_api_admin.c index 3dcbb80e9..4ed761fb2 100644 --- a/src/exchange-lib/exchange_api_admin.c +++ b/src/exchange-lib/exchange_api_admin.c @@ -24,6 +24,8 @@ #include #include /* just for HTTP status codes */ #include +#include +#include "taler_json_lib.h" #include "taler_exchange_service.h" #include "exchange_api_json.h" #include "exchange_api_context.h" @@ -174,7 +176,7 @@ TALER_EXCHANGE_admin_add_incoming (struct TALER_EXCHANGE_Handle *exchange, CURL *eh; GNUNET_assert (GNUNET_OK == - TALER_round_abs_time (&execution_date)); + GNUNET_TIME_round_abs (&execution_date)); if (GNUNET_YES != MAH_handle_is_ready (exchange)) { @@ -183,10 +185,10 @@ TALER_EXCHANGE_admin_add_incoming (struct TALER_EXCHANGE_Handle *exchange, } admin_obj = json_pack ("{s:o, s:o," /* reserve_pub/amount */ " s:o, s:O}", /* execution_Date/wire */ - "reserve_pub", TALER_json_from_data (reserve_pub, + "reserve_pub", GNUNET_JSON_from_data (reserve_pub, sizeof (*reserve_pub)), - "amount", TALER_json_from_amount (amount), - "execution_date", TALER_json_from_abs (execution_date), + "amount", TALER_JSON_from_amount (amount), + "execution_date", GNUNET_JSON_from_time_abs (execution_date), "wire", wire); aai = GNUNET_new (struct TALER_EXCHANGE_AdminAddIncomingHandle); aai->exchange = exchange; diff --git a/src/exchange-lib/exchange_api_deposit.c b/src/exchange-lib/exchange_api_deposit.c index deba4877d..ef7a59e69 100644 --- a/src/exchange-lib/exchange_api_deposit.c +++ b/src/exchange-lib/exchange_api_deposit.c @@ -25,6 +25,8 @@ #include #include /* just for HTTP status codes */ #include +#include +#include "taler_json_lib.h" #include "taler_exchange_service.h" #include "exchange_api_common.h" #include "exchange_api_json.h" @@ -411,7 +413,7 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange, struct GNUNET_HashCode h_wire; struct TALER_Amount amount_without_fee; - (void) TALER_round_abs_time (&wire_deadline); + (void) GNUNET_TIME_round_abs (&wire_deadline); if (GNUNET_YES != MAH_handle_is_ready (exchange)) { @@ -420,7 +422,7 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange, } /* initialize h_wire */ if (GNUNET_OK != - TALER_hash_json (wire_details, + TALER_JSON_hash (wire_details, &h_wire)) { GNUNET_break (0); @@ -468,23 +470,23 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange, " s:I, s:o," /* transaction id, merchant_pub */ " s:o, s:o," /* refund_deadline, wire_deadline */ " s:o}", /* coin_sig */ - "f", TALER_json_from_amount (amount), + "f", TALER_JSON_from_amount (amount), "wire", wire_details, - "H_wire", TALER_json_from_data (&h_wire, + "H_wire", GNUNET_JSON_from_data (&h_wire, sizeof (h_wire)), - "H_contract", TALER_json_from_data (h_contract, + "H_contract", GNUNET_JSON_from_data (h_contract, sizeof (struct GNUNET_HashCode)), - "coin_pub", TALER_json_from_data (coin_pub, + "coin_pub", GNUNET_JSON_from_data (coin_pub, sizeof (*coin_pub)), - "denom_pub", TALER_json_from_rsa_public_key (denom_pub->rsa_public_key), - "ub_sig", TALER_json_from_rsa_signature (denom_sig->rsa_signature), - "timestamp", TALER_json_from_abs (timestamp), + "denom_pub", GNUNET_JSON_from_rsa_public_key (denom_pub->rsa_public_key), + "ub_sig", GNUNET_JSON_from_rsa_signature (denom_sig->rsa_signature), + "timestamp", GNUNET_JSON_from_time_abs (timestamp), "transaction_id", (json_int_t) transaction_id, - "merchant_pub", TALER_json_from_data (merchant_pub, + "merchant_pub", GNUNET_JSON_from_data (merchant_pub, sizeof (*merchant_pub)), - "refund_deadline", TALER_json_from_abs (refund_deadline), - "edate", TALER_json_from_abs (wire_deadline), - "coin_sig", TALER_json_from_data (coin_sig, + "refund_deadline", GNUNET_JSON_from_time_abs (refund_deadline), + "edate", GNUNET_JSON_from_time_abs (wire_deadline), + "coin_sig", GNUNET_JSON_from_data (coin_sig, sizeof (*coin_sig)) ); diff --git a/src/exchange-lib/exchange_api_deposit_wtid.c b/src/exchange-lib/exchange_api_deposit_wtid.c index 83beb03ae..f3b5d2c0d 100644 --- a/src/exchange-lib/exchange_api_deposit_wtid.c +++ b/src/exchange-lib/exchange_api_deposit_wtid.c @@ -24,6 +24,7 @@ #include #include /* just for HTTP status codes */ #include +#include #include "taler_exchange_service.h" #include "exchange_api_common.h" #include "exchange_api_json.h" @@ -296,16 +297,16 @@ TALER_EXCHANGE_deposit_wtid (struct TALER_EXCHANGE_Handle *exchange, deposit_wtid_obj = json_pack ("{s:o, s:o," /* H_wire, H_contract */ " s:o, s:I," /* coin_pub, transaction_id */ " s:o, s:o}", /* merchant_pub, merchant_sig */ - "H_wire", TALER_json_from_data (h_wire, + "H_wire", GNUNET_JSON_from_data (h_wire, sizeof (struct GNUNET_HashCode)), - "H_contract", TALER_json_from_data (h_contract, + "H_contract", GNUNET_JSON_from_data (h_contract, sizeof (struct GNUNET_HashCode)), - "coin_pub", TALER_json_from_data (coin_pub, + "coin_pub", GNUNET_JSON_from_data (coin_pub, sizeof (*coin_pub)), "transaction_id", (json_int_t) transaction_id, - "merchant_pub", TALER_json_from_data (&dtp.merchant, + "merchant_pub", GNUNET_JSON_from_data (&dtp.merchant, sizeof (struct TALER_MerchantPublicKeyP)), - "merchant_sig", TALER_json_from_data (&merchant_sig, + "merchant_sig", GNUNET_JSON_from_data (&merchant_sig, sizeof (merchant_sig))); dwh = GNUNET_new (struct TALER_EXCHANGE_DepositWtidHandle); diff --git a/src/exchange-lib/exchange_api_json.c b/src/exchange-lib/exchange_api_json.c index d91feba0e..d6c54be5b 100644 --- a/src/exchange-lib/exchange_api_json.c +++ b/src/exchange-lib/exchange_api_json.c @@ -22,6 +22,7 @@ */ #include "platform.h" #include "exchange_api_json.h" +#include "taler_json_lib.h" /** * Navigate and parse data in a JSON tree. @@ -53,24 +54,39 @@ parse_json (json_t *root, GNUNET_assert (0); return i; case MAJ_CMD_AMOUNT: - if (GNUNET_OK != - TALER_json_to_amount (pos, - spec[i].details.amount)) { - GNUNET_break_op (0); - return i; - } - break; - case MAJ_CMD_TIME_ABSOLUTE: - if (GNUNET_OK != - TALER_json_to_abs (pos, - spec[i].details.abs_time)) - { - GNUNET_break_op (0); - return i; - } - break; + struct GNUNET_JSON_Specification nspec[] = { + TALER_JSON_spec_amount (NULL, spec[i].details.amount), + GNUNET_JSON_spec_end () + }; + if (GNUNET_OK != + GNUNET_JSON_parse (pos, + nspec, + NULL, NULL)) + { + GNUNET_break_op (0); + return i; + } + break; + } + case MAJ_CMD_TIME_ABSOLUTE: + { + struct GNUNET_JSON_Specification nspec[] = { + GNUNET_JSON_spec_absolute_time (NULL, spec[i].details.abs_time), + GNUNET_JSON_spec_end () + }; + + if (GNUNET_OK != + GNUNET_JSON_parse (pos, + nspec, + NULL, NULL)) + { + GNUNET_break_op (0); + return i; + } + break; + } case MAJ_CMD_STRING: { const char *str; diff --git a/src/exchange-lib/exchange_api_refresh.c b/src/exchange-lib/exchange_api_refresh.c index 03d59ea3b..bcec13544 100644 --- a/src/exchange-lib/exchange_api_refresh.c +++ b/src/exchange-lib/exchange_api_refresh.c @@ -24,6 +24,8 @@ #include #include /* just for HTTP status codes */ #include +#include +#include "taler_json_lib.h" #include "taler_exchange_service.h" #include "exchange_api_common.h" #include "exchange_api_json.h" @@ -1373,17 +1375,17 @@ melted_coin_to_json (const struct GNUNET_HashCode *melt_session_hash, &confirm_sig.eddsa_signature); return json_pack ("{s:o, s:o, s:o, s:o, s:o}", "coin_pub", - TALER_json_from_data (&melt.coin_pub, + GNUNET_JSON_from_data (&melt.coin_pub, sizeof (melt.coin_pub)), "denom_pub", - TALER_json_from_rsa_public_key (mc->pub_key.rsa_public_key), + GNUNET_JSON_from_rsa_public_key (mc->pub_key.rsa_public_key), "denom_sig", - TALER_json_from_rsa_signature (mc->sig.rsa_signature), + GNUNET_JSON_from_rsa_signature (mc->sig.rsa_signature), "confirm_sig", - TALER_json_from_data (&confirm_sig, + GNUNET_JSON_from_data (&confirm_sig, sizeof (confirm_sig)), "value_with_fee", - TALER_json_from_amount (&mc->melt_amount_with_fee)); + TALER_JSON_from_amount (&mc->melt_amount_with_fee)); } @@ -1472,7 +1474,7 @@ TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange, GNUNET_CRYPTO_ecdhe_key_get_public (&mc->transfer_priv[j].ecdhe_priv, &transfer_pub.ecdhe_pub); json_array_append (tmp, - TALER_json_from_data (&transfer_pub, + GNUNET_JSON_from_data (&transfer_pub, sizeof (transfer_pub))); } json_array_append (transfer_pubs, @@ -1497,7 +1499,7 @@ TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange, &trans_sec, &els)); json_array_append (tmp, - TALER_json_from_data (&els, + GNUNET_JSON_from_data (&els, sizeof (els))); } json_array_append (secret_encs, @@ -1508,7 +1510,7 @@ TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange, for (i=0;inum_fresh_coins;i++) { json_array_append (new_denoms, - TALER_json_from_rsa_public_key + GNUNET_JSON_from_rsa_public_key (md->fresh_pks[i].rsa_public_key)); } @@ -1533,7 +1535,7 @@ TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange, &buf_len); GNUNET_assert (NULL != buf); json_array_append (tmp, - TALER_json_from_data (buf, + GNUNET_JSON_from_data (buf, buf_len)); GNUNET_free (buf); GNUNET_free (rle); @@ -1564,7 +1566,7 @@ TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange, md->fresh_pks[i].rsa_public_key, &coin_ev); json_array_append (tmp, - TALER_json_from_data (coin_ev, + GNUNET_JSON_from_data (coin_ev, coin_ev_size)); GNUNET_free (coin_ev); } @@ -1975,7 +1977,7 @@ TALER_EXCHANGE_refresh_reveal (struct TALER_EXCHANGE_Handle *exchange, const struct MeltedCoin *mc = &md->melted_coins[i]; json_array_append (tmp, - TALER_json_from_data (&mc->transfer_priv[j], + GNUNET_JSON_from_data (&mc->transfer_priv[j], sizeof (struct TALER_TransferPrivateKeyP))); } json_array_append (transfer_privs, @@ -1985,7 +1987,7 @@ TALER_EXCHANGE_refresh_reveal (struct TALER_EXCHANGE_Handle *exchange, /* build main JSON request */ reveal_obj = json_pack ("{s:o, s:o}", "session_hash", - TALER_json_from_data (&md->melt_session_hash, + GNUNET_JSON_from_data (&md->melt_session_hash, sizeof (struct GNUNET_HashCode)), "transfer_privs", transfer_privs); diff --git a/src/exchange-lib/exchange_api_reserve.c b/src/exchange-lib/exchange_api_reserve.c index e694b8d95..1237f7cbe 100644 --- a/src/exchange-lib/exchange_api_reserve.c +++ b/src/exchange-lib/exchange_api_reserve.c @@ -24,6 +24,7 @@ #include #include /* just for HTTP status codes */ #include +#include #include "taler_exchange_service.h" #include "exchange_api_json.h" #include "exchange_api_context.h" @@ -859,12 +860,12 @@ TALER_EXCHANGE_reserve_withdraw (struct TALER_EXCHANGE_Handle *exchange, &reserve_sig.eddsa_signature)); withdraw_obj = json_pack ("{s:o, s:o," /* denom_pub and coin_ev */ " s:o, s:o}",/* reserve_pub and reserve_sig */ - "denom_pub", TALER_json_from_rsa_public_key (pk->key.rsa_public_key), - "coin_ev", TALER_json_from_data (coin_ev, + "denom_pub", GNUNET_JSON_from_rsa_public_key (pk->key.rsa_public_key), + "coin_ev", GNUNET_JSON_from_data (coin_ev, coin_ev_size), - "reserve_pub", TALER_json_from_data (&wsh->reserve_pub, + "reserve_pub", GNUNET_JSON_from_data (&wsh->reserve_pub, sizeof (struct TALER_ReservePublicKeyP)), - "reserve_sig", TALER_json_from_data (&reserve_sig, + "reserve_sig", GNUNET_JSON_from_data (&reserve_sig, sizeof (reserve_sig))); GNUNET_free (coin_ev); diff --git a/src/exchange-lib/exchange_api_wire.c b/src/exchange-lib/exchange_api_wire.c index f01c5000b..35c443ff5 100644 --- a/src/exchange-lib/exchange_api_wire.c +++ b/src/exchange-lib/exchange_api_wire.c @@ -25,11 +25,11 @@ #include /* just for HTTP status codes */ #include #include "taler_exchange_service.h" +#include "taler_wire_plugin.h" #include "exchange_api_common.h" #include "exchange_api_json.h" #include "exchange_api_context.h" #include "exchange_api_handle.h" -#include "taler_signatures.h" /** @@ -82,93 +82,6 @@ struct TALER_EXCHANGE_WireHandle }; -/** - * Verify that the signature on the "200 OK" response - * for /wire/test from the exchange is valid. - * Accepts everything. - * - * @param wh wire handle - * @param json json reply with the signature - * @return #GNUNET_SYSERR if @a json is invalid, - * #GNUNET_NO if the method is unknown, - * #GNUNET_OK if the json is valid - */ -static int -verify_wire_test_signature_ok (const struct TALER_EXCHANGE_WireHandle *wh, - json_t *json) -{ - return GNUNET_OK; -} - - -/** - * Verify that the signature on the "200 OK" response - * for /wire/sepa from the exchange is valid. - * - * @param wh wire handle - * @param json json reply with the signature - * @return #GNUNET_SYSERR if @a json is invalid, - * #GNUNET_NO if the method is unknown, - * #GNUNET_OK if the json is valid - */ -static int -verify_wire_sepa_signature_ok (const struct TALER_EXCHANGE_WireHandle *wh, - json_t *json) -{ - struct TALER_MasterSignatureP exchange_sig; - struct TALER_MasterWireSepaDetailsPS mp; - const char *receiver_name; - const char *iban; - const char *bic; - const struct TALER_EXCHANGE_Keys *key_state; - struct GNUNET_HashContext *hc; - struct MAJ_Specification spec[] = { - MAJ_spec_fixed_auto ("sig", &exchange_sig), - MAJ_spec_string ("receiver_name", &receiver_name), - MAJ_spec_string ("iban", &iban), - MAJ_spec_string ("bic", &bic), - MAJ_spec_end - }; - - if (GNUNET_OK != - MAJ_parse_json (json, - spec)) - { - GNUNET_break_op (0); - return GNUNET_SYSERR; - } - - key_state = TALER_EXCHANGE_get_keys (wh->exchange); - mp.purpose.purpose = htonl (TALER_SIGNATURE_MASTER_SEPA_DETAILS); - mp.purpose.size = htonl (sizeof (struct TALER_MasterWireSepaDetailsPS)); - hc = GNUNET_CRYPTO_hash_context_start (); - GNUNET_CRYPTO_hash_context_read (hc, - receiver_name, - strlen (receiver_name) + 1); - GNUNET_CRYPTO_hash_context_read (hc, - iban, - strlen (iban) + 1); - GNUNET_CRYPTO_hash_context_read (hc, - bic, - strlen (bic) + 1); - GNUNET_CRYPTO_hash_context_finish (hc, - &mp.h_sepa_details); - - if (GNUNET_OK != - GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MASTER_SEPA_DETAILS, - &mp.purpose, - &exchange_sig.eddsa_signature, - &key_state->master_pub.eddsa_pub)) - { - GNUNET_break_op (0); - MAJ_parse_free (spec); - return GNUNET_SYSERR; - } - MAJ_parse_free (spec); - return GNUNET_OK; -} - - /** * Verify that the signature on the "200 OK" response * for /wire/METHOD from the exchange is valid. @@ -185,37 +98,33 @@ verify_wire_method_signature_ok (const struct TALER_EXCHANGE_WireHandle *wh, const char *method, json_t *json) { - struct + const struct TALER_EXCHANGE_Keys *key_state; + struct TALER_WIRE_Plugin *plugin; + char *lib_name; + int ret; + + key_state = TALER_EXCHANGE_get_keys (wh->exchange); + (void) GNUNET_asprintf (&lib_name, + "libtaler_plugin_wire_%s", + method); + plugin = GNUNET_PLUGIN_load (lib_name, + NULL); + if (NULL == plugin) { - /** - * Name fo the method. - */ - const char *method; - - /** - * Handler to invoke to verify signature. - * - * @param wh wire handle with key material - * @param json json reply with signature to verify - */ - int (*handler)(const struct TALER_EXCHANGE_WireHandle *wh, - json_t *json); - } handlers[] = { - { "test", &verify_wire_test_signature_ok }, - { "sepa", &verify_wire_sepa_signature_ok }, - { NULL, NULL } - }; - unsigned int i; - - for (i=0;NULL != handlers[i].method; i++) - if (0 == strcasecmp (handlers[i].method, - method)) - return handlers[i].handler (wh, - json); - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Wire transfer method `%s' not supported\n", - method); - return GNUNET_NO; + GNUNET_free (lib_name); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Wire transfer method `%s' not supported\n", + method); + return GNUNET_NO; + } + plugin->library_name = lib_name; + ret = plugin->wire_validate (plugin->cls, + json, + &key_state->master_pub); + GNUNET_PLUGIN_unload (lib_name, + plugin); + GNUNET_free (lib_name); + return (GNUNET_YES == ret) ? GNUNET_OK : GNUNET_SYSERR; } @@ -312,6 +221,7 @@ handle_wire_method_finished (void *cls, json_string_value (json_array_get (wh->methods, wh->methods_off-1)), json); + json_decref (json); /* trigger request for the next /wire/method */ request_wire_method (wh); } diff --git a/src/exchange-lib/exchange_api_wire_deposits.c b/src/exchange-lib/exchange_api_wire_deposits.c index 281ae2097..406256025 100644 --- a/src/exchange-lib/exchange_api_wire_deposits.c +++ b/src/exchange-lib/exchange_api_wire_deposits.c @@ -24,6 +24,7 @@ #include #include /* just for HTTP status codes */ #include +#include #include "taler_exchange_service.h" #include "exchange_api_common.h" #include "exchange_api_json.h" diff --git a/src/exchange-lib/test-exchange-home/sepa.json b/src/exchange-lib/test-exchange-home/sepa.json index 36d12f661..92ca25566 100644 --- a/src/exchange-lib/test-exchange-home/sepa.json +++ b/src/exchange-lib/test-exchange-home/sepa.json @@ -1,6 +1,9 @@ { - "receiver_name": "Max Mustermann", - "iban": "DE89370400440532013000", + "type": "sepa", "bic": "COBADEFF370", - "sig": "8M5YJXM68PRAXKH76HYEBCJW657B23JA0RFGNDMZK2379YZMT626H1BN89KC0M1KJBWGYEN5Z763Q0Y7MCTZQ6BPPT7D9KFCTW60C10" + "address": "Musterstadt", + "iban": "DE89370400440532013000", + "receiver_name": "Max Musterman", + "salt": "J5AP2BJ8MQAM1WQYQ9YPTAHZVTDXCT3RKHX851S5Q2A42T11K796MNMKJ78VBGDKCFMETMBDPM35D81NCCN77YRW92GDFSQ6P4CZ720", + "sig": "FF4JZ1FPNVEFPM6ZXD3QN1M225T9X912PX1GJDWGGJX6KBSTR2EZHK24E1PYW7P64YGGQG7Q9HJW0XE36HBBYZWXW83PKVZEYNVG038" } \ No newline at end of file diff --git a/src/exchange-lib/test_exchange_api.c b/src/exchange-lib/test_exchange_api.c index 890e80756..fc0945d62 100644 --- a/src/exchange-lib/test_exchange_api.c +++ b/src/exchange-lib/test_exchange_api.c @@ -23,6 +23,7 @@ #include "taler_util.h" #include "taler_signatures.h" #include "taler_exchange_service.h" +#include "taler_json_lib.h" #include #include @@ -1502,7 +1503,7 @@ interpreter_run (void *cls, return; } execution_date = GNUNET_TIME_absolute_get (); - TALER_round_abs_time (&execution_date); + GNUNET_TIME_round_abs (&execution_date); cmd->details.admin_add_incoming.aih = TALER_EXCHANGE_admin_add_incoming (exchange, &reserve_pub, @@ -1664,7 +1665,7 @@ interpreter_run (void *cls, fail (is); return; } - TALER_hash_json (contract, + TALER_JSON_hash (contract, &h_contract); wire = json_loads (cmd->details.deposit.wire_details, JSON_REJECT_DUPLICATES, @@ -1698,7 +1699,7 @@ interpreter_run (void *cls, wire_deadline = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_DAYS); timestamp = GNUNET_TIME_absolute_get (); - TALER_round_abs_time (×tamp); + GNUNET_TIME_round_abs (×tamp); { struct TALER_DepositRequestPS dr; @@ -1706,7 +1707,7 @@ interpreter_run (void *cls, dr.purpose.size = htonl (sizeof (struct TALER_DepositRequestPS)); dr.purpose.purpose = htonl (TALER_SIGNATURE_WALLET_COIN_DEPOSIT); dr.h_contract = h_contract; - TALER_hash_json (wire, + TALER_JSON_hash (wire, &dr.h_wire); dr.timestamp = GNUNET_TIME_absolute_hton (timestamp); dr.refund_deadline = GNUNET_TIME_absolute_hton (refund_deadline); @@ -1964,14 +1965,14 @@ interpreter_run (void *cls, JSON_REJECT_DUPLICATES, NULL); GNUNET_assert (NULL != wire); - TALER_hash_json (wire, + TALER_JSON_hash (wire, &h_wire); json_decref (wire); contract = json_loads (ref->details.deposit.contract, JSON_REJECT_DUPLICATES, NULL); GNUNET_assert (NULL != contract); - TALER_hash_json (contract, + TALER_JSON_hash (contract, &h_contract); json_decref (contract); cmd->details.deposit_wtid.dwh @@ -2349,7 +2350,7 @@ run (void *cls, { .oc = OC_ADMIN_ADD_INCOMING, .label = "create-reserve-1", .expected_response_code = MHD_HTTP_OK, - .details.admin_add_incoming.wire = "{ \"type\":\"TEST\", \"bank\":\"source bank\", \"account_number\":42 }", + .details.admin_add_incoming.wire = "{ \"type\":\"test\", \"bank\":\"source bank\", \"account_number\":42 }", .details.admin_add_incoming.amount = "EUR:5.01" }, /* Withdraw a 5 EUR coin, at fee of 1 ct */ { .oc = OC_WITHDRAW_SIGN, @@ -2370,7 +2371,7 @@ run (void *cls, .expected_response_code = MHD_HTTP_OK, .details.deposit.amount = "EUR:5", .details.deposit.coin_ref = "withdraw-coin-1", - .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account_number\":42 }", + .details.deposit.wire_details = "{ \"type\":\"test\", \"bank\":\"dest bank\", \"account_number\":42 }", .details.deposit.contract = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":1 } ] }", .details.deposit.transaction_id = 1 }, @@ -2387,7 +2388,7 @@ run (void *cls, .expected_response_code = MHD_HTTP_FORBIDDEN, .details.deposit.amount = "EUR:5", .details.deposit.coin_ref = "withdraw-coin-1", - .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account_number\":43 }", + .details.deposit.wire_details = "{ \"type\":\"test\", \"bank\":\"dest bank\", \"account_number\":43 }", .details.deposit.contract = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":1 } ] }", .details.deposit.transaction_id = 1 }, /* Try to double-spend the 5 EUR coin at the same merchant (but different @@ -2397,7 +2398,7 @@ run (void *cls, .expected_response_code = MHD_HTTP_FORBIDDEN, .details.deposit.amount = "EUR:5", .details.deposit.coin_ref = "withdraw-coin-1", - .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account_number\":42 }", + .details.deposit.wire_details = "{ \"type\":\"test\", \"bank\":\"dest bank\", \"account_number\":42 }", .details.deposit.contract = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":1 } ] }", .details.deposit.transaction_id = 2 }, /* Try to double-spend the 5 EUR coin at the same merchant (but different @@ -2407,7 +2408,7 @@ run (void *cls, .expected_response_code = MHD_HTTP_FORBIDDEN, .details.deposit.amount = "EUR:5", .details.deposit.coin_ref = "withdraw-coin-1", - .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account_number\":42 }", + .details.deposit.wire_details = "{ \"type\":\"test\", \"bank\":\"dest bank\", \"account_number\":42 }", .details.deposit.contract = "{ \"items\":[{ \"name\":\"ice cream\", \"value\":2 } ] }", .details.deposit.transaction_id = 1 }, @@ -2417,7 +2418,7 @@ run (void *cls, { .oc = OC_ADMIN_ADD_INCOMING, .label = "refresh-create-reserve-1", .expected_response_code = MHD_HTTP_OK, - .details.admin_add_incoming.wire = "{ \"type\":\"TEST\", \"bank\":\"source bank\", \"account_number\":424 }", + .details.admin_add_incoming.wire = "{ \"type\":\"test\", \"bank\":\"source bank\", \"account_number\":424 }", .details.admin_add_incoming.amount = "EUR:5.01" }, /* Withdraw a 5 EUR coin, at fee of 1 ct */ { .oc = OC_WITHDRAW_SIGN, @@ -2432,7 +2433,7 @@ run (void *cls, .expected_response_code = MHD_HTTP_OK, .details.deposit.amount = "EUR:1", .details.deposit.coin_ref = "refresh-withdraw-coin-1", - .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account_number\":42 }", + .details.deposit.wire_details = "{ \"type\":\"test\", \"bank\":\"dest bank\", \"account_number\":42 }", .details.deposit.contract = "{ \"items\" : [ { \"name\":\"ice cream\", \"value\":\"EUR:1\" } ] }", .details.deposit.transaction_id = 42421 }, diff --git a/src/exchange-tools/Makefile.am b/src/exchange-tools/Makefile.am index 4ffabd15d..fda9cefa3 100644 --- a/src/exchange-tools/Makefile.am +++ b/src/exchange-tools/Makefile.am @@ -38,7 +38,9 @@ taler_exchange_sepa_SOURCES = \ taler_exchange_sepa_LDADD = \ $(LIBGCRYPT_LIBS) \ $(top_builddir)/src/util/libtalerutil.la \ - -lgnunetutil -ljansson $(XLIB) + -lgnunetjson \ + -lgnunetutil \ + -ljansson $(XLIB) taler_exchange_sepa_LDFLAGS = $(POSTGRESQL_LDFLAGS) taler_exchange_keycheck_SOURCES = \ diff --git a/src/exchange-tools/taler-exchange-keyup.c b/src/exchange-tools/taler-exchange-keyup.c index 779e3a3d3..861a9a7c8 100644 --- a/src/exchange-tools/taler-exchange-keyup.c +++ b/src/exchange-tools/taler-exchange-keyup.c @@ -518,7 +518,7 @@ exchange_keys_update_signkeys () "must be longer than signkey_duration"); return GNUNET_SYSERR; } - TALER_round_rel_time (&signkey_duration); + GNUNET_TIME_round_rel (&signkey_duration); GNUNET_asprintf (&signkey_dir, "%s" DIR_SEPARATOR_STR TALER_EXCHANGEDB_DIR_SIGNING_KEYS, exchange_directory); @@ -600,7 +600,7 @@ get_cointype_params (const char *ct, "duration_withdraw"); return GNUNET_SYSERR; } - TALER_round_rel_time (¶ms->duration_withdraw); + GNUNET_TIME_round_rel (¶ms->duration_withdraw); if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_time (kcfg, ct, @@ -612,7 +612,7 @@ get_cointype_params (const char *ct, "duration_spend"); return GNUNET_SYSERR; } - TALER_round_rel_time (¶ms->duration_spend); + GNUNET_TIME_round_rel (¶ms->duration_spend); if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_time (kcfg, ct, @@ -624,7 +624,7 @@ get_cointype_params (const char *ct, "duration_legal"); return GNUNET_SYSERR; } - TALER_round_rel_time (¶ms->duration_legal); + GNUNET_TIME_round_rel (¶ms->duration_legal); if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_time (kcfg, ct, @@ -636,7 +636,7 @@ get_cointype_params (const char *ct, "exchange_denom_duration_overlap"); return GNUNET_SYSERR; } - TALER_round_rel_time (¶ms->duration_overlap); + GNUNET_TIME_round_rel (¶ms->duration_overlap); if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (kcfg, ct, @@ -927,7 +927,7 @@ main (int argc, { now = GNUNET_TIME_absolute_get (); } - TALER_round_abs_time (&now); + GNUNET_TIME_round_abs (&now); kcfg = TALER_config_load (exchange_directory); if (NULL == kcfg) @@ -1017,7 +1017,7 @@ main (int argc, _("must not be zero")); return GNUNET_SYSERR; } - TALER_round_rel_time (&lookahead_sign); + GNUNET_TIME_round_rel (&lookahead_sign); lookahead_sign_stamp = GNUNET_TIME_absolute_add (now, lookahead_sign); diff --git a/src/exchange-tools/taler-exchange-sepa.c b/src/exchange-tools/taler-exchange-sepa.c index a3ac95436..1bfb49132 100644 --- a/src/exchange-tools/taler-exchange-sepa.c +++ b/src/exchange-tools/taler-exchange-sepa.c @@ -20,6 +20,7 @@ */ #include #include +#include #include "taler_crypto_lib.h" #include "taler_signatures.h" @@ -34,6 +35,11 @@ static char *masterkeyfile; */ static char *sepa_name; +/** + * Account holder address. + */ +static char *sepa_address; + /** * IBAN number. */ @@ -63,6 +69,9 @@ main (int argc, char *const *argv) { static const struct GNUNET_GETOPT_CommandLineOption options[] = { + {'a', "address", "ADDRESS", + "account holder address", 1, + &GNUNET_GETOPT_set_string, &sepa_address}, {'b', "bic", "BICCODE", "bank BIC code", 1, &GNUNET_GETOPT_set_string, &bic}, @@ -88,6 +97,7 @@ main (int argc, struct GNUNET_HashContext *hc; json_t *reply; char *json_str; + struct GNUNET_HashCode salt; GNUNET_assert (GNUNET_OK == GNUNET_log_setup ("taler-exchange-sepa", @@ -112,8 +122,20 @@ main (int argc, masterkeyfile); return 1; } + if ( (NULL == sepa_address) || + (NULL == iban) || + (NULL == sepa_name) || + (NULL == bic) ) + { + fprintf (stderr, + "Required arguments missing\n"); + return 1; + } /* Compute message to sign */ + GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE, + &salt, + sizeof (salt)); hc = GNUNET_CRYPTO_hash_context_start (); GNUNET_CRYPTO_hash_context_read (hc, sepa_name, @@ -132,27 +154,31 @@ main (int argc, &wsd.purpose, &sig.eddsa_signature); GNUNET_free (eddsa_priv); - + /* build JSON message */ - reply = json_pack ("{s:s, s:s, s:s, s:o}", + reply = json_pack ("{s:s, s:s, s:s, s:s, s:s, s:o, s:o}", + "type", "sepa", + "address", sepa_address, "receiver_name", sepa_name, "iban", iban, "bic", bic, - "sig", TALER_json_from_data (&sig, - sizeof (sig))); + "salt", GNUNET_JSON_from_data (&salt, + sizeof (salt)), + "sig", GNUNET_JSON_from_data (&sig, + sizeof (sig))); GNUNET_assert (NULL != reply); /* dump result to stdout */ json_str = json_dumps (reply, JSON_INDENT(2)); GNUNET_assert (NULL != json_str); - + if (NULL != output_filename) { fclose (stdout); stdout = fopen (output_filename, "w+"); } - fprintf (stdout, + fprintf (stdout, "%s", json_str); fflush (stdout); diff --git a/src/exchange/Makefile.am b/src/exchange/Makefile.am index 443ac511a..e29a51bbb 100644 --- a/src/exchange/Makefile.am +++ b/src/exchange/Makefile.am @@ -14,6 +14,7 @@ taler_exchange_aggregator_SOURCES = \ taler-exchange-aggregator.c taler_exchange_aggregator_LDADD = \ $(LIBGCRYPT_LIBS) \ + $(top_builddir)/src/json/libtalerjson.la \ $(top_builddir)/src/util/libtalerutil.la \ $(top_builddir)/src/wire/libtalerwire.la \ $(top_builddir)/src/exchangedb/libtalerexchangedb.la \ @@ -36,11 +37,13 @@ taler_exchange_httpd_SOURCES = \ taler-exchange-httpd_validation.c taler-exchange-httpd_validation.h taler_exchange_httpd_LDADD = \ $(LIBGCRYPT_LIBS) \ + $(top_builddir)/src/json/libtalerjson.la \ $(top_builddir)/src/util/libtalerutil.la \ $(top_builddir)/src/exchangedb/libtalerexchangedb.la \ -lmicrohttpd \ - -ljansson \ -lgnunetutil \ + -lgnunetjson \ + -ljansson \ -lpthread if HAVE_DEVELOPER diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c index 3ffce1d3f..e399a422e 100644 --- a/src/exchange/taler-exchange-aggregator.c +++ b/src/exchange/taler-exchange-aggregator.c @@ -29,6 +29,7 @@ #include #include "taler_exchangedb_lib.h" #include "taler_exchangedb_plugin.h" +#include "taler_json_lib.h" #include "taler_wire_lib.h" /** @@ -277,7 +278,7 @@ deposit_cb (void *cls, au->row_id = row_id; au->wire = (json_t *) wire; au->execution_time = GNUNET_TIME_absolute_get (); - TALER_hash_json (au->wire, + TALER_JSON_hash (au->wire, &au->h_wire); json_incref (au->wire); GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE, diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index c16e26409..877876dbb 100644 --- a/src/exchange/taler-exchange-httpd.c +++ b/src/exchange/taler-exchange-httpd.c @@ -65,7 +65,7 @@ struct GNUNET_CONFIGURATION_Handle *cfg; * Master public key (according to the * configuration in the exchange directory). */ -struct GNUNET_CRYPTO_EddsaPublicKey TMH_master_public_key; +struct TALER_MasterPublicKeyP TMH_master_public_key; /** * Our DB plugin. @@ -424,7 +424,7 @@ exchange_serve_process_config (const char *exchange_directory) if (GNUNET_OK != GNUNET_CRYPTO_eddsa_public_key_from_string (TMH_master_public_key_str, strlen (TMH_master_public_key_str), - &TMH_master_public_key)) + &TMH_master_public_key.eddsa_pub)) { fprintf (stderr, "Invalid master public key given in exchange configuration."); diff --git a/src/exchange/taler-exchange-httpd.h b/src/exchange/taler-exchange-httpd.h index 5f17eac5b..236df9e19 100644 --- a/src/exchange/taler-exchange-httpd.h +++ b/src/exchange/taler-exchange-httpd.h @@ -57,7 +57,7 @@ extern char *TMH_exchange_directory; * Master public key (according to the * configuration in the exchange directory). */ -extern struct GNUNET_CRYPTO_EddsaPublicKey TMH_master_public_key; +extern struct TALER_MasterPublicKeyP TMH_master_public_key; /** * Private key of the exchange we use to sign messages. diff --git a/src/exchange/taler-exchange-httpd_db.c b/src/exchange/taler-exchange-httpd_db.c index 9d04efa9b..e96653a63 100644 --- a/src/exchange/taler-exchange-httpd_db.c +++ b/src/exchange/taler-exchange-httpd_db.c @@ -21,6 +21,8 @@ #include "platform.h" #include #include +#include +#include "taler_json_lib.h" #include "taler-exchange-httpd_responses.h" #include "taler-exchange-httpd_keystate.h" @@ -1673,12 +1675,12 @@ handle_transaction_data (void *cls, is also ugly if we ever add signatures over this data. (#4135) */ json_array_append (ctx->deposits, json_pack ("{s:o, s:o, s:o, s:I, s:o}", - "deposit_value", TALER_json_from_amount (deposit_value), - "deposit_fee", TALER_json_from_amount (deposit_fee), - "H_contract", TALER_json_from_data (h_contract, + "deposit_value", TALER_JSON_from_amount (deposit_value), + "deposit_fee", TALER_JSON_from_amount (deposit_fee), + "H_contract", GNUNET_JSON_from_data (h_contract, sizeof (struct GNUNET_HashCode)), "transaction_id", (json_int_t) transaction_id, - "coin_pub", TALER_json_from_data (coin_pub, + "coin_pub", GNUNET_JSON_from_data (coin_pub, sizeof (struct TALER_CoinSpendPublicKeyP)))); } diff --git a/src/exchange/taler-exchange-httpd_deposit.c b/src/exchange/taler-exchange-httpd_deposit.c index 629d6f8b5..82dcf1a55 100644 --- a/src/exchange/taler-exchange-httpd_deposit.c +++ b/src/exchange/taler-exchange-httpd_deposit.c @@ -27,9 +27,11 @@ */ #include "platform.h" #include +#include #include #include #include +#include "taler_json_lib.h" #include "taler-exchange-httpd_parsing.h" #include "taler-exchange-httpd_deposit.h" #include "taler-exchange-httpd_responses.h" @@ -170,7 +172,7 @@ parse_and_handle_deposit_request (struct MHD_Connection *connection, "wire"); } if (GNUNET_OK != - TALER_hash_json (wire, + TALER_JSON_hash (wire, &my_h_wire)) { TALER_LOG_WARNING ("Failed to parse JSON wire format specification for /deposit request\n"); diff --git a/src/exchange/taler-exchange-httpd_keystate.c b/src/exchange/taler-exchange-httpd_keystate.c index e278882fe..bf91b8183 100644 --- a/src/exchange/taler-exchange-httpd_keystate.c +++ b/src/exchange/taler-exchange-httpd_keystate.c @@ -22,6 +22,7 @@ */ #include "platform.h" #include +#include "taler_json_lib.h" #include "taler-exchange-httpd_keystate.h" #include "taler-exchange-httpd_responses.h" #include "taler_exchangedb_plugin.h" @@ -144,26 +145,26 @@ denom_key_issue_to_json (const struct TALER_DenominationPublicKey *pk, return json_pack ("{s:o, s:o, s:o, s:o, s:o, s:o, s:o, s:o, s:o, s:o}", "master_sig", - TALER_json_from_data (&dki->signature, + GNUNET_JSON_from_data (&dki->signature, sizeof (struct GNUNET_CRYPTO_EddsaSignature)), "stamp_start", - TALER_json_from_abs (GNUNET_TIME_absolute_ntoh (dki->properties.start)), + GNUNET_JSON_from_time_abs (GNUNET_TIME_absolute_ntoh (dki->properties.start)), "stamp_expire_withdraw", - TALER_json_from_abs (GNUNET_TIME_absolute_ntoh (dki->properties.expire_withdraw)), + GNUNET_JSON_from_time_abs (GNUNET_TIME_absolute_ntoh (dki->properties.expire_withdraw)), "stamp_expire_deposit", - TALER_json_from_abs (GNUNET_TIME_absolute_ntoh (dki->properties.expire_spend)), + GNUNET_JSON_from_time_abs (GNUNET_TIME_absolute_ntoh (dki->properties.expire_spend)), "stamp_expire_legal", - TALER_json_from_abs (GNUNET_TIME_absolute_ntoh (dki->properties.expire_legal)), + GNUNET_JSON_from_time_abs (GNUNET_TIME_absolute_ntoh (dki->properties.expire_legal)), "denom_pub", - TALER_json_from_rsa_public_key (pk->rsa_public_key), + GNUNET_JSON_from_rsa_public_key (pk->rsa_public_key), "value", - TALER_json_from_amount (&value), + TALER_JSON_from_amount (&value), "fee_withdraw", - TALER_json_from_amount (&fee_withdraw), + TALER_JSON_from_amount (&fee_withdraw), "fee_deposit", - TALER_json_from_amount (&fee_deposit), + TALER_JSON_from_amount (&fee_deposit), "fee_refresh", - TALER_json_from_amount (&fee_refresh)); + TALER_JSON_from_amount (&fee_refresh)); } @@ -342,19 +343,19 @@ sign_key_issue_to_json (const struct TALER_ExchangeSigningKeyValidityPS *ski) return json_pack ("{s:o, s:o, s:o, s:o, s:o, s:o}", "stamp_start", - TALER_json_from_abs (GNUNET_TIME_absolute_ntoh (ski->start)), + GNUNET_JSON_from_time_abs (GNUNET_TIME_absolute_ntoh (ski->start)), "stamp_expire", - TALER_json_from_abs (GNUNET_TIME_absolute_ntoh (ski->expire)), + GNUNET_JSON_from_time_abs (GNUNET_TIME_absolute_ntoh (ski->expire)), "stamp_end", - TALER_json_from_abs (GNUNET_TIME_absolute_ntoh (ski->end)), + GNUNET_JSON_from_time_abs (GNUNET_TIME_absolute_ntoh (ski->end)), "master_pub", - TALER_json_from_data (&ski->master_public_key, + GNUNET_JSON_from_data (&ski->master_public_key, sizeof (struct TALER_MasterPublicKeyP)), "master_sig", - TALER_json_from_data (&ski->signature, + GNUNET_JSON_from_data (&ski->signature, sizeof (struct TALER_MasterSignatureP)), "key", - TALER_json_from_data (&ski->signkey_pub, + GNUNET_JSON_from_data (&ski->signkey_pub, sizeof (struct TALER_ExchangePublicKeyP))); } @@ -437,16 +438,16 @@ auditor_to_json (const struct TALER_AuditorPublicKeyP *apub, json_array_append_new (ja, json_pack ("{s:o, s:o}", "denom_pub_h", - TALER_json_from_data (&dki[i]->denom_hash, + GNUNET_JSON_from_data (&dki[i]->denom_hash, sizeof (struct GNUNET_HashCode)), "auditor_sig", - TALER_json_from_data (asigs[i], + GNUNET_JSON_from_data (asigs[i], sizeof (struct TALER_AuditorSignatureP)))); return json_pack ("{s:o, s:o}", "denomination_keys", ja, "auditor_pub", - TALER_json_from_data (apub, + GNUNET_JSON_from_data (apub, sizeof (struct TALER_AuditorPublicKeyP))); } @@ -633,7 +634,7 @@ TMH_KS_acquire_ (const char *location) key_state->denomkey_map = GNUNET_CONTAINER_multihashmap_create (32, GNUNET_NO); key_state->reload_time = GNUNET_TIME_absolute_get (); - TALER_round_abs_time (&key_state->reload_time); + GNUNET_TIME_round_abs (&key_state->reload_time); GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Loading keys from `%s'\n", TMH_exchange_directory); @@ -663,15 +664,15 @@ TMH_KS_acquire_ (const char *location) keys = json_pack ("{s:o, s:o, s:o, s:o, s:o, s:o, s:o}", "master_public_key", - TALER_json_from_data (&TMH_master_public_key, + GNUNET_JSON_from_data (&TMH_master_public_key, sizeof (struct GNUNET_CRYPTO_EddsaPublicKey)), "signkeys", key_state->sign_keys_array, "denoms", key_state->denom_keys_array, "auditors", key_state->auditors_array, - "list_issue_date", TALER_json_from_abs (key_state->reload_time), - "eddsa_pub", TALER_json_from_data (&key_state->current_sign_key_issue.issue.signkey_pub, + "list_issue_date", GNUNET_JSON_from_time_abs (key_state->reload_time), + "eddsa_pub", GNUNET_JSON_from_data (&key_state->current_sign_key_issue.issue.signkey_pub, sizeof (struct TALER_ExchangePublicKeyP)), - "eddsa_sig", TALER_json_from_data (&sig, + "eddsa_sig", GNUNET_JSON_from_data (&sig, sizeof (struct TALER_ExchangeSignatureP))); key_state->auditors_array = NULL; key_state->sign_keys_array = NULL; diff --git a/src/exchange/taler-exchange-httpd_parsing.c b/src/exchange/taler-exchange-httpd_parsing.c index 25539aeb7..3fd69ae50 100644 --- a/src/exchange/taler-exchange-httpd_parsing.c +++ b/src/exchange/taler-exchange-httpd_parsing.c @@ -24,6 +24,7 @@ #include "platform.h" #include +#include "taler_json_lib.h" #include "taler-exchange-httpd_parsing.h" #include "taler-exchange-httpd_responses.h" @@ -786,10 +787,15 @@ TMH_PARSE_navigate_json (struct MHD_Connection *connection, case TMH_PARSE_JNC_RET_AMOUNT: { struct TALER_Amount *where = va_arg (argp, void *); + struct GNUNET_JSON_Specification spec[] = { + TALER_JSON_spec_amount (NULL, where), + GNUNET_JSON_spec_end () + }; if (GNUNET_OK != - TALER_json_to_amount ((json_t *) root, - where)) + GNUNET_JSON_parse ((json_t *) root, + spec, + NULL, NULL)) { GNUNET_break_op (0); ret = (MHD_YES != @@ -823,10 +829,15 @@ TMH_PARSE_navigate_json (struct MHD_Connection *connection, case TMH_PARSE_JNC_RET_TIME_ABSOLUTE: { struct GNUNET_TIME_Absolute *where = va_arg (argp, void *); + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_absolute_time (NULL, where), + GNUNET_JSON_spec_end () + }; if (GNUNET_OK != - TALER_json_to_abs ((json_t *) root, - where)) + GNUNET_JSON_parse ((json_t *) root, + spec, + NULL, NULL)) { GNUNET_break_op (0); ret = (MHD_YES != diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c index d6cf81bb7..a47b29cae 100644 --- a/src/exchange/taler-exchange-httpd_responses.c +++ b/src/exchange/taler-exchange-httpd_responses.c @@ -25,7 +25,7 @@ #include "platform.h" #include "taler-exchange-httpd_responses.h" #include "taler_util.h" -#include +#include "taler_json_lib.h" #include "taler-exchange-httpd_keystate.h" @@ -388,9 +388,9 @@ TMH_RESPONSE_reply_deposit_success (struct MHD_Connection *connection, MHD_HTTP_OK, "{s:s, s:o, s:o}", "status", "DEPOSIT_OK", - "sig", TALER_json_from_data (&sig, + "sig", GNUNET_JSON_from_data (&sig, sizeof (sig)), - "pub", TALER_json_from_data (&pub, + "pub", GNUNET_JSON_from_data (&pub, sizeof (pub))); } @@ -449,7 +449,7 @@ compile_transaction_history (const struct TALER_EXCHANGEDB_TransactionList *tl) return NULL; } - details = TALER_json_from_data (&dr.purpose, + details = GNUNET_JSON_from_data (&dr.purpose, sizeof (struct TALER_DepositRequestPS)); break; } @@ -481,7 +481,7 @@ compile_transaction_history (const struct TALER_EXCHANGEDB_TransactionList *tl) return NULL; } - details = TALER_json_from_data (&ms.purpose, + details = GNUNET_JSON_from_data (&ms.purpose, sizeof (struct TALER_RefreshMeltCoinAffirmationPS)); } break; @@ -491,8 +491,8 @@ compile_transaction_history (const struct TALER_EXCHANGEDB_TransactionList *tl) json_array_append_new (history, json_pack ("{s:s, s:o, s:o, s:o}", "type", type, - "amount", TALER_json_from_amount (&value), - "signature", TALER_json_from_data (sig, + "amount", TALER_JSON_from_amount (&value), + "signature", GNUNET_JSON_from_data (sig, sizeof (struct TALER_CoinSpendSignatureP)), "details", details)); } @@ -569,7 +569,7 @@ compile_reserve_history (const struct TALER_EXCHANGEDB_ReserveHistory *rh, json_pack ("{s:s, s:O, s:o}", "type", "DEPOSIT", "wire", pos->details.bank->wire, - "amount", TALER_json_from_amount (&pos->details.bank->amount))); + "amount", TALER_JSON_from_amount (&pos->details.bank->amount))); break; case TALER_EXCHANGEDB_RO_WITHDRAW_COIN: break; @@ -614,11 +614,11 @@ compile_reserve_history (const struct TALER_EXCHANGEDB_ReserveHistory *rh, json_array_append_new (json_history, json_pack ("{s:s, s:o, s:o, s:o}", "type", "WITHDRAW", - "signature", TALER_json_from_data (&pos->details.withdraw->reserve_sig, + "signature", GNUNET_JSON_from_data (&pos->details.withdraw->reserve_sig, sizeof (struct TALER_ReserveSignatureP)), - "details", TALER_json_from_data (&wr, + "details", GNUNET_JSON_from_data (&wr, sizeof (wr)), - "amount", TALER_json_from_amount (&value))); + "amount", TALER_JSON_from_amount (&value))); break; } } @@ -662,7 +662,7 @@ TMH_RESPONSE_reply_reserve_status_success (struct MHD_Connection *connection, if (NULL == json_history) return TMH_RESPONSE_reply_internal_error (connection, "balance calculation failure"); - json_balance = TALER_json_from_amount (&balance); + json_balance = TALER_JSON_from_amount (&balance); return TMH_RESPONSE_reply_json_pack (connection, MHD_HTTP_OK, "{s:o, s:o}", @@ -693,7 +693,7 @@ TMH_RESPONSE_reply_reserve_withdraw_insufficient_funds (struct MHD_Connection *c if (NULL == json_history) return TMH_RESPONSE_reply_internal_error (connection, "balance calculation failure"); - json_balance = TALER_json_from_amount (&balance); + json_balance = TALER_JSON_from_amount (&balance); return TMH_RESPONSE_reply_json_pack (connection, MHD_HTTP_PAYMENT_REQUIRED, "{s:s, s:o, s:o}", @@ -716,7 +716,7 @@ TMH_RESPONSE_reply_reserve_withdraw_success (struct MHD_Connection *connection, { json_t *sig_json; - sig_json = TALER_json_from_rsa_signature (collectable->sig.rsa_signature); + sig_json = GNUNET_JSON_from_rsa_signature (collectable->sig.rsa_signature); return TMH_RESPONSE_reply_json_pack (connection, MHD_HTTP_OK, "{s:o}", @@ -758,14 +758,14 @@ TMH_RESPONSE_reply_refresh_melt_insufficient_funds (struct MHD_Connection *conne "error", "insufficient funds", "coin_pub", - TALER_json_from_data (coin_pub, + GNUNET_JSON_from_data (coin_pub, sizeof (struct TALER_CoinSpendPublicKeyP)), "original_value", - TALER_json_from_amount (&coin_value), + TALER_JSON_from_amount (&coin_value), "residual_value", - TALER_json_from_amount (&residual), + TALER_JSON_from_amount (&residual), "requested_value", - TALER_json_from_amount (&requested), + TALER_JSON_from_amount (&requested), "history", history); } @@ -797,7 +797,7 @@ TMH_RESPONSE_reply_refresh_melt_success (struct MHD_Connection *connection, TMH_KS_sign (&body.purpose, &pub, &sig); - sig_json = TALER_json_from_data (&sig, + sig_json = GNUNET_JSON_from_data (&sig, sizeof (sig)); GNUNET_assert (NULL != sig_json); return TMH_RESPONSE_reply_json_pack (connection, @@ -805,7 +805,7 @@ TMH_RESPONSE_reply_refresh_melt_success (struct MHD_Connection *connection, "{s:i, s:o, s:o}", "noreveal_index", (int) noreveal_index, "exchange_sig", sig_json, - "exchange_pub", TALER_json_from_data (&pub, + "exchange_pub", GNUNET_JSON_from_data (&pub, sizeof (pub))); } @@ -835,7 +835,7 @@ TMH_RESPONSE_reply_refresh_reveal_success (struct MHD_Connection *connection, obj = json_object (); json_object_set_new (obj, "ev_sig", - TALER_json_from_rsa_signature (sigs[newcoin_index].rsa_signature)); + GNUNET_JSON_from_rsa_signature (sigs[newcoin_index].rsa_signature)); json_array_append_new (list, obj); } @@ -889,18 +889,18 @@ TMH_RESPONSE_reply_refresh_reveal_missmatch (struct MHD_Connection *connection, rm_json = json_object (); json_object_set_new (rm_json, "coin_sig", - TALER_json_from_data (&rm->coin_sig, + GNUNET_JSON_from_data (&rm->coin_sig, sizeof (struct TALER_CoinSpendSignatureP))); json_object_set_new (rm_json, "coin_pub", - TALER_json_from_data (&rm->coin.coin_pub, + GNUNET_JSON_from_data (&rm->coin.coin_pub, sizeof (struct TALER_CoinSpendPublicKeyP))); json_object_set_new (rm_json, "melt_amount_with_fee", - TALER_json_from_amount (&rm->amount_with_fee)); + TALER_JSON_from_amount (&rm->amount_with_fee)); json_object_set_new (rm_json, "melt_fee", - TALER_json_from_amount (&rm->melt_fee)); + TALER_JSON_from_amount (&rm->melt_fee)); json_array_append_new (info_old, rm_json); } @@ -911,7 +911,7 @@ TMH_RESPONSE_reply_refresh_reveal_missmatch (struct MHD_Connection *connection, pk = &mc->denom_pubs[i]; json_array_append_new (info_new, - TALER_json_from_rsa_public_key (pk->rsa_public_key)); + GNUNET_JSON_from_rsa_public_key (pk->rsa_public_key)); } info_commit = json_array (); @@ -931,15 +931,15 @@ TMH_RESPONSE_reply_refresh_reveal_missmatch (struct MHD_Connection *connection, cc_json = json_object (); json_object_set_new (cc_json, "coin_ev", - TALER_json_from_data (cc->coin_ev, + GNUNET_JSON_from_data (cc->coin_ev, cc->coin_ev_size)); json_object_set_new (cc_json, "coin_priv_enc", - TALER_json_from_data (cc->refresh_link->coin_priv_enc, + GNUNET_JSON_from_data (cc->refresh_link->coin_priv_enc, sizeof (struct TALER_CoinSpendPrivateKeyP))); json_object_set_new (cc_json, "blinding_key_enc", - TALER_json_from_data (cc->refresh_link->blinding_key_enc, + GNUNET_JSON_from_data (cc->refresh_link->blinding_key_enc, cc->refresh_link->blinding_key_enc_size)); json_array_append_new (info_commit_k, @@ -957,11 +957,11 @@ TMH_RESPONSE_reply_refresh_reveal_missmatch (struct MHD_Connection *connection, cl_json = json_object (); json_object_set_new (cl_json, "transfer_pub", - TALER_json_from_data (&cl->transfer_pub, + GNUNET_JSON_from_data (&cl->transfer_pub, sizeof (struct TALER_TransferPublicKeyP))); json_object_set_new (cl_json, "shared_secret_enc", - TALER_json_from_data (&cl->shared_secret_enc, + GNUNET_JSON_from_data (&cl->shared_secret_enc, sizeof (struct TALER_EncryptedLinkSecretP))); json_array_append_new (info_link_k, cl_json); @@ -1015,15 +1015,15 @@ TMH_RESPONSE_reply_refresh_link_success (struct MHD_Connection *connection, obj = json_object (); json_object_set_new (obj, "link_enc", - TALER_json_from_data (pos->link_data_enc->coin_priv_enc, + GNUNET_JSON_from_data (pos->link_data_enc->coin_priv_enc, sizeof (struct TALER_CoinSpendPrivateKeyP) + pos->link_data_enc->blinding_key_enc_size)); json_object_set_new (obj, "denom_pub", - TALER_json_from_rsa_public_key (pos->denom_pub.rsa_public_key)); + GNUNET_JSON_from_rsa_public_key (pos->denom_pub.rsa_public_key)); json_object_set_new (obj, "ev_sig", - TALER_json_from_rsa_signature (pos->ev_sig.rsa_signature)); + GNUNET_JSON_from_rsa_signature (pos->ev_sig.rsa_signature)); json_array_append_new (list, obj); } @@ -1033,11 +1033,11 @@ TMH_RESPONSE_reply_refresh_link_success (struct MHD_Connection *connection, list); json_object_set_new (root, "transfer_pub", - TALER_json_from_data (&sessions[i].transfer_pub, + GNUNET_JSON_from_data (&sessions[i].transfer_pub, sizeof (struct TALER_TransferPublicKeyP))); json_object_set_new (root, "secret_enc", - TALER_json_from_data (&sessions[i].shared_secret_enc, + GNUNET_JSON_from_data (&sessions[i].shared_secret_enc, sizeof (struct TALER_EncryptedLinkSecretP))); json_array_append_new (mlist, root); @@ -1083,7 +1083,7 @@ TMH_RESPONSE_reply_deposit_pending (struct MHD_Connection *connection, return TMH_RESPONSE_reply_json_pack (connection, MHD_HTTP_ACCEPTED, "{s:o}", - "execution_time", TALER_json_from_abs (planned_exec_time)); + "execution_time", GNUNET_JSON_from_time_abs (planned_exec_time)); } @@ -1132,13 +1132,13 @@ TMH_RESPONSE_reply_deposit_wtid (struct MHD_Connection *connection, return TMH_RESPONSE_reply_json_pack (connection, MHD_HTTP_OK, "{s:o, s:o, s:o, s:o, s:o, s:o}", - "wtid", TALER_json_from_data (wtid, + "wtid", GNUNET_JSON_from_data (wtid, sizeof (*wtid)), - "execution_time", TALER_json_from_abs (exec_time), - "coin_contribution", TALER_json_from_amount (coin_contribution), - "exchange_sig", TALER_json_from_data (&sig, + "execution_time", GNUNET_JSON_from_time_abs (exec_time), + "coin_contribution", TALER_JSON_from_amount (coin_contribution), + "exchange_sig", GNUNET_JSON_from_data (&sig, sizeof (sig)), - "exchange_pub", TALER_json_from_data (&pub, + "exchange_pub", GNUNET_JSON_from_data (&pub, sizeof (pub))); } @@ -1165,10 +1165,10 @@ TMH_RESPONSE_reply_wire_deposit_details (struct MHD_Connection *connection, return TMH_RESPONSE_reply_json_pack (connection, MHD_HTTP_OK, "{s:o, s:o, s:o, s:o}", - "total", TALER_json_from_amount (total), - "merchant_pub", TALER_json_from_data (merchant_pub, + "total", TALER_JSON_from_amount (total), + "merchant_pub", GNUNET_JSON_from_data (merchant_pub, sizeof (struct TALER_MerchantPublicKeyP)), - "h_wire", TALER_json_from_data (h_wire, + "h_wire", GNUNET_JSON_from_data (h_wire, sizeof (struct GNUNET_HashCode)), "deposits", deposits); } diff --git a/src/exchange/taler-exchange-httpd_test.c b/src/exchange/taler-exchange-httpd_test.c index 876869d86..7b6438cae 100644 --- a/src/exchange/taler-exchange-httpd_test.c +++ b/src/exchange/taler-exchange-httpd_test.c @@ -21,6 +21,7 @@ */ #include "platform.h" #include +#include #include #include #include "taler_signatures.h" @@ -90,7 +91,7 @@ TMH_TEST_handler_test_base32 (struct TMH_RequestHandler *rh, MHD_HTTP_OK, "{s:o}", "output", - TALER_json_from_data (&hc, sizeof (struct GNUNET_HashCode))); + GNUNET_JSON_from_data (&hc, sizeof (struct GNUNET_HashCode))); } @@ -164,7 +165,7 @@ TMH_TEST_handler_test_encrypt (struct TMH_RequestHandler *rh, &skey, &iv, out)); - json = TALER_json_from_data (out, + json = GNUNET_JSON_from_data (out, in_ptr_size); GNUNET_free (out); TMH_PARSE_release_data (spec); @@ -231,7 +232,7 @@ TMH_TEST_handler_test_hkdf (struct TMH_RequestHandler *rh, in_ptr_size, NULL, 0); TMH_PARSE_release_data (spec); - json = TALER_json_from_data (&hc, + json = GNUNET_JSON_from_data (&hc, sizeof (struct GNUNET_HashCode)); return TMH_RESPONSE_reply_json_pack (connection, MHD_HTTP_OK, @@ -302,7 +303,7 @@ TMH_TEST_handler_test_ecdhe (struct TMH_RequestHandler *rh, MHD_HTTP_OK, "{s:o}", "ecdh_hash", - TALER_json_from_data (&hc, + GNUNET_JSON_from_data (&hc, sizeof (hc))); } @@ -387,10 +388,10 @@ TMH_TEST_handler_test_eddsa (struct TMH_RequestHandler *rh, MHD_HTTP_OK, "{s:o, s:o}", "eddsa_pub", - TALER_json_from_data (&pub, + GNUNET_JSON_from_data (&pub, sizeof (pub)), "eddsa_sig", - TALER_json_from_data (&sig, + GNUNET_JSON_from_data (&sig, sizeof (sig))); } @@ -435,7 +436,7 @@ TMH_TEST_handler_test_rsa_get (struct TMH_RequestHandler *rh, MHD_HTTP_OK, "{s:o}", "rsa_pub", - TALER_json_from_rsa_public_key (pub)); + GNUNET_JSON_from_rsa_public_key (pub)); GNUNET_CRYPTO_rsa_public_key_free (pub); return res; } @@ -509,7 +510,7 @@ TMH_TEST_handler_test_rsa_sign (struct TMH_RequestHandler *rh, MHD_HTTP_OK, "{s:o}", "rsa_blind_sig", - TALER_json_from_rsa_signature (sig)); + GNUNET_JSON_from_rsa_signature (sig)); GNUNET_CRYPTO_rsa_signature_free (sig); return res; } @@ -578,7 +579,7 @@ TMH_TEST_handler_test_transfer (struct TMH_RequestHandler *rh, MHD_HTTP_OK, "{s:o}", "secret", - TALER_json_from_data (&secret, + GNUNET_JSON_from_data (&secret, sizeof (secret))); } diff --git a/src/exchange/taler-exchange-httpd_validation.c b/src/exchange/taler-exchange-httpd_validation.c index 9132e3e02..b7e8a7f80 100644 --- a/src/exchange/taler-exchange-httpd_validation.c +++ b/src/exchange/taler-exchange-httpd_validation.c @@ -21,6 +21,7 @@ */ #include "platform.h" #include +#include "taler-exchange-httpd.h" #include "taler-exchange-httpd_validation.h" #include "taler_wire_plugin.h" @@ -172,7 +173,9 @@ TMH_json_validate_wireformat (const json_t *wire) for (p=wire_head; NULL != p; p = p->next) if (0 == strcasecmp (p->type, stype)) - return p->plugin->wire_validate (wire); + return p->plugin->wire_validate (p->plugin->cls, + wire, + &TMH_master_public_key); return GNUNET_NO; } diff --git a/src/exchange/taler-exchange-httpd_wire.c b/src/exchange/taler-exchange-httpd_wire.c index cec041762..1b3d3b541 100644 --- a/src/exchange/taler-exchange-httpd_wire.c +++ b/src/exchange/taler-exchange-httpd_wire.c @@ -19,6 +19,7 @@ * @author Christian Grothoff */ #include "platform.h" +#include #include "taler-exchange-httpd_keystate.h" #include "taler-exchange-httpd_responses.h" #include "taler-exchange-httpd_validation.h" @@ -57,9 +58,9 @@ TMH_WIRE_handler_wire (struct TMH_RequestHandler *rh, MHD_HTTP_OK, "{s:o, s:o, s:o}", "methods", methods, - "sig", TALER_json_from_data (&sig, + "sig", GNUNET_JSON_from_data (&sig, sizeof (sig)), - "pub", TALER_json_from_data (&pub, + "pub", GNUNET_JSON_from_data (&pub, sizeof (pub))); } diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index 566dec6f8..c3ecba968 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h @@ -22,6 +22,7 @@ #ifndef _TALER_EXCHANGE_SERVICE_H #define _TALER_EXCHANGE_SERVICE_H +#include #include "taler_util.h" /* ********************* event loop *********************** */ @@ -292,7 +293,7 @@ struct TALER_EXCHANGE_Keys */ typedef void (*TALER_EXCHANGE_CertificationCallback) (void *cls, - const struct TALER_EXCHANGE_Keys *keys); + const struct TALER_EXCHANGE_Keys *keys); /** @@ -319,10 +320,10 @@ struct TALER_EXCHANGE_Handle; */ struct TALER_EXCHANGE_Handle * TALER_EXCHANGE_connect (struct TALER_EXCHANGE_Context *ctx, - const char *url, - TALER_EXCHANGE_CertificationCallback cert_cb, - void *cert_cb_cls, - ...); + const char *url, + TALER_EXCHANGE_CertificationCallback cert_cb, + void *cert_cb_cls, + ...); /** @@ -354,7 +355,7 @@ TALER_EXCHANGE_get_keys (const struct TALER_EXCHANGE_Handle *exchange); */ int TALER_EXCHANGE_test_signing_key (const struct TALER_EXCHANGE_Keys *keys, - const struct TALER_ExchangePublicKeyP *pub); + const struct TALER_ExchangePublicKeyP *pub); /** @@ -367,7 +368,7 @@ TALER_EXCHANGE_test_signing_key (const struct TALER_EXCHANGE_Keys *keys, */ const struct TALER_EXCHANGE_DenomPublicKey * TALER_EXCHANGE_get_denomination_key (const struct TALER_EXCHANGE_Keys *keys, - const struct TALER_DenominationPublicKey *pk); + const struct TALER_DenominationPublicKey *pk); /** @@ -379,7 +380,7 @@ TALER_EXCHANGE_get_denomination_key (const struct TALER_EXCHANGE_Keys *keys, */ const struct TALER_EXCHANGE_DenomPublicKey * TALER_EXCHANGE_get_denomination_key_by_hash (const struct TALER_EXCHANGE_Keys *keys, - const struct GNUNET_HashCode *hc); + const struct GNUNET_HashCode *hc); /* ********************* /wire *********************** */ @@ -423,9 +424,9 @@ struct TALER_EXCHANGE_WireHandle; */ typedef void (*TALER_EXCHANGE_WireResultCallback) (void *cls, - unsigned int http_status, - const char *method, - json_t *obj); + unsigned int http_status, + const char *method, + json_t *obj); /** diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index aecb050a7..f45014463 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -22,6 +22,7 @@ #ifndef TALER_EXCHANGEDB_PLUGIN_H #define TALER_EXCHANGEDB_PLUGIN_H +#include #include #include "taler_exchangedb_lib.h" diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h index d9fa05188..aee151b97 100644 --- a/src/include/taler_json_lib.h +++ b/src/include/taler_json_lib.h @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014, 2015 GNUnet e.V. + Copyright (C) 2014, 2015, 2016 GNUnet e.V. TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -17,14 +17,18 @@ * @file include/taler_json_lib.h * @brief helper functions for JSON processing using libjansson * @author Sree Harsha Totakura + * @author Christian Grothoff */ -#ifndef TALER_json_LIB_H_ -#define TALER_json_LIB_H_ +#ifndef TALER_JSON_LIB_H_ +#define TALER_JSON_LIB_H_ #include +#include +#include "taler_util.h" /** * Print JSON parsing related error information + * @deprecated */ #define TALER_json_warn(error) \ GNUNET_log (GNUNET_ERROR_TYPE_WARNING, \ @@ -39,106 +43,18 @@ * @return a json object describing the amount */ json_t * -TALER_json_from_amount (const struct TALER_Amount *amount); +TALER_JSON_from_amount (const struct TALER_Amount *amount); /** - * Convert absolute timestamp to a json string. + * Provide specification to parse given JSON object to an amount. * - * @param stamp the time stamp - * @return a json string with the timestamp in @a stamp - */ -json_t * -TALER_json_from_abs (struct GNUNET_TIME_Absolute stamp); - - -/** - * Convert RSA public key to JSON. - * - * @param pk public key to convert - * @return corresponding JSON encoding - */ -json_t * -TALER_json_from_rsa_public_key (struct GNUNET_CRYPTO_rsa_PublicKey *pk); - - -/** - * Convert RSA signature to JSON. - * - * @param sig signature to convert - * @return corresponding JSON encoding - */ -json_t * -TALER_json_from_rsa_signature (struct GNUNET_CRYPTO_rsa_Signature *sig); - - -/** - * Convert binary data to a JSON string - * with the base32crockford encoding. - * - * @param data binary data - * @param size size of @a data in bytes - * @return json string that encodes @a data - */ -json_t * -TALER_json_from_data (const void *data, - size_t size); - - -/** - * Parse given JSON object to Amount - * - * @param json the json object representing Amount + * @param name name of the amount field in the JSON * @param[out] r_amount where the amount has to be written - * @return #GNUNET_OK upon successful parsing; #GNUNET_SYSERR upon error */ -int -TALER_json_to_amount (json_t *json, - struct TALER_Amount *r_amount); - -/** - * Parse given JSON object to absolute time. - * - * @param json the json object representing absolute time in seconds - * @param[out] abs where the time has to be written - * @return #GNUNET_OK upon successful parsing; #GNUNET_SYSERR upon error - */ -int -TALER_json_to_abs (json_t *json, - struct GNUNET_TIME_Absolute *abs); - -/** - * Parse given JSON object to data - * - * @param json the json object representing data - * @param out the pointer to hold the parsed data. - * @param out_size the size of @a out - * @return #GNUNET_OK upon successful parsing; #GNUNET_SYSERR upon error - */ -int -TALER_json_to_data (json_t *json, - void *out, - size_t out_size); - - -/** - * Convert JSON to RSA public key. - * - * @param json JSON encoding to convert - * @return corresponding public key - */ -struct GNUNET_CRYPTO_rsa_PublicKey * -TALER_json_to_rsa_public_key (json_t *json); - - -/** - * Convert JSON to RSA signature. - * - * @param json JSON encoding to convert - * @return corresponding signature - */ -struct GNUNET_CRYPTO_rsa_Signature * -TALER_json_to_rsa_signature (json_t *json); +struct GNUNET_JSON_Specification +TALER_JSON_spec_amount (const char *name, + struct TALER_Amount *r_amount); /** @@ -149,22 +65,9 @@ TALER_json_to_rsa_signature (json_t *json); * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ int -TALER_hash_json (json_t *json, +TALER_JSON_hash (json_t *json, struct GNUNET_HashCode *hc); - -/** - * Check if the given wire format JSON object is correctly formatted - * - * @param allowed NULL-terminated array of allowed wire format types - * @param wire the JSON wire format object - * @return #GNUNET_YES if correctly formatted; #GNUNET_NO if not - */ -int -TALER_json_validate_wireformat (const char **allowed, - const json_t *wire); - - -#endif /* TALER_json_LIB_H_ */ +#endif /* TALER_JSON_LIB_H_ */ /* End of taler_json_lib.h */ diff --git a/src/include/taler_pq_lib.h b/src/include/taler_pq_lib.h index 49e067846..dfcea30e1 100644 --- a/src/include/taler_pq_lib.h +++ b/src/include/taler_pq_lib.h @@ -24,6 +24,7 @@ #define TALER_PQ_LIB_H_ #include +#include #include #include "taler_util.h" diff --git a/src/include/taler_util.h b/src/include/taler_util.h index 380901812..f0da795a4 100644 --- a/src/include/taler_util.h +++ b/src/include/taler_util.h @@ -24,8 +24,6 @@ #include #include "taler_amount_lib.h" #include "taler_crypto_lib.h" -#include "taler_json_lib.h" - /* Define logging functions */ @@ -97,30 +95,6 @@ TALER_b2s (const void *buf, #define TALER_B2S(obj) TALER_b2s (obj, sizeof (*obj)) -/** - * Round a time value so that it is suitable for transmission - * via JSON encodings. - * - * @param at time to round - * @return #GNUNET_OK if time was already rounded, #GNUNET_NO if - * it was just now rounded - */ -int -TALER_round_abs_time (struct GNUNET_TIME_Absolute *at); - - -/** - * Round a time value so that it is suitable for transmission - * via JSON encodings. - * - * @param rt time to round - * @return #GNUNET_OK if time was already rounded, #GNUNET_NO if - * it was just now rounded - */ -int -TALER_round_rel_time (struct GNUNET_TIME_Relative *rt); - - /** * Load configuration by parsing all configuration * files in the given directory. diff --git a/src/include/taler_wire_plugin.h b/src/include/taler_wire_plugin.h index 8fb194c57..c80aa2e49 100644 --- a/src/include/taler_wire_plugin.h +++ b/src/include/taler_wire_plugin.h @@ -101,11 +101,15 @@ struct TALER_WIRE_Plugin /** * Check if the given wire format JSON object is correctly formatted * + * @param cls the @e cls of this struct with the plugin-specific state * @param wire the JSON wire format object + * @param master_pub public key of the exchange to verify against * @return #GNUNET_YES if correctly formatted; #GNUNET_NO if not */ int - (*wire_validate) (const json_t *wire); + (*wire_validate) (void *cls, + const json_t *wire, + const struct TALER_MasterPublicKeyP *master_pub); /** diff --git a/src/json/Makefile.am b/src/json/Makefile.am new file mode 100644 index 000000000..6f71b8718 --- /dev/null +++ b/src/json/Makefile.am @@ -0,0 +1,38 @@ +# This Makefile.am is in the public domain +AM_CPPFLAGS = -I$(top_srcdir)/src/include + +if USE_COVERAGE + AM_CFLAGS = --coverage -O0 + XLIB = -lgcov +endif + +lib_LTLIBRARIES = \ + libtalerjson.la + +libtalerjson_la_SOURCES = \ + json.c \ + json_helper.c +libtalerjson_la_LDFLAGS = \ + -version-info 0:0:0 \ + -export-dynamic -no-undefined +libtalerjson_la_LIBADD = \ + -lgnunetjson \ + $(top_builddir)/src/util/libtalerutil.la \ + -lgnunetutil \ + -ljansson \ + $(XLIB) + +TESTS = \ + test_json + +check_PROGRAMS= \ + test_json + +test_json_SOURCES = \ + test_json.c +test_json_LDADD = \ + -ltalerjson \ + -lgnunetjson \ + $(top_builddir)/src/util/libtalerutil.la \ + -lgnunetutil \ + -ljansson diff --git a/src/json/json.c b/src/json/json.c new file mode 100644 index 000000000..1fbc59a73 --- /dev/null +++ b/src/json/json.c @@ -0,0 +1,53 @@ +/* + This file is part of TALER + Copyright (C) 2014, 2015, 2016 GNUnet e.V. + + TALER is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + TALER; see the file COPYING. If not, If not, see +*/ +/** + * @file json/json.c + * @brief helper functions for JSON processing using libjansson + * @author Sree Harsha Totakura + */ +#include "platform.h" +#include +#include "taler_util.h" +#include "taler_json_lib.h" + + +/** + * Hash a JSON for binary signing. + * + * @param[in] json some JSON value + * @param[out] hc resulting hash code + * @return #GNUNET_OK on success, #GNUNET_SYSERR on error + */ +int +TALER_JSON_hash (json_t *json, + struct GNUNET_HashCode *hc) +{ + char *wire_enc; + size_t len; + + if (NULL == (wire_enc = json_dumps (json, + JSON_COMPACT | JSON_SORT_KEYS))) + return GNUNET_SYSERR; + len = strlen (wire_enc) + 1; + GNUNET_CRYPTO_hash (wire_enc, + len, + hc); + free (wire_enc); + return GNUNET_OK; +} + + +/* End of json/json.c */ diff --git a/src/json/json_helper.c b/src/json/json_helper.c new file mode 100644 index 000000000..b61fe21a6 --- /dev/null +++ b/src/json/json_helper.c @@ -0,0 +1,146 @@ +/* + This file is part of TALER + Copyright (C) 2014, 2015, 2016 GNUnet e.V. + + TALER is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + TALER; see the file COPYING. If not, If not, see +*/ +/** + * @file json/json_helper.c + * @brief helper functions to generate specifications to parse + * Taler-specific JSON objects with libgnunetjson + * @author Sree Harsha Totakura + * @author Christian Grothoff + */ +#include "platform.h" +#include +#include "taler_util.h" +#include "taler_json_lib.h" + + +/** + * Convert a TALER amount to a JSON object. + * + * @param amount the amount + * @return a json object describing the amount + */ +json_t * +TALER_JSON_from_amount (const struct TALER_Amount *amount) +{ + json_t *j; + + if ( (amount->value != (uint64_t) ((json_int_t) amount->value)) || + (0 > ((json_int_t) amount->value)) ) + { + /* Theoretically, json_int_t can be a 32-bit "long", or we might + have a 64-bit value which converted to a 63-bit signed long + long causes problems here. So we check. Note that depending + on the platform, the compiler may be able to statically tell + that at least the first check is always false. */ + GNUNET_break (0); + return NULL; + } + j = json_pack ("{s:s, s:I, s:I}", + "currency", amount->currency, + "value", (json_int_t) amount->value, + "fraction", (json_int_t) amount->fraction); + GNUNET_assert (NULL != j); + return j; +} + + +/** + * Parse given JSON object to Amount + * + * @param cls closure, NULL + * @param root the json object representing data + * @param[out] spec where to write the data + * @return #GNUNET_OK upon successful parsing; #GNUNET_SYSERR upon error + */ +static int +parse_amount (void *cls, + json_t *root, + struct GNUNET_JSON_Specification *spec) +{ + struct TALER_Amount *r_amount = spec->ptr; + json_int_t value; + json_int_t fraction; + const char *currency; + + memset (r_amount, + 0, + sizeof (struct TALER_Amount)); + if (0 != json_unpack (root, + "{s:I, s:I, s:s}", + "value", &value, + "fraction", &fraction, + "currency", ¤cy)) + { + char *json_enc; + + if (NULL == (json_enc = json_dumps (root, + JSON_COMPACT | JSON_ENCODE_ANY))) + { + GNUNET_break (0); + return GNUNET_SYSERR; + } + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Malformed JSON amount: %s\n", + json_enc); + free (json_enc); + return GNUNET_SYSERR; + } + if ( (value < 0) || + (fraction < 0) || + (value > UINT64_MAX) || + (fraction > UINT32_MAX) ) + { + GNUNET_break_op (0); + return GNUNET_SYSERR; + } + if (strlen (currency) >= TALER_CURRENCY_LEN) + { + GNUNET_break_op (0); + return GNUNET_SYSERR; + } + r_amount->value = (uint64_t) value; + r_amount->fraction = (uint32_t) fraction; + strcpy (r_amount->currency, currency); + (void) TALER_amount_normalize (r_amount); + return GNUNET_OK; +} + + + +/** + * Provide specification to parse given JSON object to an amount. + * + * @param name name of the amount field in the JSON + * @param[out] r_amount where the amount has to be written + */ +struct GNUNET_JSON_Specification +TALER_JSON_spec_amount (const char *name, + struct TALER_Amount *r_amount) +{ + struct GNUNET_JSON_Specification ret = { + .parser = &parse_amount, + .cleaner = NULL, + .cls = NULL, + .field = name, + .ptr = r_amount, + .ptr_size = 0, + .size_ptr = NULL + }; + return ret; +} + + +/* end of json/json_helper.c */ diff --git a/src/json/test_json.c b/src/json/test_json.c new file mode 100644 index 000000000..9f42dbd34 --- /dev/null +++ b/src/json/test_json.c @@ -0,0 +1,71 @@ +/* + This file is part of TALER + (C) 2015, 2016 GNUnet e.V. and Inria + + TALER is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + TALER; see the file COPYING. If not, If not, see +*/ + +/** + * @file json/test_json.c + * @brief Tests for Taler-specific crypto logic + * @author Christian Grothoff + */ +#include "platform.h" +#include "taler_util.h" +#include "taler_json_lib.h" + + +/** + * Test amount conversion from/to JSON. + * + * @return 0 on success + */ +static int +test_amount () +{ + json_t *j; + struct TALER_Amount a1; + struct TALER_Amount a2; + struct GNUNET_JSON_Specification spec[] = { + TALER_JSON_spec_amount (NULL, &a2), + GNUNET_JSON_spec_end() + }; + + GNUNET_assert (GNUNET_OK == + TALER_string_to_amount ("EUR:4.3", + &a1)); + j = TALER_JSON_from_amount (&a1); + GNUNET_assert (NULL != j); + GNUNET_assert (GNUNET_OK == + GNUNET_JSON_parse (j, spec, + NULL, NULL)); + GNUNET_assert (0 == + TALER_amount_cmp (&a1, + &a2)); + json_decref (j); + return 0; +} + + +int +main(int argc, + const char *const argv[]) +{ + GNUNET_log_setup ("test-json", + "WARNING", + NULL); + if (0 != test_amount ()) + return 1; + return 0; +} + +/* end of test_json.c */ diff --git a/src/pq/pq_result_helper.c b/src/pq/pq_result_helper.c index 748ce0c29..49d0668a0 100644 --- a/src/pq/pq_result_helper.c +++ b/src/pq/pq_result_helper.c @@ -72,7 +72,7 @@ extract_amount_nbo_helper (PGresult *result, frac_name); curr_num = PQfnumber (result, curr_name); - if (val_num < 0) + if (val_num < 0) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Field `%s' does not exist in result\n", @@ -140,7 +140,7 @@ extract_amount_nbo_helper (PGresult *result, * #GNUNET_YES if all results could be extracted * #GNUNET_NO if at least one result was NULL * #GNUNET_SYSERR if a result was invalid (non-existing field) - */ + */ static int extract_amount_nbo (void *cls, PGresult *result, @@ -153,7 +153,7 @@ extract_amount_nbo (void *cls, char *frac_name; char *curr_name; int ret; - + GNUNET_asprintf (&val_name, "%s_val", fname); @@ -189,7 +189,7 @@ TALER_PQ_result_spec_amount_nbo (const char *name, { struct GNUNET_PQ_ResultSpec res = { &extract_amount_nbo, NULL, NULL, - (void *) amount, sizeof (*amount), + (void *) amount, sizeof (*amount), name, NULL }; return res; } @@ -208,7 +208,7 @@ TALER_PQ_result_spec_amount_nbo (const char *name, * #GNUNET_YES if all results could be extracted * #GNUNET_NO if at least one result was NULL * #GNUNET_SYSERR if a result was invalid (non-existing field) - */ + */ static int extract_amount (void *cls, PGresult *result, @@ -223,7 +223,7 @@ extract_amount (void *cls, char *curr_name; struct TALER_AmountNBO amount_nbo; int ret; - + GNUNET_asprintf (&val_name, "%s_val", fname); @@ -280,7 +280,7 @@ TALER_PQ_result_spec_amount (const char *name, * #GNUNET_YES if all results could be extracted * #GNUNET_NO if at least one result was NULL * #GNUNET_SYSERR if a result was invalid (non-existing field) - */ + */ static int extract_json (void *cls, PGresult *result, @@ -294,7 +294,7 @@ extract_json (void *cls, int fnum; json_error_t json_error; size_t slen; - + fnum = PQfnumber (result, fname); if (fnum < 0) @@ -320,10 +320,11 @@ extract_json (void *cls, &json_error); if (NULL == *j_dst) { - TALER_json_warn (json_error); GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Failed to parse JSON result for field `%s'\n", - fname); + "Failed to parse JSON result for field `%s': %s (%s)\n", + fname, + json_error.text, + json_error.source); return GNUNET_SYSERR; } return GNUNET_OK; @@ -364,7 +365,7 @@ TALER_PQ_result_spec_json (const char *name, { struct GNUNET_PQ_ResultSpec res = { &extract_json, &clean_json, NULL, - (void *) jp, 0, + (void *) jp, 0, name, NULL }; return res; } diff --git a/src/util/Makefile.am b/src/util/Makefile.am index 8efc3987a..41afcc97f 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -1,5 +1,5 @@ # This Makefile.am is in the public domain -AM_CPPFLAGS = -I$(top_srcdir)/src/include $(LIBGCRYPT_CFLAGS) $(POSTGRESQL_CPPFLAGS) +AM_CPPFLAGS = -I$(top_srcdir)/src/include $(LIBGCRYPT_CFLAGS) if USE_COVERAGE AM_CFLAGS = --coverage -O0 @@ -31,15 +31,12 @@ libtalerutil_la_SOURCES = \ amount.c \ crypto.c \ util.c \ - json.c \ os_installation.c \ - plugin.c \ - wireformats.c + plugin.c libtalerutil_la_LIBADD = \ -lgnunetutil \ $(LIBGCRYPT_LIBS) \ - -ljansson \ -lmicrohttpd $(XLIB) libtalerutil_la_LDFLAGS = \ @@ -48,13 +45,11 @@ libtalerutil_la_LDFLAGS = \ TESTS = \ test_amount \ - test_crypto \ - test_json + test_crypto check_PROGRAMS= \ test_amount \ - test_crypto \ - test_json + test_crypto test_amount_SOURCES = \ @@ -68,10 +63,3 @@ test_crypto_SOURCES = \ test_crypto_LDADD = \ -lgnunetutil \ libtalerutil.la - -test_json_SOURCES = \ - test_json.c -test_json_LDADD = \ - -lgnunetutil \ - -ljansson \ - libtalerutil.la diff --git a/src/util/json.c b/src/util/json.c deleted file mode 100644 index 6aca7548c..000000000 --- a/src/util/json.c +++ /dev/null @@ -1,400 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2014, 2015 GNUnet e.V. - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - TALER; see the file COPYING. If not, If not, see -*/ -/** - * @file util/json.c - * @brief helper functions for JSON processing using libjansson - * @author Sree Harsha Totakura - */ -#include "platform.h" -#if HAVE_GNUNET_GNUNET_UTIL_TALER_WALLET_LIB_H -#include -#endif -#if HAVE_GNUNET_GNUNET_UTIL_LIB_H -#include -#endif -#include "taler_util.h" - -/** - * Shorthand for exit jumps. - */ -#define EXITIF(cond) \ - do { \ - if (cond) { GNUNET_break (0); goto EXITIF_exit; } \ - } while (0) - -/** - * Shorthand for JSON parsing related exit jumps. - */ -#define UNPACK_EXITIF(cond) \ - do { \ - if (cond) { TALER_json_warn (error); goto EXITIF_exit; } \ - } while (0) - - -/** - * Convert a TALER amount to a JSON - * object. - * - * @param amount the amount - * @return a json object describing the amount - */ -json_t * -TALER_json_from_amount (const struct TALER_Amount *amount) -{ - json_t *j; - - if ( (amount->value != (uint64_t) ((json_int_t) amount->value)) || - (0 > ((json_int_t) amount->value)) ) - { - /* Theoretically, json_int_t can be a 32-bit "long", or we might - have a 64-bit value which converted to a 63-bit signed long - long causes problems here. So we check. Note that depending - on the platform, the compiler may be able to statically tell - that at least the first check is always false. */ - GNUNET_break (0); - return NULL; - } - j = json_pack ("{s:s, s:I, s:I}", - "currency", amount->currency, - "value", (json_int_t) amount->value, - "fraction", (json_int_t) amount->fraction); - GNUNET_assert (NULL != j); - return j; -} - - -/** - * Convert absolute timestamp to a json string. - * - * @param stamp the time stamp - * @return a json string with the timestamp in @a stamp - */ -json_t * -TALER_json_from_abs (struct GNUNET_TIME_Absolute stamp) -{ - json_t *j; - char *mystr; - int ret; - - GNUNET_assert (GNUNET_OK == - TALER_round_abs_time (&stamp)); - if (stamp.abs_value_us == GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us) - return json_string ("/never/"); - ret = GNUNET_asprintf (&mystr, - "/Date(%llu)/", - (unsigned long long) (stamp.abs_value_us / (1000LL * 1000LL))); - GNUNET_assert (ret > 0); - j = json_string (mystr); - GNUNET_free (mystr); - return j; -} - - -/** - * Convert RSA public key to JSON. - * - * @param pk public key to convert - * @return corresponding JSON encoding - */ -json_t * -TALER_json_from_rsa_public_key (struct GNUNET_CRYPTO_rsa_PublicKey *pk) -{ - char *buf; - size_t buf_len; - json_t *ret; - - buf_len = GNUNET_CRYPTO_rsa_public_key_encode (pk, - &buf); - ret = TALER_json_from_data (buf, - buf_len); - GNUNET_free (buf); - return ret; -} - - -/** - * Convert JSON to RSA public key. - * - * @param json JSON encoding to convert - * @return corresponding public key - */ -struct GNUNET_CRYPTO_rsa_PublicKey * -TALER_json_to_rsa_public_key (json_t *json) -{ - const char *enc; - char *buf; - size_t len; - size_t buf_len; - struct GNUNET_CRYPTO_rsa_PublicKey *pk; - - buf = NULL; - EXITIF (NULL == (enc = json_string_value (json))); - len = strlen (enc); - buf_len = (len * 5) / 8; - buf = GNUNET_malloc (buf_len); - EXITIF (GNUNET_OK != - GNUNET_STRINGS_string_to_data (enc, - len, - buf, - buf_len)); - EXITIF (NULL == (pk = GNUNET_CRYPTO_rsa_public_key_decode (buf, - buf_len))); - GNUNET_free (buf); - return pk; - EXITIF_exit: - GNUNET_free_non_null (buf); - return NULL; -} - - -/** - * Convert JSON to RSA signature. - * - * @param json JSON encoding to convert - * @return corresponding signature - */ -struct GNUNET_CRYPTO_rsa_Signature * -TALER_json_to_rsa_signature (json_t *json) -{ - const char *enc; - char *buf; - size_t len; - size_t buf_len; - struct GNUNET_CRYPTO_rsa_Signature *sig; - - buf = NULL; - EXITIF (NULL == (enc = json_string_value (json))); - len = strlen (enc); - buf_len = (len * 5) / 8; - buf = GNUNET_malloc (buf_len); - EXITIF (GNUNET_OK != - GNUNET_STRINGS_string_to_data (enc, - len, - buf, - buf_len)); - EXITIF (NULL == (sig = GNUNET_CRYPTO_rsa_signature_decode (buf, - buf_len))); - GNUNET_free (buf); - return sig; - EXITIF_exit: - GNUNET_free_non_null (buf); - return NULL; -} - - -/** - * Convert RSA signature to JSON. - * - * @param sig signature to convert - * @return corresponding JSON encoding - */ -json_t * -TALER_json_from_rsa_signature (struct GNUNET_CRYPTO_rsa_Signature *sig) -{ - char *buf; - size_t buf_len; - json_t *ret; - - buf_len = GNUNET_CRYPTO_rsa_signature_encode (sig, - &buf); - ret = TALER_json_from_data (buf, - buf_len); - GNUNET_free (buf); - return ret; -} - - -/** - * Convert binary data to a JSON string - * with the base32crockford encoding. - * - * @param data binary data - * @param size size of @a data in bytes - * @return json string that encodes @a data - */ -json_t * -TALER_json_from_data (const void *data, - size_t size) -{ - char *buf; - json_t *json; - - buf = GNUNET_STRINGS_data_to_string_alloc (data, size); - json = json_string (buf); - GNUNET_free (buf); - return json; -} - - -/** - * Parse given JSON object to Amount - * - * @param json the json object representing Amount - * @param[out] r_amount where the amount has to be written - * @return #GNUNET_OK upon successful parsing; #GNUNET_SYSERR upon error - */ -int -TALER_json_to_amount (json_t *json, - struct TALER_Amount *r_amount) -{ - json_int_t value; - json_int_t fraction; - const char *currency; - - memset (r_amount, - 0, - sizeof (struct TALER_Amount)); - if (0 != json_unpack (json, - "{s:I, s:I, s:s}", - "value", &value, - "fraction", &fraction, - "currency", ¤cy)) - { - char *json_enc; - - if (NULL == (json_enc = json_dumps (json, - JSON_COMPACT | JSON_ENCODE_ANY))) - { - GNUNET_break (0); - return GNUNET_SYSERR; - } - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Malformed JSON amount: %s\n", - json_enc); - free (json_enc); - return GNUNET_SYSERR; - } - if ( (value < 0) || - (fraction < 0) || - (value > UINT64_MAX) || - (fraction > UINT32_MAX) ) - { - GNUNET_break_op (0); - return GNUNET_SYSERR; - } - if (strlen (currency) >= TALER_CURRENCY_LEN) - { - GNUNET_break_op (0); - return GNUNET_SYSERR; - } - r_amount->value = (uint64_t) value; - r_amount->fraction = (uint32_t) fraction; - strcpy (r_amount->currency, currency); - (void) TALER_amount_normalize (r_amount); - return GNUNET_OK; -} - - -/** - * Parse given JSON object to absolute time. - * - * @param json the json object representing Amount - * @param[out] abs where the amount has to be written - * @return #GNUNET_OK upon successful parsing; #GNUNET_SYSERR upon error - */ -int -TALER_json_to_abs (json_t *json, - struct GNUNET_TIME_Absolute *abs) -{ - const char *val; - unsigned long long int tval; - - val = json_string_value (json); - if (NULL == val) - { - GNUNET_break_op (0); - return GNUNET_SYSERR; - } - if ( (0 == strcasecmp (val, - "/forever/")) || - (0 == strcasecmp (val, - "/never/")) ) - { - *abs = GNUNET_TIME_UNIT_FOREVER_ABS; - return GNUNET_OK; - } - if (1 != sscanf (val, - "/Date(%llu)/", - &tval)) - { - GNUNET_break_op (0); - return GNUNET_SYSERR; - } - /* Time is in seconds in JSON, but in microseconds in GNUNET_TIME_Absolute */ - abs->abs_value_us = tval * 1000LL * 1000LL; - if ( (abs->abs_value_us) / 1000LL / 1000LL != tval) - { - /* Integer overflow */ - GNUNET_break_op (0); - return GNUNET_SYSERR; - } - return GNUNET_OK; -} - - -/** - * Parse given JSON object to data - * - * @param json the json object representing data - * @param out the pointer to hold the parsed data. - * @param out_size the size of @a out - * @return #GNUNET_OK upon successful parsing; #GNUNET_SYSERR upon error - */ -int -TALER_json_to_data (json_t *json, - void *out, - size_t out_size) -{ - const char *enc; - unsigned int len; - - EXITIF (NULL == (enc = json_string_value (json))); - len = strlen (enc); - EXITIF (((len * 5) / 8) != out_size); - EXITIF (GNUNET_OK != GNUNET_STRINGS_string_to_data (enc, len, out, out_size)); - return GNUNET_OK; - EXITIF_exit: - return GNUNET_SYSERR; -} - - -/** - * Hash a JSON for binary signing. - * - * @param[in] json some JSON value - * @param[out] hc resulting hash code - * @return #GNUNET_OK on success, #GNUNET_SYSERR on error - */ -int -TALER_hash_json (json_t *json, - struct GNUNET_HashCode *hc) -{ - char *wire_enc; - size_t len; - - if (NULL == (wire_enc = json_dumps (json, - JSON_COMPACT | JSON_SORT_KEYS))) - return GNUNET_SYSERR; - len = strlen (wire_enc) + 1; - GNUNET_CRYPTO_hash (wire_enc, - len, - hc); - free (wire_enc); - return GNUNET_OK; -} - - -/* End of util/json.c */ diff --git a/src/util/test_json.c b/src/util/test_json.c deleted file mode 100644 index 5e2f50fe8..000000000 --- a/src/util/test_json.c +++ /dev/null @@ -1,182 +0,0 @@ -/* - This file is part of TALER - (C) 2015 GNUnet e.V. - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - TALER; see the file COPYING. If not, If not, see -*/ - -/** - * @file util/test_json.c - * @brief Tests for Taler-specific crypto logic - * @author Christian Grothoff - */ -#include "platform.h" -#include "taler_util.h" -#include "taler_json_lib.h" - - -/** - * Test amount conversion from/to JSON. - * - * @return 0 on success - */ -static int -test_amount () -{ - json_t *j; - struct TALER_Amount a1; - struct TALER_Amount a2; - - GNUNET_assert (GNUNET_OK == - TALER_string_to_amount ("EUR:4.3", - &a1)); - j = TALER_json_from_amount (&a1); - GNUNET_assert (NULL != j); - GNUNET_assert (GNUNET_OK == - TALER_json_to_amount (j, - &a2)); - GNUNET_assert (0 == - TALER_amount_cmp (&a1, - &a2)); - json_decref (j); - return 0; -} - - -/** - * Test time conversion from/to JSON. - * - * @return 0 on success - */ -static int -test_time () -{ - json_t *j; - struct GNUNET_TIME_Absolute a1; - struct GNUNET_TIME_Absolute a2; - - a1 = GNUNET_TIME_absolute_get (); - TALER_round_abs_time (&a1); - j = TALER_json_from_abs (a1); - GNUNET_assert (NULL != j); - GNUNET_assert (GNUNET_OK == - TALER_json_to_abs (j, - &a2)); - GNUNET_assert (a1.abs_value_us == - a2.abs_value_us); - json_decref (j); - - a1 = GNUNET_TIME_UNIT_FOREVER_ABS; - j = TALER_json_from_abs (a1); - GNUNET_assert (NULL != j); - GNUNET_assert (GNUNET_OK == - TALER_json_to_abs (j, - &a2)); - GNUNET_assert (a1.abs_value_us == - a2.abs_value_us); - json_decref (j); - return 0; -} - - -/** - * Test raw (binary) conversion from/to JSON. - * - * @return 0 on success - */ -static int -test_raw () -{ - char blob[256]; - char blob2[256]; - unsigned int i; - json_t *j; - - for (i=0;i<=256;i++) - { - memset (blob, i, i); - j = TALER_json_from_data (blob, i); - GNUNET_assert (NULL != j); - GNUNET_assert (GNUNET_OK == - TALER_json_to_data (j, - blob2, - i)); - GNUNET_assert (0 == - memcmp (blob, - blob2, - i)); - } - return 0; -} - - -/** - * Test rsa conversions from/to JSON. - * - * @return 0 on success - */ -static int -test_rsa () -{ - struct GNUNET_CRYPTO_rsa_PublicKey *pub; - struct GNUNET_CRYPTO_rsa_PublicKey *pub2; - struct GNUNET_CRYPTO_rsa_Signature *sig; - struct GNUNET_CRYPTO_rsa_Signature *sig2; - struct GNUNET_CRYPTO_rsa_PrivateKey *priv; - char msg[] = "Hello"; - json_t *jp; - json_t *js; - - priv = GNUNET_CRYPTO_rsa_private_key_create (1024); - pub = GNUNET_CRYPTO_rsa_private_key_get_public (priv); - sig = GNUNET_CRYPTO_rsa_sign (priv, - msg, - sizeof (msg)); - GNUNET_assert (NULL != (jp = TALER_json_from_rsa_public_key (pub))); - GNUNET_assert (NULL != (js = TALER_json_from_rsa_signature (sig))); - GNUNET_assert (NULL != (pub2 = TALER_json_to_rsa_public_key (jp))); - GNUNET_assert (NULL != (sig2 = TALER_json_to_rsa_signature (js))); - GNUNET_break (0 == - GNUNET_CRYPTO_rsa_signature_cmp (sig, - sig2)); - GNUNET_break (0 == - GNUNET_CRYPTO_rsa_public_key_cmp (pub, - pub2)); - GNUNET_CRYPTO_rsa_signature_free (sig); - GNUNET_CRYPTO_rsa_signature_free (sig2); - GNUNET_CRYPTO_rsa_private_key_free (priv); - GNUNET_CRYPTO_rsa_public_key_free (pub); - GNUNET_CRYPTO_rsa_public_key_free (pub2); - return 0; -} - - -int -main(int argc, - const char *const argv[]) -{ - GNUNET_log_setup ("test-json", - "WARNING", - NULL); - if (0 != test_amount ()) - return 1; - if (0 != test_time ()) - return 1; - if (0 != test_raw ()) - return 1; - if (0 != test_rsa ()) - return 1; - /* FIXME: test EdDSA signature conversion... */ - return 0; -} - -/* end of test_json.c */ diff --git a/src/util/util.c b/src/util/util.c index addafacf7..6dcd0dc29 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -56,7 +56,7 @@ TALER_b2s (const void *buf, GNUNET_free (tmp); ret[8] = '\0'; return ret; -} +} /** @@ -89,46 +89,6 @@ TALER_config_get_denom (struct GNUNET_CONFIGURATION_Handle *cfg, } -/** - * Round a time value so that it is suitable for transmission - * via JSON encodings. - * - * @param at time to round - * @return #GNUNET_OK if time was already rounded, #GNUNET_NO if - * it was just now rounded - */ -int -TALER_round_abs_time (struct GNUNET_TIME_Absolute *at) -{ - if (at->abs_value_us == GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us) - return GNUNET_OK; - if (0 == at->abs_value_us % 1000000) - return GNUNET_OK; - at->abs_value_us -= at->abs_value_us % 1000000; - return GNUNET_NO; -} - - -/** - * Round a time value so that it is suitable for transmission - * via JSON encodings. - * - * @param rt time to round - * @return #GNUNET_OK if time was already rounded, #GNUNET_NO if - * it was just now rounded - */ -int -TALER_round_rel_time (struct GNUNET_TIME_Relative *rt) -{ - if (rt->rel_value_us == GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us) - return GNUNET_OK; - if (0 == rt->rel_value_us % 1000000) - return GNUNET_OK; - rt->rel_value_us -= rt->rel_value_us % 1000000; - return GNUNET_NO; -} - - /** * Load configuration by parsing all configuration * files in the given directory. diff --git a/src/util/wireformats.c b/src/util/wireformats.c deleted file mode 100644 index a69e8a093..000000000 --- a/src/util/wireformats.c +++ /dev/null @@ -1,441 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2014, 2015 GNUnet e.V. - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - TALER; see the file COPYING. If not, If not, see -*/ -/** - * @file util/wireformats.c - * @brief helper functions for JSON processing using libjansson - * @author Sree Harsha Totakura - * @author Christian Grothoff - */ -#include "platform.h" -#include -#include "taler_util.h" - -/** - * Shorthand for exit jumps. - */ -#define EXITIF(cond) \ - do { \ - if (cond) { GNUNET_break (0); goto EXITIF_exit; } \ - } while (0) - -/** - * Shorthand for JSON parsing related exit jumps. - */ -#define UNPACK_EXITIF(cond) \ - do { \ - if (cond) { TALER_json_warn (error); goto EXITIF_exit; } \ - } while (0) - - -/* Taken from GNU gettext */ - -/** - * Entry in the country table. - */ -struct table_entry -{ - /** - * 2-Character international country code. - */ - const char *code; - - /** - * Long English name of the country. - */ - const char *english; -}; - -/* Keep the following table in sync with gettext. - WARNING: the entries should stay sorted according to the code */ -/** - * List of country codes. - */ -static const struct table_entry country_table[] = - { - { "AE", "U.A.E." }, - { "AF", "Afghanistan" }, - { "AL", "Albania" }, - { "AM", "Armenia" }, - { "AN", "Netherlands Antilles" }, - { "AR", "Argentina" }, - { "AT", "Austria" }, - { "AU", "Australia" }, - { "AZ", "Azerbaijan" }, - { "BA", "Bosnia and Herzegovina" }, - { "BD", "Bangladesh" }, - { "BE", "Belgium" }, - { "BG", "Bulgaria" }, - { "BH", "Bahrain" }, - { "BN", "Brunei Darussalam" }, - { "BO", "Bolivia" }, - { "BR", "Brazil" }, - { "BT", "Bhutan" }, - { "BY", "Belarus" }, - { "BZ", "Belize" }, - { "CA", "Canada" }, - { "CG", "Congo" }, - { "CH", "Switzerland" }, - { "CI", "Cote d'Ivoire" }, - { "CL", "Chile" }, - { "CM", "Cameroon" }, - { "CN", "People's Republic of China" }, - { "CO", "Colombia" }, - { "CR", "Costa Rica" }, - { "CS", "Serbia and Montenegro" }, - { "CZ", "Czech Republic" }, - { "DE", "Germany" }, - { "DK", "Denmark" }, - { "DO", "Dominican Republic" }, - { "DZ", "Algeria" }, - { "EC", "Ecuador" }, - { "EE", "Estonia" }, - { "EG", "Egypt" }, - { "ER", "Eritrea" }, - { "ES", "Spain" }, - { "ET", "Ethiopia" }, - { "FI", "Finland" }, - { "FO", "Faroe Islands" }, - { "FR", "France" }, - { "GB", "United Kingdom" }, - { "GD", "Caribbean" }, - { "GE", "Georgia" }, - { "GL", "Greenland" }, - { "GR", "Greece" }, - { "GT", "Guatemala" }, - { "HK", "Hong Kong" }, - { "HK", "Hong Kong S.A.R." }, - { "HN", "Honduras" }, - { "HR", "Croatia" }, - { "HT", "Haiti" }, - { "HU", "Hungary" }, - { "ID", "Indonesia" }, - { "IE", "Ireland" }, - { "IL", "Israel" }, - { "IN", "India" }, - { "IQ", "Iraq" }, - { "IR", "Iran" }, - { "IS", "Iceland" }, - { "IT", "Italy" }, - { "JM", "Jamaica" }, - { "JO", "Jordan" }, - { "JP", "Japan" }, - { "KE", "Kenya" }, - { "KG", "Kyrgyzstan" }, - { "KH", "Cambodia" }, - { "KR", "South Korea" }, - { "KW", "Kuwait" }, - { "KZ", "Kazakhstan" }, - { "LA", "Laos" }, - { "LB", "Lebanon" }, - { "LI", "Liechtenstein" }, - { "LK", "Sri Lanka" }, - { "LT", "Lithuania" }, - { "LU", "Luxembourg" }, - { "LV", "Latvia" }, - { "LY", "Libya" }, - { "MA", "Morocco" }, - { "MC", "Principality of Monaco" }, - { "MD", "Moldava" }, - { "MD", "Moldova" }, - { "ME", "Montenegro" }, - { "MK", "Former Yugoslav Republic of Macedonia" }, - { "ML", "Mali" }, - { "MM", "Myanmar" }, - { "MN", "Mongolia" }, - { "MO", "Macau S.A.R." }, - { "MT", "Malta" }, - { "MV", "Maldives" }, - { "MX", "Mexico" }, - { "MY", "Malaysia" }, - { "NG", "Nigeria" }, - { "NI", "Nicaragua" }, - { "NL", "Netherlands" }, - { "NO", "Norway" }, - { "NP", "Nepal" }, - { "NZ", "New Zealand" }, - { "OM", "Oman" }, - { "PA", "Panama" }, - { "PE", "Peru" }, - { "PH", "Philippines" }, - { "PK", "Islamic Republic of Pakistan" }, - { "PL", "Poland" }, - { "PR", "Puerto Rico" }, - { "PT", "Portugal" }, - { "PY", "Paraguay" }, - { "QA", "Qatar" }, - { "RE", "Reunion" }, - { "RO", "Romania" }, - { "RS", "Serbia" }, - { "RU", "Russia" }, - { "RW", "Rwanda" }, - { "SA", "Saudi Arabia" }, - { "SE", "Sweden" }, - { "SG", "Singapore" }, - { "SI", "Slovenia" }, - { "SK", "Slovak" }, - { "SN", "Senegal" }, - { "SO", "Somalia" }, - { "SR", "Suriname" }, - { "SV", "El Salvador" }, - { "SY", "Syria" }, - { "TH", "Thailand" }, - { "TJ", "Tajikistan" }, - { "TM", "Turkmenistan" }, - { "TN", "Tunisia" }, - { "TR", "Turkey" }, - { "TT", "Trinidad and Tobago" }, - { "TW", "Taiwan" }, - { "TZ", "Tanzania" }, - { "UA", "Ukraine" }, - { "US", "United States" }, - { "UY", "Uruguay" }, - { "VA", "Vatican" }, - { "VE", "Venezuela" }, - { "VN", "Viet Nam" }, - { "YE", "Yemen" }, - { "ZA", "South Africa" }, - { "ZW", "Zimbabwe" } - }; - - -/** - * Country code comparator function, for binary search with bsearch(). - * - * @param ptr1 pointer to a `struct table_entry` - * @param ptr2 pointer to a `struct table_entry` - * @return result of strncmp()'ing the 2-digit country codes of the entries - */ -static int -cmp_country_code (const void *ptr1, - const void *ptr2) -{ - const struct table_entry *cc1 = ptr1; - const struct table_entry *cc2 = ptr2; - - return strncmp (cc1->code, cc2->code, 2); -} - - -/** - * Validates given IBAN according to the European Banking Standards. See: - * http://www.europeanpaymentscouncil.eu/documents/ECBS%20IBAN%20standard%20EBS204_V3.2.pdf - * - * @param iban the IBAN number to validate - * @return #GNUNET_YES if correctly formatted; #GNUNET_NO if not - */ -static int -validate_iban (const char *iban) -{ - char cc[2]; - char ibancpy[35]; - struct table_entry cc_entry; - unsigned int len; - char *nbuf; - unsigned int i; - unsigned int j; - unsigned long long dividend; - unsigned long long remainder; - int nread; - int ret; - - len = strlen (iban); - if (len > 34) - return GNUNET_NO; - strncpy (cc, iban, 2); - strncpy (ibancpy, iban + 4, len - 4); - strncpy (ibancpy + len - 4, iban, 4); - ibancpy[len] = '\0'; - cc_entry.code = cc; - cc_entry.english = NULL; - if (NULL == - bsearch (&cc_entry, - country_table, - sizeof (country_table) / sizeof (struct table_entry), - sizeof (struct table_entry), - &cmp_country_code)) - return GNUNET_NO; - nbuf = GNUNET_malloc ((len * 2) + 1); - for (i=0, j=0; i < len; i++) - { - if (isalpha ((int) ibancpy[i])) - { - EXITIF(2 != snprintf(&nbuf[j], - 3, - "%2u", - (ibancpy[i] - 'A' + 10))); - j += 2; - continue; - } - nbuf[j] = ibancpy[i]; - j++; - } - for (j=0;'\0' != nbuf[j];j++) - GNUNET_assert (isdigit(nbuf[j])); - GNUNET_assert (sizeof(dividend) >= 8); - remainder = 0; - for (i=0; i /** @@ -58,6 +60,8 @@ sepa_amount_round (void *cls, struct SepaClosure *sc = cls; uint32_t delta; + if (NULL == sc->currency) + return GNUNET_SYSERR; if (0 != strcasecmp (amount->currency, sc->currency)) { @@ -347,42 +351,116 @@ validate_iban (const char *iban) } +/** + * Verify that the signature in the @a json for /wire/sepa is valid. + * + * @param json json reply with the signature + * @param master_pub public key of the exchange to verify against + * @return #GNUNET_SYSERR if @a json is invalid, + * #GNUNET_NO if the method is unknown, + * #GNUNET_OK if the json is valid + */ +static int +verify_wire_sepa_signature_ok (const json_t *json, + const struct TALER_MasterPublicKeyP *master_pub) +{ + struct TALER_MasterSignatureP exchange_sig; + struct TALER_MasterWireSepaDetailsPS mp; + const char *receiver_name; + const char *iban; + const char *bic; + struct GNUNET_HashContext *hc; + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("sig", &exchange_sig), + GNUNET_JSON_spec_string ("receiver_name", &receiver_name), + GNUNET_JSON_spec_string ("iban", &iban), + GNUNET_JSON_spec_string ("bic", &bic), + GNUNET_JSON_spec_end() + }; + + if (NULL == master_pub) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Skipping signature check as master public key not given\n"); + return GNUNET_OK; + } + if (GNUNET_OK != + GNUNET_JSON_parse (json, spec, + NULL, NULL)) + { + GNUNET_break_op (0); + return GNUNET_SYSERR; + } + + mp.purpose.purpose = htonl (TALER_SIGNATURE_MASTER_SEPA_DETAILS); + mp.purpose.size = htonl (sizeof (struct TALER_MasterWireSepaDetailsPS)); + hc = GNUNET_CRYPTO_hash_context_start (); + GNUNET_CRYPTO_hash_context_read (hc, + receiver_name, + strlen (receiver_name) + 1); + GNUNET_CRYPTO_hash_context_read (hc, + iban, + strlen (iban) + 1); + GNUNET_CRYPTO_hash_context_read (hc, + bic, + strlen (bic) + 1); + GNUNET_CRYPTO_hash_context_finish (hc, + &mp.h_sepa_details); + + if (GNUNET_OK != + GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MASTER_SEPA_DETAILS, + &mp.purpose, + &exchange_sig.eddsa_signature, + &master_pub->eddsa_pub)) + { + GNUNET_break_op (0); + GNUNET_JSON_parse_free (spec); + return GNUNET_SYSERR; + } + GNUNET_JSON_parse_free (spec); + return GNUNET_OK; +} + + /** * Check if the given wire format JSON object is correctly formatted * + * @param cls the @e cls of this struct with the plugin-specific state * @param wire the JSON wire format object + * @param master_pub public key of the exchange to verify against * @return #GNUNET_YES if correctly formatted; #GNUNET_NO if not */ static int -sepa_wire_validate (const json_t *wire) +sepa_wire_validate (void *cls, + const json_t *wire, + const struct TALER_MasterPublicKeyP *master_pub) { json_error_t error; const char *type; const char *iban; const char *name; const char *bic; - uint64_t r; - const char *address; if (0 != json_unpack_ex ((json_t *) wire, - &error, JSON_STRICT, + &error, 0, "{" - "s:s," /* TYPE: sepa */ - "s:s," /* IBAN: iban */ - "s:s," /* name: beneficiary name */ - "s:s," /* BIC: beneficiary bank's BIC */ - "s:i," /* r: random 64-bit integer nounce */ - "s:s" /* address: address of the beneficiary */ + "s:s," /* type: sepa */ + "s:s," /* iban: IBAN */ + "s:s," /* receiver_name: beneficiary name */ + "s:s" /* bic: beneficiary bank's BIC */ "}", "type", &type, - "IBAN", &iban, - "name", &name, - "bic", &bic, - "r", &r, - "address", &address)) + "iban", &iban, + "receiver_name", &name, + "bic", &bic)) { - TALER_json_warn (error); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "JSON parsing failed at %s:%u: %s (%s)\n", + __FILE__, __LINE__, + error.text, error.source); + json_dumpf (wire, stderr, 0); + fprintf (stderr, "\n"); return GNUNET_SYSERR; } if (0 != strcasecmp (type, @@ -400,6 +478,15 @@ sepa_wire_validate (const json_t *wire) iban); return GNUNET_NO; } + /* FIXME: don't parse again, integrate properly... */ + if (GNUNET_OK != + verify_wire_sepa_signature_ok (wire, + master_pub)) + { + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Signature invalid\n"); + return GNUNET_NO; + } return GNUNET_YES; } @@ -499,19 +586,21 @@ libtaler_plugin_wire_sepa_init (void *cls) struct TALER_WIRE_Plugin *plugin; sc = GNUNET_new (struct SepaClosure); - if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_string (cfg, - "exchange", - "CURRENCY", - &sc->currency)) - { - GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "exchange", - "CURRENCY"); - GNUNET_free (sc); - return NULL; - } - + if (NULL != cfg) + { + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (cfg, + "exchange", + "CURRENCY", + &sc->currency)) + { + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + "exchange", + "CURRENCY"); + GNUNET_free (sc); + return NULL; + } + } plugin = GNUNET_new (struct TALER_WIRE_Plugin); plugin->cls = sc; plugin->amount_round = &sepa_amount_round; @@ -536,7 +625,7 @@ libtaler_plugin_wire_sepa_done (void *cls) struct TALER_WIRE_Plugin *plugin = cls; struct SepaClosure *sc = plugin->cls; - GNUNET_free (sc->currency); + GNUNET_free_non_null (sc->currency); GNUNET_free (sc); GNUNET_free (plugin); return NULL; diff --git a/src/wire/plugin_wire_template.c b/src/wire/plugin_wire_template.c index 2e9512e57..91b380c38 100644 --- a/src/wire/plugin_wire_template.c +++ b/src/wire/plugin_wire_template.c @@ -76,11 +76,15 @@ template_amount_round (void *cls, /** * Check if the given wire format JSON object is correctly formatted * + * @param cls the @e cls of this struct with the plugin-specific state * @param wire the JSON wire format object + * @param master_pub public key of the exchange to verify against * @return #GNUNET_YES if correctly formatted; #GNUNET_NO if not */ static int -template_wire_validate (const json_t *wire) +template_wire_validate (void *cls, + const json_t *wire, + const struct TALER_MasterPublicKeyP *master_pub) { GNUNET_break (0); return GNUNET_SYSERR; diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c index 1d19edf57..70cf82462 100644 --- a/src/wire/plugin_wire_test.c +++ b/src/wire/plugin_wire_test.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2016 GNUnet e.V. + Copyright (C) 2016 GNUnet e.V. & Inria TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -215,6 +215,8 @@ test_amount_round (void *cls, struct TestClosure *tc = cls; uint32_t delta; + if (NULL == tc->currency) + return GNUNET_SYSERR; /* not configured with currency */ if (0 != strcasecmp (amount->currency, tc->currency)) { @@ -235,11 +237,15 @@ test_amount_round (void *cls, * Right now, the only thing we require is a field * "account_number" which must contain a positive 53-bit integer. * + * @param cls the @e cls of this struct with the plugin-specific state * @param wire the JSON wire format object + * @param master_pub public key of the exchange to verify against * @return #GNUNET_YES if correctly formatted; #GNUNET_NO if not */ static int -test_wire_validate (const json_t *wire) +test_wire_validate (void *cls, + const json_t *wire, + const struct TALER_MasterPublicKeyP *master_pub) { json_error_t error; json_int_t account_no; @@ -368,7 +374,9 @@ test_prepare_wire_transfer (void *cls, struct TALER_WIRE_PrepareHandle *pth; if (GNUNET_YES != - test_wire_validate (wire)) + test_wire_validate (cls, + wire, + NULL)) { GNUNET_break (0); return NULL; @@ -456,6 +464,8 @@ test_execute_wire_transfer (void *cls, json_int_t account_no; struct BufFormatP bf; + if (NULL == tc->bank) + return NULL; /* not initialized with configuration, cannot do transfers */ if ( (buf_size <= sizeof (struct BufFormatP)) || ('\0' != buf[buf_size -1]) ) { @@ -476,7 +486,9 @@ test_execute_wire_transfer (void *cls, return NULL; } GNUNET_assert (GNUNET_YES == - test_wire_validate (wire)); + test_wire_validate (NULL, + wire, + NULL)); if (0 != json_unpack_ex (wire, &error, @@ -545,53 +557,56 @@ libtaler_plugin_wire_test_init (void *cls) struct TALER_WIRE_Plugin *plugin; char *uri; - if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_string (cfg, - "wire-test", - "BANK_URI", - &uri)) - { - GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "wire-test", - "BANK_URI"); - return NULL; - } tc = GNUNET_new (struct TestClosure); - if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_number (cfg, - "wire-test", - "BANK_ACCOUNT_NO_OUTGOING", - &tc->exchange_account_no)) + if (NULL != cfg) { - GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "wire-test", - "BANK_ACCOUNT_NO_OUTGOING"); - GNUNET_free (uri); - GNUNET_free (tc); - return NULL; + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (cfg, + "wire-test", + "BANK_URI", + &uri)) + { + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + "wire-test", + "BANK_URI"); + GNUNET_free (tc); + return NULL; + } + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_number (cfg, + "wire-test", + "BANK_ACCOUNT_NO_OUTGOING", + &tc->exchange_account_no)) + { + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + "wire-test", + "BANK_ACCOUNT_NO_OUTGOING"); + GNUNET_free (uri); + GNUNET_free (tc); + return NULL; + } + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (cfg, + "exchange", + "CURRENCY", + &tc->currency)) + { + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + "exchange", + "CURRENCY"); + GNUNET_free (uri); + GNUNET_free (tc); + return NULL; + } + tc->bank = TALER_BANK_init (uri); + if (NULL == tc->bank) + { + GNUNET_break (0); + GNUNET_free (tc->currency); + GNUNET_free (tc); + return NULL; + } } - if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_string (cfg, - "exchange", - "CURRENCY", - &tc->currency)) - { - GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "exchange", - "CURRENCY"); - GNUNET_free (uri); - GNUNET_free (tc); - return NULL; - } - tc->bank = TALER_BANK_init (uri); - if (NULL == tc->bank) - { - GNUNET_break (0); - GNUNET_free (tc->currency); - GNUNET_free (tc); - return NULL; - } - plugin = GNUNET_new (struct TALER_WIRE_Plugin); plugin->cls = tc; plugin->amount_round = &test_amount_round; @@ -621,8 +636,12 @@ libtaler_plugin_wire_test_done (void *cls) GNUNET_SCHEDULER_cancel (tc->bt); tc->bt = NULL; } - TALER_BANK_fini (tc->bank); - GNUNET_free (tc->currency); + if (NULL != tc->bank) + { + TALER_BANK_fini (tc->bank); + tc->bank = NULL; + } + GNUNET_free_non_null (tc->currency); GNUNET_free (tc); GNUNET_free (plugin); return NULL; diff --git a/src/wire/test_sepa_wireformat.c b/src/wire/test_sepa_wireformat.c index 5081cbe86..f016cf635 100644 --- a/src/wire/test_sepa_wireformat.c +++ b/src/wire/test_sepa_wireformat.c @@ -28,37 +28,37 @@ /* Valid SEPA data */ static const char * const valid_wire_str = "{ \"type\":\"SEPA\", \ -\"IBAN\":\"DE67830654080004822650\", \ -\"name\":\"GNUnet e.V.\", \ +\"iban\":\"DE67830654080004822650\", \ +\"receiver_name\":\"GNUnet e.V.\", \ \"bic\":\"GENODEF1SLR\", \ -\"r\":123456789, \ +\"salt\":\"123456789\", \ \"address\": \"foobar\"}"; /* IBAN has wrong country code */ static const char * const invalid_wire_str = "{ \"type\":\"SEPA\", \ -\"IBAN\":\"XX67830654080004822650\", \ -\"name\":\"GNUnet e.V.\", \ +\"iban\":\"XX67830654080004822650\", \ +\"receiver_name\":\"GNUnet e.V.\", \ \"bic\":\"GENODEF1SLR\", \ -\"r\":123456789, \ +\"salt\":\"123456789\", \ \"address\": \"foobar\"}"; /* IBAN has wrong checksum */ static const char * const invalid_wire_str2 = "{ \"type\":\"SEPA\", \ -\"IBAN\":\"DE67830654080004822651\", \ -\"name\":\"GNUnet e.V.\", \ +\"iban\":\"DE67830654080004822651\", \ +\"receiver_name\":\"GNUnet e.V.\", \ \"bic\":\"GENODEF1SLR\", \ -\"r\":123456789, \ +\"salt\":\"123456789\", \ \"address\": \"foobar\"}"; /* Unsupported wireformat type */ static const char * const unsupported_wire_str = "{ \"type\":\"unsupported\", \ -\"IBAN\":\"DE67830654080004822650\", \ -\"name\":\"GNUnet e.V.\", \ +\"iban\":\"DE67830654080004822650\", \ +\"receiver_name\":\"GNUnet e.V.\", \ \"bic\":\"GENODEF1SLR\", \ -\"r\":123456789, \ +\"salt\":\"123456789\", \ \"address\": \"foobar\"}"; @@ -85,16 +85,24 @@ main(int argc, GNUNET_assert (NULL != plugin); (void) memset(&error, 0, sizeof(error)); GNUNET_assert (NULL != (wire = json_loads (unsupported_wire_str, 0, NULL))); - GNUNET_assert (GNUNET_YES != plugin->wire_validate (wire)); + GNUNET_assert (GNUNET_YES != plugin->wire_validate (NULL, + wire, + NULL)); json_decref (wire); GNUNET_assert (NULL != (wire = json_loads (invalid_wire_str, 0, NULL))); - GNUNET_assert (GNUNET_NO == plugin->wire_validate (wire)); + GNUNET_assert (GNUNET_NO == plugin->wire_validate (NULL, + wire, + NULL)); json_decref (wire); GNUNET_assert (NULL != (wire = json_loads (invalid_wire_str2, 0, NULL))); - GNUNET_assert (GNUNET_NO == plugin->wire_validate (wire)); + GNUNET_assert (GNUNET_NO == plugin->wire_validate (NULL, + wire, + NULL)); json_decref (wire); GNUNET_assert (NULL != (wire = json_loads (valid_wire_str, 0, &error))); - ret = plugin->wire_validate (wire); + ret = plugin->wire_validate (NULL, + wire, + NULL); json_decref (wire); TALER_WIRE_plugin_unload (plugin); GNUNET_CONFIGURATION_destroy (cfg); From ae726ea31b8607eacd2896617251cc0cab253111 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 19 Mar 2016 15:54:21 +0100 Subject: [PATCH 17/91] remove duplicated JSON parsing code from exchange-lib (#4150) --- src/exchange-lib/Makefile.am | 1 - src/exchange-lib/exchange_api_admin.c | 1 - src/exchange-lib/exchange_api_common.c | 41 +- src/exchange-lib/exchange_api_deposit.c | 14 +- src/exchange-lib/exchange_api_deposit_wtid.c | 41 +- src/exchange-lib/exchange_api_handle.c | 96 ++-- src/exchange-lib/exchange_api_json.c | 541 ------------------ src/exchange-lib/exchange_api_json.h | 352 ------------ src/exchange-lib/exchange_api_refresh.c | 55 +- src/exchange-lib/exchange_api_refresh_link.c | 66 +-- src/exchange-lib/exchange_api_reserve.c | 69 +-- src/exchange-lib/exchange_api_wire.c | 23 +- src/exchange-lib/exchange_api_wire_deposits.c | 39 +- 13 files changed, 231 insertions(+), 1108 deletions(-) delete mode 100644 src/exchange-lib/exchange_api_json.c delete mode 100644 src/exchange-lib/exchange_api_json.h diff --git a/src/exchange-lib/Makefile.am b/src/exchange-lib/Makefile.am index a043e8601..10188c8fe 100644 --- a/src/exchange-lib/Makefile.am +++ b/src/exchange-lib/Makefile.am @@ -16,7 +16,6 @@ libtalerexchange_la_LDFLAGS = \ libtalerexchange_la_SOURCES = \ exchange_api_common.c exchange_api_common.h \ exchange_api_context.c exchange_api_context.h \ - exchange_api_json.c exchange_api_json.h \ exchange_api_handle.c exchange_api_handle.h \ exchange_api_admin.c \ exchange_api_deposit.c \ diff --git a/src/exchange-lib/exchange_api_admin.c b/src/exchange-lib/exchange_api_admin.c index 4ed761fb2..871a88a6b 100644 --- a/src/exchange-lib/exchange_api_admin.c +++ b/src/exchange-lib/exchange_api_admin.c @@ -27,7 +27,6 @@ #include #include "taler_json_lib.h" #include "taler_exchange_service.h" -#include "exchange_api_json.h" #include "exchange_api_context.h" #include "exchange_api_handle.h" #include "taler_signatures.h" diff --git a/src/exchange-lib/exchange_api_common.c b/src/exchange-lib/exchange_api_common.c index 805c3fc4e..6d2408d93 100644 --- a/src/exchange-lib/exchange_api_common.c +++ b/src/exchange-lib/exchange_api_common.c @@ -21,7 +21,7 @@ */ #include "platform.h" #include "exchange_api_common.h" -#include "exchange_api_json.h" +#include "taler_json_lib.h" #include "exchange_api_context.h" #include "exchange_api_handle.h" #include "taler_signatures.h" @@ -66,24 +66,25 @@ TALER_EXCHANGE_verify_coin_history_ (const char *currency, void *details; size_t details_size; const char *type; - struct MAJ_Specification spec[] = { - MAJ_spec_amount ("amount", + struct GNUNET_JSON_Specification spec[] = { + TALER_JSON_spec_amount ("amount", &amount), - MAJ_spec_string ("type", + GNUNET_JSON_spec_string ("type", &type), - MAJ_spec_fixed_auto ("signature", + GNUNET_JSON_spec_fixed_auto ("signature", &sig), - MAJ_spec_varsize ("details", + GNUNET_JSON_spec_varsize ("details", &details, &details_size), - MAJ_spec_end + GNUNET_JSON_spec_end() }; transaction = json_array_get (history, off); if (GNUNET_OK != - MAJ_parse_json (transaction, - spec)) + GNUNET_JSON_parse (transaction, + spec, + NULL, NULL)) { GNUNET_break_op (0); return GNUNET_SYSERR; @@ -97,14 +98,14 @@ TALER_EXCHANGE_verify_coin_history_ (const char *currency, if (details_size != sizeof (struct TALER_DepositRequestPS)) { GNUNET_break_op (0); - MAJ_parse_free (spec); + GNUNET_JSON_parse_free (spec); return GNUNET_SYSERR; } dr = (const struct TALER_DepositRequestPS *) details; if (details_size != ntohl (dr->purpose.size)) { GNUNET_break_op (0); - MAJ_parse_free (spec); + GNUNET_JSON_parse_free (spec); return GNUNET_SYSERR; } if (GNUNET_OK != @@ -114,7 +115,7 @@ TALER_EXCHANGE_verify_coin_history_ (const char *currency, &coin_pub->eddsa_pub)) { GNUNET_break_op (0); - MAJ_parse_free (spec); + GNUNET_JSON_parse_free (spec); return GNUNET_SYSERR; } @@ -125,7 +126,7 @@ TALER_EXCHANGE_verify_coin_history_ (const char *currency, &amount)) { GNUNET_break (0); - MAJ_parse_free (spec); + GNUNET_JSON_parse_free (spec); return GNUNET_SYSERR; } } @@ -138,14 +139,14 @@ TALER_EXCHANGE_verify_coin_history_ (const char *currency, if (details_size != sizeof (struct TALER_RefreshMeltCoinAffirmationPS)) { GNUNET_break_op (0); - MAJ_parse_free (spec); + GNUNET_JSON_parse_free (spec); return GNUNET_SYSERR; } rm = (const struct TALER_RefreshMeltCoinAffirmationPS *) details; if (details_size != ntohl (rm->purpose.size)) { GNUNET_break_op (0); - MAJ_parse_free (spec); + GNUNET_JSON_parse_free (spec); return GNUNET_SYSERR; } if (GNUNET_OK != @@ -155,7 +156,7 @@ TALER_EXCHANGE_verify_coin_history_ (const char *currency, &coin_pub->eddsa_pub)) { GNUNET_break_op (0); - MAJ_parse_free (spec); + GNUNET_JSON_parse_free (spec); return GNUNET_SYSERR; } TALER_amount_ntoh (&rm_amount, @@ -164,7 +165,7 @@ TALER_EXCHANGE_verify_coin_history_ (const char *currency, &amount)) { GNUNET_break_op (0); - MAJ_parse_free (spec); + GNUNET_JSON_parse_free (spec); return GNUNET_SYSERR; } } @@ -172,7 +173,7 @@ TALER_EXCHANGE_verify_coin_history_ (const char *currency, { /* signature not supported, new version on server? */ GNUNET_break_op (0); - MAJ_parse_free (spec); + GNUNET_JSON_parse_free (spec); return GNUNET_SYSERR; } if (GNUNET_OK != @@ -182,10 +183,10 @@ TALER_EXCHANGE_verify_coin_history_ (const char *currency, { /* overflow in history already!? inconceivable! Bad exchange! */ GNUNET_break_op (0); - MAJ_parse_free (spec); + GNUNET_JSON_parse_free (spec); return GNUNET_SYSERR; } - MAJ_parse_free (spec); + GNUNET_JSON_parse_free (spec); } return GNUNET_OK; } diff --git a/src/exchange-lib/exchange_api_deposit.c b/src/exchange-lib/exchange_api_deposit.c index ef7a59e69..8ec45a23f 100644 --- a/src/exchange-lib/exchange_api_deposit.c +++ b/src/exchange-lib/exchange_api_deposit.c @@ -29,7 +29,6 @@ #include "taler_json_lib.h" #include "taler_exchange_service.h" #include "exchange_api_common.h" -#include "exchange_api_json.h" #include "exchange_api_context.h" #include "exchange_api_handle.h" #include "taler_signatures.h" @@ -109,15 +108,16 @@ verify_deposit_signature_ok (const struct TALER_EXCHANGE_DepositHandle *dh, struct TALER_ExchangeSignatureP exchange_sig; struct TALER_ExchangePublicKeyP exchange_pub; const struct TALER_EXCHANGE_Keys *key_state; - struct MAJ_Specification spec[] = { - MAJ_spec_fixed_auto ("sig", &exchange_sig), - MAJ_spec_fixed_auto ("pub", &exchange_pub), - MAJ_spec_end + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("sig", &exchange_sig), + GNUNET_JSON_spec_fixed_auto ("pub", &exchange_pub), + GNUNET_JSON_spec_end() }; if (GNUNET_OK != - MAJ_parse_json (json, - spec)) + GNUNET_JSON_parse (json, + spec, + NULL, NULL)) { GNUNET_break_op (0); return GNUNET_SYSERR; diff --git a/src/exchange-lib/exchange_api_deposit_wtid.c b/src/exchange-lib/exchange_api_deposit_wtid.c index f3b5d2c0d..1ad1dd019 100644 --- a/src/exchange-lib/exchange_api_deposit_wtid.c +++ b/src/exchange-lib/exchange_api_deposit_wtid.c @@ -25,9 +25,9 @@ #include /* just for HTTP status codes */ #include #include +#include "taler_json_lib.h" #include "taler_exchange_service.h" #include "exchange_api_common.h" -#include "exchange_api_json.h" #include "exchange_api_context.h" #include "exchange_api_handle.h" #include "taler_signatures.h" @@ -98,15 +98,16 @@ verify_deposit_wtid_signature_ok (const struct TALER_EXCHANGE_DepositWtidHandle struct TALER_ExchangeSignatureP exchange_sig; struct TALER_ExchangePublicKeyP exchange_pub; const struct TALER_EXCHANGE_Keys *key_state; - struct MAJ_Specification spec[] = { - MAJ_spec_fixed_auto ("exchange_sig", &exchange_sig), - MAJ_spec_fixed_auto ("exchange_pub", &exchange_pub), - MAJ_spec_end + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("exchange_sig", &exchange_sig), + GNUNET_JSON_spec_fixed_auto ("exchange_pub", &exchange_pub), + GNUNET_JSON_spec_end() }; if (GNUNET_OK != - MAJ_parse_json (json, - spec)) + GNUNET_JSON_parse (json, + spec, + NULL, NULL)) { GNUNET_break_op (0); return GNUNET_SYSERR; @@ -161,16 +162,17 @@ handle_deposit_wtid_finished (void *cls, break; case MHD_HTTP_OK: { - struct MAJ_Specification spec[] = { - MAJ_spec_fixed_auto ("wtid", &dwh->depconf.wtid), - MAJ_spec_absolute_time ("execution_time", &execution_time), - MAJ_spec_amount ("coin_contribution", &coin_contribution_s), - MAJ_spec_end + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("wtid", &dwh->depconf.wtid), + GNUNET_JSON_spec_absolute_time ("execution_time", &execution_time), + TALER_JSON_spec_amount ("coin_contribution", &coin_contribution_s), + GNUNET_JSON_spec_end() }; if (GNUNET_OK != - MAJ_parse_json (json, - spec)) + GNUNET_JSON_parse (json, + spec, + NULL, NULL)) { GNUNET_break_op (0); response_code = 0; @@ -193,14 +195,15 @@ handle_deposit_wtid_finished (void *cls, case MHD_HTTP_ACCEPTED: { /* Transaction known, but not executed yet */ - struct MAJ_Specification spec[] = { - MAJ_spec_absolute_time ("execution_time", &execution_time), - MAJ_spec_end + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_absolute_time ("execution_time", &execution_time), + GNUNET_JSON_spec_end() }; if (GNUNET_OK != - MAJ_parse_json (json, - spec)) + GNUNET_JSON_parse (json, + spec, + NULL, NULL)) { GNUNET_break_op (0); response_code = 0; diff --git a/src/exchange-lib/exchange_api_handle.c b/src/exchange-lib/exchange_api_handle.c index d4b3e4deb..aaca8bac1 100644 --- a/src/exchange-lib/exchange_api_handle.c +++ b/src/exchange-lib/exchange_api_handle.c @@ -22,13 +22,11 @@ */ #include "platform.h" #include -#include -#include #include +#include "taler_json_lib.h" #include "taler_exchange_service.h" #include "taler_signatures.h" #include "exchange_api_context.h" -#include "exchange_api_json.h" #include "exchange_api_handle.h" @@ -189,23 +187,24 @@ parse_json_signkey (struct TALER_EXCHANGE_SigningPublicKey *sign_key, struct GNUNET_TIME_Absolute valid_from; struct GNUNET_TIME_Absolute valid_until; struct GNUNET_TIME_Absolute valid_legal; - struct MAJ_Specification spec[] = { - MAJ_spec_fixed_auto ("master_sig", + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("master_sig", &sig), - MAJ_spec_fixed_auto ("key", + GNUNET_JSON_spec_fixed_auto ("key", &sign_key_issue.signkey_pub), - MAJ_spec_absolute_time ("stamp_start", + GNUNET_JSON_spec_absolute_time ("stamp_start", &valid_from), - MAJ_spec_absolute_time ("stamp_expire", + GNUNET_JSON_spec_absolute_time ("stamp_expire", &valid_until), - MAJ_spec_absolute_time ("stamp_end", + GNUNET_JSON_spec_absolute_time ("stamp_end", &valid_legal), - MAJ_spec_end + GNUNET_JSON_spec_end() }; if (GNUNET_OK != - MAJ_parse_json (sign_key_obj, - spec)) + GNUNET_JSON_parse (sign_key_obj, + spec, + NULL, NULL)) { GNUNET_break_op (0); return GNUNET_SYSERR; @@ -264,33 +263,33 @@ parse_json_denomkey (struct TALER_EXCHANGE_DenomPublicKey *denom_key, struct GNUNET_CRYPTO_rsa_PublicKey *pk; struct GNUNET_CRYPTO_EddsaSignature sig; - struct MAJ_Specification spec[] = { - MAJ_spec_fixed_auto ("master_sig", + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("master_sig", &sig), - MAJ_spec_absolute_time ("stamp_expire_deposit", + GNUNET_JSON_spec_absolute_time ("stamp_expire_deposit", &deposit_valid_until), - MAJ_spec_absolute_time ("stamp_expire_withdraw", + GNUNET_JSON_spec_absolute_time ("stamp_expire_withdraw", &withdraw_valid_until), - MAJ_spec_absolute_time ("stamp_start", + GNUNET_JSON_spec_absolute_time ("stamp_start", &valid_from), - MAJ_spec_absolute_time ("stamp_expire_legal", + GNUNET_JSON_spec_absolute_time ("stamp_expire_legal", &expire_legal), - MAJ_spec_amount ("value", + TALER_JSON_spec_amount ("value", &value), - MAJ_spec_amount ("fee_withdraw", + TALER_JSON_spec_amount ("fee_withdraw", &fee_withdraw), - MAJ_spec_amount ("fee_deposit", + TALER_JSON_spec_amount ("fee_deposit", &fee_deposit), - MAJ_spec_amount ("fee_refresh", + TALER_JSON_spec_amount ("fee_refresh", &fee_refresh), - MAJ_spec_rsa_public_key ("denom_pub", + GNUNET_JSON_spec_rsa_public_key ("denom_pub", &pk), - MAJ_spec_end + GNUNET_JSON_spec_end() }; if (GNUNET_OK != - MAJ_parse_json (denom_key_obj, - spec)) + GNUNET_JSON_parse (denom_key_obj, + spec, NULL, NULL)) { GNUNET_break_op (0); return GNUNET_SYSERR; @@ -337,7 +336,7 @@ parse_json_denomkey (struct TALER_EXCHANGE_DenomPublicKey *denom_key, return GNUNET_OK; EXITIF_exit: - MAJ_parse_free (spec); + GNUNET_JSON_parse_free (spec); return GNUNET_SYSERR; } @@ -362,18 +361,19 @@ parse_json_auditor (struct TALER_EXCHANGE_AuditorInformation *auditor, unsigned int off; unsigned int i; struct TALER_ExchangeKeyValidityPS kv; - struct MAJ_Specification spec[] = { - MAJ_spec_fixed_auto ("auditor_pub", + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("auditor_pub", &auditor->auditor_pub), - MAJ_spec_json ("denomination_keys", + GNUNET_JSON_spec_json ("denomination_keys", &keys), - MAJ_spec_end + GNUNET_JSON_spec_end() }; auditor->auditor_url = NULL; /* #3987 */ if (GNUNET_OK != - MAJ_parse_json (auditor_obj, - spec)) + GNUNET_JSON_parse (auditor_obj, + spec, + NULL, NULL)) { GNUNET_break_op (0); return GNUNET_SYSERR; @@ -391,17 +391,18 @@ parse_json_auditor (struct TALER_EXCHANGE_AuditorInformation *auditor, struct GNUNET_HashCode denom_h; const struct TALER_EXCHANGE_DenomPublicKey *dk; unsigned int j; - struct MAJ_Specification spec[] = { - MAJ_spec_fixed_auto ("denom_pub_h", + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("denom_pub_h", &denom_h), - MAJ_spec_fixed_auto ("auditor_sig", + GNUNET_JSON_spec_fixed_auto ("auditor_sig", &auditor_sig), - MAJ_spec_end + GNUNET_JSON_spec_end() }; if (GNUNET_OK != - MAJ_parse_json (key, - spec)) + GNUNET_JSON_parse (key, + spec, + NULL, NULL)) { GNUNET_break_op (0); continue; @@ -476,21 +477,22 @@ decode_keys_json (json_t *resp_obj, hash_context = GNUNET_CRYPTO_hash_context_start (); /* parse the master public key and issue date of the response */ { - struct MAJ_Specification spec[] = { - MAJ_spec_fixed_auto ("master_public_key", + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("master_public_key", &key_data->master_pub), - MAJ_spec_fixed_auto ("eddsa_sig", + GNUNET_JSON_spec_fixed_auto ("eddsa_sig", &sig), - MAJ_spec_fixed_auto ("eddsa_pub", + GNUNET_JSON_spec_fixed_auto ("eddsa_pub", &pub), - MAJ_spec_absolute_time ("list_issue_date", + GNUNET_JSON_spec_absolute_time ("list_issue_date", &list_issue_date), - MAJ_spec_end + GNUNET_JSON_spec_end() }; EXITIF (GNUNET_OK != - MAJ_parse_json (resp_obj, - spec)); + GNUNET_JSON_parse (resp_obj, + spec, + NULL, NULL)); } /* parse the signing keys */ diff --git a/src/exchange-lib/exchange_api_json.c b/src/exchange-lib/exchange_api_json.c deleted file mode 100644 index d6c54be5b..000000000 --- a/src/exchange-lib/exchange_api_json.c +++ /dev/null @@ -1,541 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2014, 2015 GNUnet e.V. - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU Affero General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License along with - TALER; see the file COPYING. If not, If not, see -*/ -/** - * @file exchange-lib/exchange_api_json.c - * @brief functions to parse incoming requests (JSON snippets) - * @author Florian Dold - * @author Benedikt Mueller - * @author Christian Grothoff - */ -#include "platform.h" -#include "exchange_api_json.h" -#include "taler_json_lib.h" - -/** - * Navigate and parse data in a JSON tree. - * - * @param root the JSON node to start the navigation at. - * @param spec parse specification array - * @return offset in @a spec where parsing failed, -1 on success (!) - */ -static int -parse_json (json_t *root, - struct MAJ_Specification *spec) -{ - int i; - json_t *pos; /* what's our current position? */ - - pos = root; - for (i=0;MAJ_CMD_END != spec[i].cmd;i++) - { - pos = json_object_get (root, - spec[i].field); - if (NULL == pos) - { - GNUNET_break_op (0); - return i; - } - switch (spec[i].cmd) - { - case MAJ_CMD_END: - GNUNET_assert (0); - return i; - case MAJ_CMD_AMOUNT: - { - struct GNUNET_JSON_Specification nspec[] = { - TALER_JSON_spec_amount (NULL, spec[i].details.amount), - GNUNET_JSON_spec_end () - }; - - if (GNUNET_OK != - GNUNET_JSON_parse (pos, - nspec, - NULL, NULL)) - { - GNUNET_break_op (0); - return i; - } - break; - } - case MAJ_CMD_TIME_ABSOLUTE: - { - struct GNUNET_JSON_Specification nspec[] = { - GNUNET_JSON_spec_absolute_time (NULL, spec[i].details.abs_time), - GNUNET_JSON_spec_end () - }; - - if (GNUNET_OK != - GNUNET_JSON_parse (pos, - nspec, - NULL, NULL)) - { - GNUNET_break_op (0); - return i; - } - break; - } - case MAJ_CMD_STRING: - { - const char *str; - - str = json_string_value (pos); - if (NULL == str) - { - GNUNET_break_op (0); - return i; - } - *spec[i].details.strptr = str; - } - break; - - case MAJ_CMD_BINARY_FIXED: - { - const char *str; - int res; - - str = json_string_value (pos); - if (NULL == str) - { - GNUNET_break_op (0); - return i; - } - res = GNUNET_STRINGS_string_to_data (str, strlen (str), - spec[i].details.fixed_data.dest, - spec[i].details.fixed_data.dest_size); - if (GNUNET_OK != res) - { - GNUNET_break_op (0); - return i; - } - } - break; - - case MAJ_CMD_BINARY_VARIABLE: - { - const char *str; - size_t size; - void *data; - int res; - - str = json_string_value (pos); - if (NULL == str) - { - GNUNET_break_op (0); - return i; - } - size = (strlen (str) * 5) / 8; - if (size >= 1024) - { - GNUNET_break_op (0); - return i; - } - data = GNUNET_malloc (size); - res = GNUNET_STRINGS_string_to_data (str, - strlen (str), - data, - size); - if (GNUNET_OK != res) - { - GNUNET_break_op (0); - GNUNET_free (data); - return i; - } - *spec[i].details.variable_data.dest_p = data; - *spec[i].details.variable_data.dest_size_p = size; - } - break; - - case MAJ_CMD_RSA_PUBLIC_KEY: - { - size_t size; - const char *str; - int res; - void *buf; - - str = json_string_value (pos); - if (NULL == str) - { - GNUNET_break_op (0); - return i; - } - size = (strlen (str) * 5) / 8; - buf = GNUNET_malloc (size); - res = GNUNET_STRINGS_string_to_data (str, - strlen (str), - buf, - size); - if (GNUNET_OK != res) - { - GNUNET_free (buf); - GNUNET_break_op (0); - return i; - } - *spec[i].details.rsa_public_key - = GNUNET_CRYPTO_rsa_public_key_decode (buf, - size); - GNUNET_free (buf); - if (NULL == spec[i].details.rsa_public_key) - { - GNUNET_break_op (0); - return i; - } - } - break; - - case MAJ_CMD_RSA_SIGNATURE: - { - size_t size; - const char *str; - int res; - void *buf; - - str = json_string_value (pos); - if (NULL == str) - { - GNUNET_break_op (0); - return i; - } - size = (strlen (str) * 5) / 8; - buf = GNUNET_malloc (size); - res = GNUNET_STRINGS_string_to_data (str, - strlen (str), - buf, - size); - if (GNUNET_OK != res) - { - GNUNET_free (buf); - GNUNET_break_op (0); - return i; - } - *spec[i].details.rsa_signature - = GNUNET_CRYPTO_rsa_signature_decode (buf, - size); - GNUNET_free (buf); - if (NULL == spec[i].details.rsa_signature) - return i; - } - break; - - case MAJ_CMD_UINT16: - { - json_int_t val; - - if (! json_is_integer (pos)) - { - GNUNET_break_op (0); - return i; - } - val = json_integer_value (pos); - if ( (0 > val) || (val > UINT16_MAX) ) - { - GNUNET_break_op (0); - return i; - } - *spec[i].details.u16 = (uint16_t) val; - } - break; - - case MAJ_CMD_UINT64: - { - json_int_t val; - - if (! json_is_integer (pos)) - { - GNUNET_break_op (0); - return i; - } - val = json_integer_value (pos); - *spec[i].details.u64 = (uint64_t) val; - } - break; - - case MAJ_CMD_JSON_OBJECT: - { - if (! (json_is_object (pos) || json_is_array (pos)) ) - { - GNUNET_break_op (0); - return i; - } - json_incref (pos); - *spec[i].details.obj = pos; - } - break; - - default: - GNUNET_break (0); - return i; - } - } - return -1; /* all OK! */ -} - - -/** - * Free all elements allocated during a - * #MAJ_parse_json() operation. - * - * @param spec specification of the parse operation - * @param end number of elements in @a spec to process - */ -static void -parse_free (struct MAJ_Specification *spec, - int end) -{ - int i; - - for (i=0;i -*/ -/** - * @file exchange-lib/exchange_api_json.h - * @brief functions to parse incoming requests (JSON snippets) - * @author Florian Dold - * @author Benedikt Mueller - * @author Christian Grothoff - */ -#include "platform.h" -#include -#include "taler_util.h" -#include - - -/** - * Enumeration with the various commands for the - * #MAJ_parse_json interpreter. - */ -enum MAJ_Command -{ - - /** - * End of command list. - */ - MAJ_CMD_END, - - /** - * Parse amount at current position. - */ - MAJ_CMD_AMOUNT, - - /** - * Parse absolute time at current position. - */ - MAJ_CMD_TIME_ABSOLUTE, - - /** - * Parse fixed binary value at current position. - */ - MAJ_CMD_BINARY_FIXED, - - /** - * Parse variable-size binary value at current position. - */ - MAJ_CMD_BINARY_VARIABLE, - - /** - * Parse RSA public key at current position. - */ - MAJ_CMD_RSA_PUBLIC_KEY, - - /** - * Parse RSA signature at current position. - */ - MAJ_CMD_RSA_SIGNATURE, - - /** - * Parse `const char *` JSON string at current position. - */ - MAJ_CMD_STRING, - - /** - * Parse `uint16_t` integer at the current position. - */ - MAJ_CMD_UINT16, - - /** - * Parse `uint64_t` integer at the current position. - */ - MAJ_CMD_UINT64, - - /** - * Parse JSON object at the current position. - */ - MAJ_CMD_JSON_OBJECT, - - /** - * Parse ??? at current position. - */ - MAJ_CMD_C - -}; - - -/** - * @brief Entry in parser specification for #MAJ_parse_json. - */ -struct MAJ_Specification -{ - - /** - * Command to execute. - */ - enum MAJ_Command cmd; - - /** - * Name of the field to access. - */ - const char *field; - - /** - * Further details for the command. - */ - union { - - /** - * Where to store amount for #MAJ_CMD_AMOUNT. - */ - struct TALER_Amount *amount; - - /** - * Where to store time, for #MAJ_CMD_TIME_ABSOLUTE. - */ - struct GNUNET_TIME_Absolute *abs_time; - - /** - * Where to write binary data, for #MAJ_CMD_BINARY_FIXED. - */ - struct { - /** - * Where to write the data. - */ - void *dest; - - /** - * How many bytes to write to @e dest. - */ - size_t dest_size; - - } fixed_data; - - /** - * Where to write binary data, for #MAJ_CMD_BINARY_VARIABLE. - */ - struct { - /** - * Where to store the pointer with the data (is allocated). - */ - void **dest_p; - - /** - * Where to store the number of bytes allocated at `*dest`. - */ - size_t *dest_size_p; - - } variable_data; - - /** - * Where to store the RSA public key for #MAJ_CMD_RSA_PUBLIC_KEY - */ - struct GNUNET_CRYPTO_rsa_PublicKey **rsa_public_key; - - /** - * Where to store the RSA signature for #MAJ_CMD_RSA_SIGNATURE - */ - struct GNUNET_CRYPTO_rsa_Signature **rsa_signature; - - /** - * Details for #MAJ_CMD_EDDSA_SIGNATURE - */ - struct { - - /** - * Where to store the purpose. - */ - struct GNUNET_CRYPTO_EccSignaturePurpose **purpose_p; - - /** - * Key to verify the signature against. - */ - const struct GNUNET_CRYPTO_EddsaPublicKey *pub_key; - - } eddsa_signature; - - /** - * Where to store a pointer to the string. - */ - const char **strptr; - - /** - * Where to store 16-bit integer. - */ - uint16_t *u16; - - /** - * Where to store 64-bit integer. - */ - uint64_t *u64; - - /** - * Where to store a JSON object. - */ - json_t **obj; - - } details; - -}; - - -/** - * Navigate and parse data in a JSON tree. - * - * @param root the JSON node to start the navigation at. - * @param spec parse specification array - * @return #GNUNET_OK on success, #GNUNET_SYSERR on error - */ -int -MAJ_parse_json (const json_t *root, - struct MAJ_Specification *spec); - - -/** - * Free all elements allocated during a - * #MAJ_parse_json() operation. - * - * @param spec specification of the parse operation - */ -void -MAJ_parse_free (struct MAJ_Specification *spec); - - -/** - * End of a parser specification. - */ -#define MAJ_spec_end { .cmd = MAJ_CMD_END } - -/** - * Fixed size object (in network byte order, encoded using Crockford - * Base32hex encoding). - * - * @param name name of the JSON field - * @param obj pointer where to write the data (type of `*obj` will determine size) - */ -#define MAJ_spec_fixed_auto(name,obj) { .cmd = MAJ_CMD_BINARY_FIXED, .field = name, .details.fixed_data.dest = obj, .details.fixed_data.dest_size = sizeof (*obj) } - - -/** - * Variable size object (in network byte order, encoded using Crockford - * Base32hex encoding). - * - * @param name name of the JSON field - * @param obj pointer where to write the data (a `void **`) - * @param size where to store the number of bytes allocated for @a obj (of type `size_t *` - */ -#define MAJ_spec_varsize(name,obj,size) { .cmd = MAJ_CMD_BINARY_VARIABLE, .field = name, .details.variable_data.dest_p = obj, .details.variable_data.dest_size_p = size } - - -/** - * The expected field stores a string. - * - * @param name name of the JSON field - * @param strptr where to store a pointer to the field - */ -struct MAJ_Specification -MAJ_spec_string (const char *name, - const char **strptr); - - -/** - * Absolute time. - * - * @param name name of the JSON field - * @param[out] at where to store the absolute time found under @a name - */ -struct MAJ_Specification -MAJ_spec_absolute_time (const char *name, - struct GNUNET_TIME_Absolute *at); - - -/** - * 16-bit integer. - * - * @param name name of the JSON field - * @param[out] u16 where to store the integer found under @a name - */ -struct MAJ_Specification -MAJ_spec_uint16 (const char *name, - uint16_t *u16); - - -/** - * 64-bit integer. - * - * @param name name of the JSON field - * @param[out] u64 where to store the integer found under @a name - */ -struct MAJ_Specification -MAJ_spec_uint64 (const char *name, - uint64_t *u64); - - -/** - * JSON object. - * - * @param name name of the JSON field - * @param[out] jsonp where to store the JSON found under @a name - */ -struct MAJ_Specification -MAJ_spec_json (const char *name, - json_t **jsonp); - - -/** - * Specification for parsing an amount value. - * - * @param name name of the JSON field - * @param amount where to store the amount under @a name - */ -struct MAJ_Specification -MAJ_spec_amount (const char *name, - struct TALER_Amount *amount); - - -/** - * Specification for parsing an RSA public key. - * - * @param name name of the JSON field - * @param pk where to store the RSA key found under @a name - */ -struct MAJ_Specification -MAJ_spec_rsa_public_key (const char *name, - struct GNUNET_CRYPTO_rsa_PublicKey **pk); - - -/** - * Specification for parsing an RSA signature. - * - * @param name name of the JSON field - * @param sig where to store the RSA signature found under @a name - */ -struct MAJ_Specification -MAJ_spec_rsa_signature (const char *name, - struct GNUNET_CRYPTO_rsa_Signature **sig); - - - - -/* end of exchange_api_json.h */ diff --git a/src/exchange-lib/exchange_api_refresh.c b/src/exchange-lib/exchange_api_refresh.c index bcec13544..2949cf1e8 100644 --- a/src/exchange-lib/exchange_api_refresh.c +++ b/src/exchange-lib/exchange_api_refresh.c @@ -28,7 +28,6 @@ #include "taler_json_lib.h" #include "taler_exchange_service.h" #include "exchange_api_common.h" -#include "exchange_api_json.h" #include "exchange_api_context.h" #include "exchange_api_handle.h" #include "taler_signatures.h" @@ -1086,17 +1085,18 @@ verify_refresh_melt_signature_ok (struct TALER_EXCHANGE_RefreshMeltHandle *rmh, struct TALER_ExchangeSignatureP exchange_sig; struct TALER_ExchangePublicKeyP exchange_pub; const struct TALER_EXCHANGE_Keys *key_state; - struct MAJ_Specification spec[] = { - MAJ_spec_fixed_auto ("exchange_sig", &exchange_sig), - MAJ_spec_fixed_auto ("exchange_pub", &exchange_pub), - MAJ_spec_uint16 ("noreveal_index", noreveal_index), - MAJ_spec_end + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("exchange_sig", &exchange_sig), + GNUNET_JSON_spec_fixed_auto ("exchange_pub", &exchange_pub), + GNUNET_JSON_spec_uint16 ("noreveal_index", noreveal_index), + GNUNET_JSON_spec_end() }; struct TALER_RefreshMeltConfirmationPS confirm; if (GNUNET_OK != - MAJ_parse_json (json, - spec)) + GNUNET_JSON_parse (json, + spec, + NULL, NULL)) { GNUNET_break_op (0); return GNUNET_SYSERR; @@ -1156,19 +1156,20 @@ verify_refresh_melt_signature_forbidden (struct TALER_EXCHANGE_RefreshMeltHandle struct TALER_Amount total; struct TALER_CoinSpendPublicKeyP coin_pub; unsigned int i; - struct MAJ_Specification spec[] = { - MAJ_spec_json ("history", &history), - MAJ_spec_fixed_auto ("coin_pub", &coin_pub), - MAJ_spec_amount ("original_value", &original_value), - MAJ_spec_amount ("requested_value", &melt_value_with_fee), - MAJ_spec_end + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_json ("history", &history), + GNUNET_JSON_spec_fixed_auto ("coin_pub", &coin_pub), + TALER_JSON_spec_amount ("original_value", &original_value), + TALER_JSON_spec_amount ("requested_value", &melt_value_with_fee), + GNUNET_JSON_spec_end() }; const struct MeltedCoin *mc; /* parse JSON reply */ if (GNUNET_OK != - MAJ_parse_json (json, - spec)) + GNUNET_JSON_parse (json, + spec, + NULL, NULL)) { GNUNET_break_op (0); return GNUNET_SYSERR; @@ -1731,14 +1732,15 @@ refresh_reveal_ok (struct TALER_EXCHANGE_RefreshRevealHandle *rrh, { unsigned int i; json_t *jsona; - struct MAJ_Specification spec[] = { - MAJ_spec_json ("ev_sigs", &jsona), - MAJ_spec_end + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_json ("ev_sigs", &jsona), + GNUNET_JSON_spec_end() }; if (GNUNET_OK != - MAJ_parse_json (json, - spec)) + GNUNET_JSON_parse (json, + spec, + NULL, NULL)) { GNUNET_break_op (0); return GNUNET_SYSERR; @@ -1765,9 +1767,9 @@ refresh_reveal_ok (struct TALER_EXCHANGE_RefreshRevealHandle *rrh, struct TALER_CoinSpendPublicKeyP coin_pub; struct GNUNET_HashCode coin_hash; - struct MAJ_Specification spec[] = { - MAJ_spec_rsa_signature ("ev_sig", &blind_sig), - MAJ_spec_end + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_rsa_signature ("ev_sig", &blind_sig), + GNUNET_JSON_spec_end() }; fc = &rrh->md->fresh_coins[rrh->noreveal_index][i]; @@ -1776,8 +1778,9 @@ refresh_reveal_ok (struct TALER_EXCHANGE_RefreshRevealHandle *rrh, GNUNET_assert (NULL != jsonai); if (GNUNET_OK != - MAJ_parse_json (jsonai, - spec)) + GNUNET_JSON_parse (jsonai, + spec, + NULL, NULL)) { GNUNET_break_op (0); return GNUNET_SYSERR; diff --git a/src/exchange-lib/exchange_api_refresh_link.c b/src/exchange-lib/exchange_api_refresh_link.c index 9576916bc..41d421f58 100644 --- a/src/exchange-lib/exchange_api_refresh_link.c +++ b/src/exchange-lib/exchange_api_refresh_link.c @@ -21,11 +21,10 @@ */ #include "platform.h" #include -#include #include /* just for HTTP status codes */ #include #include "taler_exchange_service.h" -#include "exchange_api_json.h" +#include "taler_json_lib.h" #include "exchange_api_context.h" #include "exchange_api_handle.h" #include "taler_signatures.h" @@ -101,11 +100,11 @@ parse_refresh_link_coin (const struct TALER_EXCHANGE_RefreshLinkHandle *rlh, size_t link_enc_size; struct GNUNET_CRYPTO_rsa_Signature *bsig; struct GNUNET_CRYPTO_rsa_PublicKey *rpub; - struct MAJ_Specification spec[] = { - MAJ_spec_varsize ("link_enc", &link_enc, &link_enc_size), - MAJ_spec_rsa_public_key ("denom_pub", &rpub), - MAJ_spec_rsa_signature ("ev_sig", &bsig), - MAJ_spec_end + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_varsize ("link_enc", &link_enc, &link_enc_size), + GNUNET_JSON_spec_rsa_public_key ("denom_pub", &rpub), + GNUNET_JSON_spec_rsa_signature ("ev_sig", &bsig), + GNUNET_JSON_spec_end() }; struct TALER_RefreshLinkEncrypted *rle; struct TALER_RefreshLinkDecrypted *rld; @@ -113,8 +112,9 @@ parse_refresh_link_coin (const struct TALER_EXCHANGE_RefreshLinkHandle *rlh, /* parse reply */ if (GNUNET_OK != - MAJ_parse_json (json, - spec)) + GNUNET_JSON_parse (json, + spec, + NULL, NULL)) { GNUNET_break_op (0); return GNUNET_SYSERR; @@ -126,7 +126,7 @@ parse_refresh_link_coin (const struct TALER_EXCHANGE_RefreshLinkHandle *rlh, if (NULL == rle) { GNUNET_break_op (0); - MAJ_parse_free (spec); + GNUNET_JSON_parse_free (spec); return GNUNET_SYSERR; } if (GNUNET_OK != @@ -136,7 +136,7 @@ parse_refresh_link_coin (const struct TALER_EXCHANGE_RefreshLinkHandle *rlh, &secret)) { GNUNET_break_op (0); - MAJ_parse_free (spec); + GNUNET_JSON_parse_free (spec); return GNUNET_SYSERR; } rld = TALER_refresh_decrypt (rle, @@ -144,7 +144,7 @@ parse_refresh_link_coin (const struct TALER_EXCHANGE_RefreshLinkHandle *rlh, if (NULL == rld) { GNUNET_break_op (0); - MAJ_parse_free (spec); + GNUNET_JSON_parse_free (spec); return GNUNET_SYSERR; } @@ -158,7 +158,7 @@ parse_refresh_link_coin (const struct TALER_EXCHANGE_RefreshLinkHandle *rlh, /* clean up */ GNUNET_free (rld); pub->rsa_public_key = GNUNET_CRYPTO_rsa_public_key_dup (rpub); - MAJ_parse_free (spec); + GNUNET_JSON_parse_free (spec); return GNUNET_OK; } @@ -199,15 +199,16 @@ parse_refresh_link_ok (struct TALER_EXCHANGE_RefreshLinkHandle *rlh, for (session=0;session #include #include "taler_exchange_service.h" -#include "exchange_api_json.h" +#include "taler_json_lib.h" #include "exchange_api_context.h" #include "exchange_api_handle.h" #include "taler_signatures.h" @@ -117,19 +117,20 @@ parse_reserve_history (json_t *history, json_t *transaction; struct TALER_Amount amount; const char *type; - struct MAJ_Specification hist_spec[] = { - MAJ_spec_string ("type", &type), - MAJ_spec_amount ("amount", + struct GNUNET_JSON_Specification hist_spec[] = { + GNUNET_JSON_spec_string ("type", &type), + TALER_JSON_spec_amount ("amount", &amount), /* 'wire' and 'signature' are optional depending on 'type'! */ - MAJ_spec_end + GNUNET_JSON_spec_end() }; transaction = json_array_get (history, off); if (GNUNET_OK != - MAJ_parse_json (transaction, - hist_spec)) + GNUNET_JSON_parse (transaction, + hist_spec, + NULL, NULL)) { GNUNET_break_op (0); return GNUNET_SYSERR; @@ -171,19 +172,20 @@ parse_reserve_history (json_t *history, struct TALER_ReserveSignatureP sig; struct TALER_WithdrawRequestPS withdraw_purpose; struct TALER_Amount amount_from_purpose; - struct MAJ_Specification withdraw_spec[] = { - MAJ_spec_fixed_auto ("signature", + struct GNUNET_JSON_Specification withdraw_spec[] = { + GNUNET_JSON_spec_fixed_auto ("signature", &sig), - MAJ_spec_fixed_auto ("details", + GNUNET_JSON_spec_fixed_auto ("details", &withdraw_purpose), - MAJ_spec_end + GNUNET_JSON_spec_end() }; unsigned int i; rhistory[off].type = TALER_EXCHANGE_RTT_WITHDRAWAL; if (GNUNET_OK != - MAJ_parse_json (transaction, - withdraw_spec)) + GNUNET_JSON_parse (transaction, + withdraw_spec, + NULL, NULL)) { GNUNET_break_op (0); return GNUNET_SYSERR; @@ -196,7 +198,7 @@ parse_reserve_history (json_t *history, &reserve_pub->eddsa_pub)) { GNUNET_break_op (0); - MAJ_parse_free (withdraw_spec); + GNUNET_JSON_parse_free (withdraw_spec); return GNUNET_SYSERR; } TALER_amount_ntoh (&amount_from_purpose, @@ -205,7 +207,7 @@ parse_reserve_history (json_t *history, &amount_from_purpose)) { GNUNET_break_op (0); - MAJ_parse_free (withdraw_spec); + GNUNET_JSON_parse_free (withdraw_spec); return GNUNET_SYSERR; } rhistory[off].details.out_authorization_sig = json_object_get (transaction, @@ -225,7 +227,7 @@ parse_reserve_history (json_t *history, sizeof (struct GNUNET_HashCode))) { GNUNET_break_op (0); - MAJ_parse_free (withdraw_spec); + GNUNET_JSON_parse_free (withdraw_spec); return GNUNET_SYSERR; } } @@ -238,7 +240,7 @@ parse_reserve_history (json_t *history, { /* overflow in history already!? inconceivable! Bad exchange! */ GNUNET_break_op (0); - MAJ_parse_free (withdraw_spec); + GNUNET_JSON_parse_free (withdraw_spec); return GNUNET_SYSERR; } /* end type==WITHDRAW */ @@ -296,14 +298,15 @@ handle_reserve_status_finished (void *cls, unsigned int len; struct TALER_Amount balance; struct TALER_Amount balance_from_history; - struct MAJ_Specification spec[] = { - MAJ_spec_amount ("balance", &balance), - MAJ_spec_end + struct GNUNET_JSON_Specification spec[] = { + TALER_JSON_spec_amount ("balance", &balance), + GNUNET_JSON_spec_end() }; if (GNUNET_OK != - MAJ_parse_json (json, - spec)) + GNUNET_JSON_parse (json, + spec, + NULL, NULL)) { GNUNET_break_op (0); response_code = 0; @@ -563,14 +566,15 @@ reserve_withdraw_ok (struct TALER_EXCHANGE_ReserveWithdrawHandle *wsh, struct GNUNET_CRYPTO_rsa_Signature *blind_sig; struct GNUNET_CRYPTO_rsa_Signature *sig; struct TALER_DenominationSignature dsig; - struct MAJ_Specification spec[] = { - MAJ_spec_rsa_signature ("ev_sig", &blind_sig), - MAJ_spec_end + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_rsa_signature ("ev_sig", &blind_sig), + GNUNET_JSON_spec_end() }; if (GNUNET_OK != - MAJ_parse_json (json, - spec)) + GNUNET_JSON_parse (json, + spec, + NULL, NULL)) { GNUNET_break_op (0); return GNUNET_SYSERR; @@ -622,14 +626,15 @@ reserve_withdraw_payment_required (struct TALER_EXCHANGE_ReserveWithdrawHandle * struct TALER_Amount requested_amount; json_t *history; size_t len; - struct MAJ_Specification spec[] = { - MAJ_spec_amount ("balance", &balance), - MAJ_spec_end + struct GNUNET_JSON_Specification spec[] = { + TALER_JSON_spec_amount ("balance", &balance), + GNUNET_JSON_spec_end() }; if (GNUNET_OK != - MAJ_parse_json (json, - spec)) + GNUNET_JSON_parse (json, + spec, + NULL, NULL)) { GNUNET_break_op (0); return GNUNET_SYSERR; diff --git a/src/exchange-lib/exchange_api_wire.c b/src/exchange-lib/exchange_api_wire.c index 35c443ff5..27ae1dce7 100644 --- a/src/exchange-lib/exchange_api_wire.c +++ b/src/exchange-lib/exchange_api_wire.c @@ -25,9 +25,9 @@ #include /* just for HTTP status codes */ #include #include "taler_exchange_service.h" +#include "taler_json_lib.h" #include "taler_wire_plugin.h" #include "exchange_api_common.h" -#include "exchange_api_json.h" #include "exchange_api_context.h" #include "exchange_api_handle.h" @@ -311,17 +311,18 @@ verify_wire_signature_ok (const struct TALER_EXCHANGE_WireHandle *wh, json_t *methods; const struct TALER_EXCHANGE_Keys *key_state; struct GNUNET_HashContext *hc; - struct MAJ_Specification spec[] = { - MAJ_spec_fixed_auto ("sig", &exchange_sig), - MAJ_spec_fixed_auto ("pub", &exchange_pub), - MAJ_spec_json ("methods", &methods), - MAJ_spec_end + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("sig", &exchange_sig), + GNUNET_JSON_spec_fixed_auto ("pub", &exchange_pub), + GNUNET_JSON_spec_json ("methods", &methods), + GNUNET_JSON_spec_end() }; unsigned int i; if (GNUNET_OK != - MAJ_parse_json (json, - spec)) + GNUNET_JSON_parse (json, + spec, + NULL, NULL)) { GNUNET_break_op (0); return NULL; @@ -329,7 +330,7 @@ verify_wire_signature_ok (const struct TALER_EXCHANGE_WireHandle *wh, if (! json_is_array (methods)) { GNUNET_break_op (0); - MAJ_parse_free (spec); + GNUNET_JSON_parse_free (spec); return NULL; } @@ -351,7 +352,7 @@ verify_wire_signature_ok (const struct TALER_EXCHANGE_WireHandle *wh, { GNUNET_CRYPTO_hash_context_abort (hc); GNUNET_break_op (0); - MAJ_parse_free (spec); + GNUNET_JSON_parse_free (spec); return NULL; } method = json_string_value (element); @@ -371,7 +372,7 @@ verify_wire_signature_ok (const struct TALER_EXCHANGE_WireHandle *wh, &exchange_pub.eddsa_pub)) { GNUNET_break_op (0); - MAJ_parse_free (spec); + GNUNET_JSON_parse_free (spec); return NULL; } return methods; diff --git a/src/exchange-lib/exchange_api_wire_deposits.c b/src/exchange-lib/exchange_api_wire_deposits.c index 406256025..0112f8565 100644 --- a/src/exchange-lib/exchange_api_wire_deposits.c +++ b/src/exchange-lib/exchange_api_wire_deposits.c @@ -24,10 +24,9 @@ #include #include /* just for HTTP status codes */ #include -#include #include "taler_exchange_service.h" #include "exchange_api_common.h" -#include "exchange_api_json.h" +#include "taler_json_lib.h" #include "exchange_api_context.h" #include "exchange_api_handle.h" #include "taler_signatures.h" @@ -102,17 +101,18 @@ handle_wire_deposits_finished (void *cls, struct TALER_Amount total_amount; struct TALER_MerchantPublicKeyP merchant_pub; unsigned int num_details; - struct MAJ_Specification spec[] = { - MAJ_spec_fixed_auto ("H_wire", &h_wire), - MAJ_spec_fixed_auto ("merchant_pub", &merchant_pub), - MAJ_spec_amount ("total_amount", &total_amount), - MAJ_spec_json ("details", &details_j), - MAJ_spec_end + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("H_wire", &h_wire), + GNUNET_JSON_spec_fixed_auto ("merchant_pub", &merchant_pub), + TALER_JSON_spec_amount ("total_amount", &total_amount), + GNUNET_JSON_spec_json ("details", &details_j), + GNUNET_JSON_spec_end() }; if (GNUNET_OK != - MAJ_parse_json (json, - spec)) + GNUNET_JSON_parse (json, + spec, + NULL, NULL)) { GNUNET_break_op (0); response_code = 0; @@ -127,18 +127,19 @@ handle_wire_deposits_finished (void *cls, { struct TALER_WireDepositDetails *detail = &details[i]; struct json_t *detail_j = json_array_get (details_j, i); - struct MAJ_Specification spec_detail[] = { - MAJ_spec_fixed_auto ("H_contract", &detail->h_contract), - MAJ_spec_amount ("deposit_value", &detail->coin_value), - MAJ_spec_amount ("deposit_fee", &detail->coin_fee), - MAJ_spec_uint64 ("transaction_id", &detail->transaction_id), - MAJ_spec_fixed_auto ("coin_pub", &detail->coin_pub), - MAJ_spec_end + struct GNUNET_JSON_Specification spec_detail[] = { + GNUNET_JSON_spec_fixed_auto ("H_contract", &detail->h_contract), + TALER_JSON_spec_amount ("deposit_value", &detail->coin_value), + TALER_JSON_spec_amount ("deposit_fee", &detail->coin_fee), + GNUNET_JSON_spec_uint64 ("transaction_id", &detail->transaction_id), + GNUNET_JSON_spec_fixed_auto ("coin_pub", &detail->coin_pub), + GNUNET_JSON_spec_end() }; if (GNUNET_OK != - MAJ_parse_json (detail_j, - spec_detail)) + GNUNET_JSON_parse (detail_j, + spec_detail, + NULL, NULL)) { GNUNET_break_op (0); response_code = 0; From 199fa6a840b71d712c50c8480d5b2f7e13121e79 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 19 Mar 2016 15:56:40 +0100 Subject: [PATCH 18/91] update .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 14d8fdb48..671e39e98 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,8 @@ src/exchange-tools/taler-exchange-keyup src/exchange-tools/taler-exchange-reservemod src/exchange-tools/taler-exchange-sepa src/exchangedb/perf-exchangedb +src/json/test_json +src/wire/test_sepa_wireformat src/pq/test_pq src/util/test_amount src/util/test_crypto From 362b275c7d1cdc39b61b886db0ea15bba38a8cde Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 19 Mar 2016 18:50:40 +0100 Subject: [PATCH 19/91] fix test script escaping --- src/exchange/test_taler_exchange_httpd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exchange/test_taler_exchange_httpd.sh b/src/exchange/test_taler_exchange_httpd.sh index 209ee06fd..727014243 100755 --- a/src/exchange/test_taler_exchange_httpd.sh +++ b/src/exchange/test_taler_exchange_httpd.sh @@ -28,7 +28,7 @@ taler-exchange-httpd -d test-exchange-home & # Give HTTP time to start sleep 5 # Run test... -cat test_taler_exchange_httpd.data | grep -v ^\# | awk '{ print "curl -d '\''" $2 "'\'' http://localhost:8081"$1 }' | bash +cat test_taler_exchange_httpd.data | grep -v ^\# | awk '{ print "curl -d \47" $2 "\47 http://localhost:8081" $1 }' | bash # Stop HTTP server kill -TERM %% # FIXME: not sure this is the 'correct' return code... From 1c4b72cb47d75ebe657246cc29a029dc2b1cf6df Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 19 Mar 2016 18:50:48 +0100 Subject: [PATCH 20/91] fix test script escaping --- src/exchange/test_taler_exchange_httpd.data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exchange/test_taler_exchange_httpd.data b/src/exchange/test_taler_exchange_httpd.data index 43aa4ff05..8a1d6baa9 100644 --- a/src/exchange/test_taler_exchange_httpd.data +++ b/src/exchange/test_taler_exchange_httpd.data @@ -45,4 +45,4 @@ /withdraw/sign {"denom_pub":"51R7ARKCD5HJTTV5F4G0M818E9SP280A40G2GVH04CR30E9S6GVK2DHM8S234C236CR32C9N8RW44E9M712KAH1R60VM2CJ16RT3GGA18RR36CA575144DJ58CTK0E9M8D2M2E9S8GTKGH1Q8S0KACT174S3AD2670R4ADJ664W32C1N8N23CHA58MSK6DJ26WSMAD1P8H132CHP8GWKAG9K8RS46GJ6890M6GT28GSK4GJ66X2KCCA168RM4GA67113GDA28RR4AGA36RVK6GA460VKJDT58CVK6HA488R48E9R6D2KEH258N246HHJ850K4H9R8N0KEC9N68SM2EA48RR3JEA284SM6C9M6D130D228MSK6H1J6MSKCH1K8CR38CJ48MV36GJ38513CE9P60TM6CA56D1K8HHQ75244DA26WW4CG9M8MW3JE9M7133JGH354520818CMG26C1H60R30C935452081918G2J2G0","#oin_ev":"7DPN42W14BWWD2NWNDYP086276CFV0H8VEV43NFWQGZ3Y8WVR5R5HCN8THX43Z61TFN3CH9N6X5Q0P0T9NF2G8ZWBH8KXEQFQ973CMDDHF1FSE2G9289AB9ERHM8X222VB2WS733X36P8EMG4D3T1N2JHFP530C9RPEAPHDQXZABB6CJ63YD0581JVRY365HHF20RW3BNVKXP","reserve_sig":"VPKYWKGE6FB172XX222N1J0TAEXQE6VERN5X4ANJ0D9K1E7JAX01CPR1PT51SKK5JD72H1GRJ0S2ZQSKN22ZBEGKS77GMT6BF6DD030","reserve_pub":"FN7ARB2MJH2EDMMVT2985Y141YTCE503FS27BTNQ6JSCG3GMBJDG"} # # malformed coin_ev argument -/withdraw/sign {"denom_pub":"51R7ARKCD5HJTTV5F4G0M818E9SP280A40G2GVH04CR30E9S6GVK2DHM8S234C236CR32C9N8RW44E9M712KAH1R60VM2CJ16RT3GGA18RR36CA575144DJ58CTK0E9M8D2M2E9S8GTKGH1Q8S0KACT174S3AD2670R4ADJ664W32C1N8N23CHA58MSK6DJ26WSMAD1P8H132CHP8GWKAG9K8RS46GJ6890M6GT28GSK4GJ66X2KCCA168RM4GA67113GDA28RR4AGA36RVK6GA460VKJDT58CVK6HA488R48E9R6D2KEH258N246HHJ850K4H9R8N0KEC9N68SM2EA48RR3JEA284SM6C9M6D130D228MSK6H1J6MSKCH1K8CR38CJ48MV36GJ38513CE9P60TM6CA56D1K8HHQ75244DA26WW4CG9M8MW3JE9M7133JGH354520818CMG26C1H60R30C935452081918G2J2G0","coin_ev":"'DPN42W14BWWD2NWNDYP086276CFV0H8VEV43NFWQGZ3Y8WVR5R5HCN8THX43Z61TFN3CH9N6X5Q0P0T9NF2G8ZWBH8KXEQFQ973CMDDHF1FSE2G9289AB9ERHM8X222VB2WS733X36P8EMG4D3T1N2JHFP530C9RPEAPHDQXZABB6CJ63YD0581JVRY365HHF20RW3BNVKXP","reserve_sig":"VPKYWKGE6FB172XX222N1J0TAEXQE6VERN5X4ANJ0D9K1E7JAX01CPR1PT51SKK5JD72H1GRJ0S2ZQSKN22ZBEGKS77GMT6BF6DD030","reserve_pub":"FN7ARB2MJH2EDMMVT2985Y141YTCE503FS27BTNQ6JSCG3GMBJDG"} +/withdraw/sign {"denom_pub":"51R7ARKCD5HJTTV5F4G0M818E9SP280A40G2GVH04CR30E9S6GVK2DHM8S234C236CR32C9N8RW44E9M712KAH1R60VM2CJ16RT3GGA18RR36CA575144DJ58CTK0E9M8D2M2E9S8GTKGH1Q8S0KACT174S3AD2670R4ADJ664W32C1N8N23CHA58MSK6DJ26WSMAD1P8H132CHP8GWKAG9K8RS46GJ6890M6GT28GSK4GJ66X2KCCA168RM4GA67113GDA28RR4AGA36RVK6GA460VKJDT58CVK6HA488R48E9R6D2KEH258N246HHJ850K4H9R8N0KEC9N68SM2EA48RR3JEA284SM6C9M6D130D228MSK6H1J6MSKCH1K8CR38CJ48MV36GJ38513CE9P60TM6CA56D1K8HHQ75244DA26WW4CG9M8MW3JE9M7133JGH354520818CMG26C1H60R30C935452081918G2J2G0","coin_ev":"@DPN42W14BWWD2NWNDYP086276CFV0H8VEV43NFWQGZ3Y8WVR5R5HCN8THX43Z61TFN3CH9N6X5Q0P0T9NF2G8ZWBH8KXEQFQ973CMDDHF1FSE2G9289AB9ERHM8X222VB2WS733X36P8EMG4D3T1N2JHFP530C9RPEAPHDQXZABB6CJ63YD0581JVRY365HHF20RW3BNVKXP","reserve_sig":"VPKYWKGE6FB172XX222N1J0TAEXQE6VERN5X4ANJ0D9K1E7JAX01CPR1PT51SKK5JD72H1GRJ0S2ZQSKN22ZBEGKS77GMT6BF6DD030","reserve_pub":"FN7ARB2MJH2EDMMVT2985Y141YTCE503FS27BTNQ6JSCG3GMBJDG"} From 3d5e096fa24a2d11873d7e09a0b994a00882325d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 19 Mar 2016 19:14:19 +0100 Subject: [PATCH 21/91] eliminate warning --- src/exchange-lib/test_exchange_api.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/exchange-lib/test_exchange_api.c b/src/exchange-lib/test_exchange_api.c index fc0945d62..2aee8077d 100644 --- a/src/exchange-lib/test_exchange_api.c +++ b/src/exchange-lib/test_exchange_api.c @@ -1028,6 +1028,7 @@ reveal_cb (void *cls, } ref = find_command (is, cmd->details.refresh_reveal.melt_ref); + GNUNET_assert (NULL != ref); cmd->details.refresh_reveal.num_fresh_coins = num_coins; switch (http_status) { @@ -1096,6 +1097,7 @@ link_cb (void *cls, } ref = find_command (is, cmd->details.refresh_link.reveal_ref); + GNUNET_assert (NULL != ref); switch (http_status) { case MHD_HTTP_OK: @@ -1313,8 +1315,6 @@ wire_deposits_cb (void *cls, const struct Command *ref; cmd->details.wire_deposits.wdh = NULL; - ref = find_command (is, - cmd->details.wire_deposits.wtid_ref); if (cmd->expected_response_code != http_status) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, @@ -1328,6 +1328,9 @@ wire_deposits_cb (void *cls, switch (http_status) { case MHD_HTTP_OK: + ref = find_command (is, + cmd->details.wire_deposits.wtid_ref); + GNUNET_assert (NULL != ref); if (0 != TALER_amount_cmp (total_amount, &ref->details.deposit_wtid.total_amount_expected)) { @@ -1346,6 +1349,7 @@ wire_deposits_cb (void *cls, dep = find_command (is, ref->details.deposit_wtid.deposit_ref); + GNUNET_assert (NULL != dep); GNUNET_CRYPTO_hash (dep->details.deposit.wire_details, strlen (dep->details.deposit.wire_details), &hw); @@ -1850,13 +1854,14 @@ interpreter_run (void *cls, case OC_REFRESH_REVEAL: ref = find_command (is, cmd->details.refresh_reveal.melt_ref); + GNUNET_assert (NULL != ref); cmd->details.refresh_reveal.rrh = TALER_EXCHANGE_refresh_reveal (exchange, - ref->details.refresh_melt.refresh_data_length, - ref->details.refresh_melt.refresh_data, - ref->details.refresh_melt.noreveal_index, - &reveal_cb, - is); + ref->details.refresh_melt.refresh_data_length, + ref->details.refresh_melt.refresh_data, + ref->details.refresh_melt.noreveal_index, + &reveal_cb, + is); if (NULL == cmd->details.refresh_reveal.rrh) { GNUNET_break (0); @@ -1869,9 +1874,11 @@ interpreter_run (void *cls, /* find reveal command */ ref = find_command (is, cmd->details.refresh_link.reveal_ref); + GNUNET_assert (NULL != ref); /* find melt command */ ref = find_command (is, ref->details.refresh_reveal.melt_ref); + GNUNET_assert (NULL != ref); /* find reserve_withdraw command */ { unsigned int idx; @@ -1886,6 +1893,7 @@ interpreter_run (void *cls, md = &ref->details.refresh_melt.melted_coins[idx]; ref = find_command (is, md->coin_ref); + GNUNET_assert (NULL != ref); } GNUNET_assert (OC_WITHDRAW_SIGN == ref->oc); /* finally, use private key from withdraw sign command */ From 737e3f4bf67a2048381785328206c595bffe632a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 19 Mar 2016 19:16:35 +0100 Subject: [PATCH 22/91] refactor to eliminate duplicated JSON parsing logic (#4150) --- src/exchange/taler-exchange-httpd_admin.c | 16 +- src/exchange/taler-exchange-httpd_deposit.c | 48 +- src/exchange/taler-exchange-httpd_parsing.c | 897 ++----------------- src/exchange/taler-exchange-httpd_parsing.h | 311 +------ src/exchange/taler-exchange-httpd_refresh.c | 188 ++-- src/exchange/taler-exchange-httpd_reserve.c | 18 +- src/exchange/taler-exchange-httpd_test.c | 74 +- src/exchange/taler-exchange-httpd_tracking.c | 18 +- src/include/taler_json_lib.h | 24 + src/json/json_helper.c | 32 + 10 files changed, 345 insertions(+), 1281 deletions(-) diff --git a/src/exchange/taler-exchange-httpd_admin.c b/src/exchange/taler-exchange-httpd_admin.c index 575df7bb0..cc0245cd6 100644 --- a/src/exchange/taler-exchange-httpd_admin.c +++ b/src/exchange/taler-exchange-httpd_admin.c @@ -113,12 +113,12 @@ TMH_ADMIN_handler_admin_add_incoming (struct TMH_RequestHandler *rh, struct GNUNET_TIME_Absolute at; json_t *wire; json_t *root; - struct TMH_PARSE_FieldSpecification spec[] = { - TMH_PARSE_member_fixed ("reserve_pub", &reserve_pub), - TMH_PARSE_member_amount ("amount", &amount), - TMH_PARSE_member_time_abs ("execution_date", &at), - TMH_PARSE_member_object ("wire", &wire), - TMH_PARSE_MEMBER_END + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("reserve_pub", &reserve_pub), + TALER_JSON_spec_amount ("amount", &amount), + GNUNET_JSON_spec_absolute_time ("execution_date", &at), + GNUNET_JSON_spec_json ("wire", &wire), + GNUNET_JSON_spec_end () }; int res; @@ -148,7 +148,7 @@ TMH_ADMIN_handler_admin_add_incoming (struct TMH_RequestHandler *rh, TMH_json_validate_wireformat (wire)) { GNUNET_break_op (0); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return TMH_RESPONSE_reply_arg_unknown (connection, "wire"); } @@ -157,7 +157,7 @@ TMH_ADMIN_handler_admin_add_incoming (struct TMH_RequestHandler *rh, &amount, at, wire); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return res; } diff --git a/src/exchange/taler-exchange-httpd_deposit.c b/src/exchange/taler-exchange-httpd_deposit.c index 82dcf1a55..73e6463df 100644 --- a/src/exchange/taler-exchange-httpd_deposit.c +++ b/src/exchange/taler-exchange-httpd_deposit.c @@ -140,19 +140,19 @@ parse_and_handle_deposit_request (struct MHD_Connection *connection, struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki; struct TMH_KS_StateHandle *ks; struct GNUNET_HashCode my_h_wire; - struct TMH_PARSE_FieldSpecification spec[] = { - TMH_PARSE_member_denomination_public_key ("denom_pub", &deposit.coin.denom_pub), - TMH_PARSE_member_denomination_signature ("ub_sig", &deposit.coin.denom_sig), - TMH_PARSE_member_fixed ("coin_pub", &deposit.coin.coin_pub), - TMH_PARSE_member_fixed ("merchant_pub", &deposit.merchant_pub), - TMH_PARSE_member_fixed ("H_contract", &deposit.h_contract), - TMH_PARSE_member_fixed ("H_wire", &deposit.h_wire), - TMH_PARSE_member_fixed ("coin_sig", &deposit.csig), - TMH_PARSE_member_uint64 ("transaction_id", &deposit.transaction_id), - TMH_PARSE_member_time_abs ("timestamp", &deposit.timestamp), - TMH_PARSE_member_time_abs ("refund_deadline", &deposit.refund_deadline), - TMH_PARSE_member_time_abs ("edate", &deposit.wire_deadline), - TMH_PARSE_MEMBER_END + struct GNUNET_JSON_Specification spec[] = { + TALER_JSON_spec_denomination_public_key ("denom_pub", &deposit.coin.denom_pub), + TALER_JSON_spec_denomination_signature ("ub_sig", &deposit.coin.denom_sig), + GNUNET_JSON_spec_fixed_auto ("coin_pub", &deposit.coin.coin_pub), + GNUNET_JSON_spec_fixed_auto ("merchant_pub", &deposit.merchant_pub), + GNUNET_JSON_spec_fixed_auto ("H_contract", &deposit.h_contract), + GNUNET_JSON_spec_fixed_auto ("H_wire", &deposit.h_wire), + GNUNET_JSON_spec_fixed_auto ("coin_sig", &deposit.csig), + GNUNET_JSON_spec_uint64 ("transaction_id", &deposit.transaction_id), + GNUNET_JSON_spec_absolute_time ("timestamp", &deposit.timestamp), + GNUNET_JSON_spec_absolute_time ("refund_deadline", &deposit.refund_deadline), + GNUNET_JSON_spec_absolute_time ("edate", &deposit.wire_deadline), + GNUNET_JSON_spec_end () }; memset (&deposit, 0, sizeof (deposit)); @@ -167,7 +167,7 @@ parse_and_handle_deposit_request (struct MHD_Connection *connection, if (GNUNET_YES != TMH_json_validate_wireformat (wire)) { - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return TMH_RESPONSE_reply_arg_unknown (connection, "wire"); } @@ -176,7 +176,7 @@ parse_and_handle_deposit_request (struct MHD_Connection *connection, &my_h_wire)) { TALER_LOG_WARNING ("Failed to parse JSON wire format specification for /deposit request\n"); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return TMH_RESPONSE_reply_arg_invalid (connection, "wire"); } @@ -185,7 +185,7 @@ parse_and_handle_deposit_request (struct MHD_Connection *connection, sizeof (struct GNUNET_HashCode))) { /* Client hashed contract differently than we did, reject */ - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return TMH_RESPONSE_reply_arg_invalid (connection, "H_wire"); } @@ -196,7 +196,7 @@ parse_and_handle_deposit_request (struct MHD_Connection *connection, if (NULL == dki) { TMH_KS_release (ks); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return TMH_RESPONSE_reply_arg_unknown (connection, "denom_pub"); } @@ -209,13 +209,13 @@ parse_and_handle_deposit_request (struct MHD_Connection *connection, &deposit.deposit_fee)) { /* Total amount smaller than fee, invalid */ - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return TMH_RESPONSE_reply_arg_invalid (connection, "f"); } res = verify_and_execute_deposit (connection, &deposit); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return res; } @@ -247,10 +247,10 @@ TMH_DEPOSIT_handler_deposit (struct TMH_RequestHandler *rh, json_t *wire; int res; struct TALER_Amount amount; - struct TMH_PARSE_FieldSpecification spec[] = { - TMH_PARSE_member_object ("wire", &wire), - TMH_PARSE_member_amount ("f", &amount), - TMH_PARSE_MEMBER_END + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_json ("wire", &wire), + TALER_JSON_spec_amount ("f", &amount), + GNUNET_JSON_spec_end () }; res = TMH_PARSE_post_json (connection, @@ -274,7 +274,7 @@ TMH_DEPOSIT_handler_deposit (struct TMH_RequestHandler *rh, json, &amount, wire); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); json_decref (json); return res; } diff --git a/src/exchange/taler-exchange-httpd_parsing.c b/src/exchange/taler-exchange-httpd_parsing.c index 3fd69ae50..f6e367813 100644 --- a/src/exchange/taler-exchange-httpd_parsing.c +++ b/src/exchange/taler-exchange-httpd_parsing.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014, 2015 GNUnet e.V. + Copyright (C) 2014, 2015, 2016 GNUnet e.V. TALER is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software @@ -141,89 +141,6 @@ buffer_append (struct Buffer *buf, } -/** - * Release all memory allocated for the variable-size fields in - * the parser specification. - * - * @param spec specification to free - * @param spec_len number of items in @a spec to look at - */ -static void -release_data (struct TMH_PARSE_FieldSpecification *spec, - unsigned int spec_len) -{ - unsigned int i; - - for (i=0; i < spec_len; i++) - { - switch (spec[i].command) - { - case TMH_PARSE_JNC_FIELD: - GNUNET_break (0); - return; - case TMH_PARSE_JNC_INDEX: - GNUNET_break (0); - return; - case TMH_PARSE_JNC_RET_DATA: - break; - case TMH_PARSE_JNC_RET_DATA_VAR: - if (NULL != spec[i].destination) - { - GNUNET_free (* (void**) spec[i].destination); - *(void**) spec[i].destination = NULL; - *spec[i].destination_size_out = 0; - } - break; - case TMH_PARSE_JNC_RET_TYPED_JSON: - { - json_t *json; - - json = *(json_t **) spec[i].destination; - if (NULL != json) - { - json_decref (json); - *(json_t**) spec[i].destination = NULL; - } - } - break; - case TMH_PARSE_JNC_RET_RSA_PUBLIC_KEY: - { - struct TALER_DenominationPublicKey *pk; - - pk = spec[i].destination; - if (NULL != pk->rsa_public_key) - { - GNUNET_CRYPTO_rsa_public_key_free (pk->rsa_public_key); - pk->rsa_public_key = NULL; - } - } - break; - case TMH_PARSE_JNC_RET_RSA_SIGNATURE: - { - struct TALER_DenominationSignature *sig; - - sig = spec[i].destination; - if (NULL != sig->rsa_signature) - { - GNUNET_CRYPTO_rsa_signature_free (sig->rsa_signature); - sig->rsa_signature = NULL; - } - } - break; - case TMH_PARSE_JNC_RET_AMOUNT: - memset (spec[i].destination, - 0, - sizeof (struct TALER_Amount)); - break; - case TMH_PARSE_JNC_RET_TIME_ABSOLUTE: - break; - case TMH_PARSE_JNC_RET_UINT64: - break; - } - } -} - - /** * Process a POST request containing a JSON object. This function * realizes an MHD POST processor that will (incrementally) process @@ -349,8 +266,8 @@ TMH_PARSE_post_cleanup_callback (void *con_cls) /** * Extract base32crockford encoded data from request. * - * Queues an error response to the connection if the parameter is missing or - * invalid. + * Queues an error response to the connection if the parameter is + * missing or invalid. * * @param connection the MHD connection * @param param_name the name of the parameter with the key @@ -390,759 +307,117 @@ TMH_PARSE_mhd_request_arg_data (struct MHD_Connection *connection, } -/** - * Extraxt variable-size base32crockford encoded data from request. - * - * Queues an error response to the connection if the parameter is missing - * or the encoding is invalid. - * - * @param connection the MHD connection - * @param param_name the name of the parameter with the key - * @param[out] out_data pointer to allocate buffer and store the result - * @param[out] out_size set to the size of the buffer allocated in @a out_data - * @return - * #GNUNET_YES if the the argument is present - * #GNUNET_NO if the argument is absent or malformed - * #GNUNET_SYSERR on internal error (error response could not be sent) - */ -int -TMH_PARSE_mhd_request_var_arg_data (struct MHD_Connection *connection, - const char *param_name, - void **out_data, - size_t *out_size) -{ - const char *str; - size_t slen; - size_t olen; - void *out; - - str = MHD_lookup_connection_value (connection, - MHD_GET_ARGUMENT_KIND, - param_name); - if (NULL == str) - { - return (MHD_NO == - TMH_RESPONSE_reply_arg_missing (connection, param_name)) - ? GNUNET_SYSERR : GNUNET_NO; - } - slen = strlen (str); - olen = (slen * 5) / 8; - out = GNUNET_malloc (olen); - if (GNUNET_OK != - GNUNET_STRINGS_string_to_data (str, - strlen (str), - out, - olen)) - { - GNUNET_free (out); - *out_size = 0; - return (MHD_NO == - TMH_RESPONSE_reply_arg_invalid (connection, param_name)) - ? GNUNET_SYSERR : GNUNET_NO; - } - *out_data = out; - *out_size = olen; - return GNUNET_OK; -} - - -/** - * Navigate through a JSON tree. - * - * Sends an error response if navigation is impossible (i.e. - * the JSON object is invalid) - * - * @param connection the connection to send an error response to - * @param root the JSON node to start the navigation at. - * @param ... navigation specification (see `enum TMH_PARSE_JsonNavigationCommand`) - * @return - * #GNUNET_YES if navigation was successful - * #GNUNET_NO if json is malformed, error response was generated - * #GNUNET_SYSERR on internal error (no response was generated, - * connection must be closed) - */ -int -TMH_PARSE_navigate_json (struct MHD_Connection *connection, - const json_t *root, - ...) -{ - va_list argp; - int ret; - json_t *path; /* what's our current path from 'root'? */ - - path = json_array (); - va_start (argp, root); - ret = 2; /* just not any of the valid return values */ - while (2 == ret) - { - enum TMH_PARSE_JsonNavigationCommand command - = va_arg (argp, - enum TMH_PARSE_JsonNavigationCommand); - - switch (command) - { - case TMH_PARSE_JNC_FIELD: - { - const char *fname = va_arg(argp, const char *); - - json_array_append_new (path, - json_string (fname)); - root = json_object_get (root, - fname); - if (NULL == root) - { - GNUNET_break_op (0); - ret = (MHD_YES == - TMH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_BAD_REQUEST, - "{s:s, s:s, s:O}", - "error", "missing field in JSON", - "field", fname, - "path", path)) - ? GNUNET_NO : GNUNET_SYSERR; - break; - } - } - break; - - case TMH_PARSE_JNC_INDEX: - { - int fnum = va_arg(argp, int); - - json_array_append_new (path, - json_integer (fnum)); - root = json_array_get (root, - fnum); - if (NULL == root) - { - GNUNET_break_op (0); - ret = (MHD_YES == - TMH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_BAD_REQUEST, - "{s:s, s:O}", - "error", "missing index in JSON", - "path", path)) - ? GNUNET_NO : GNUNET_SYSERR; - break; - } - } - break; - - case TMH_PARSE_JNC_RET_DATA: - { - void *where = va_arg (argp, void *); - size_t len = va_arg (argp, size_t); - const char *str; - int res; - - str = json_string_value (root); - if (NULL == str) - { - GNUNET_break_op (0); - ret = (MHD_YES == - TMH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_BAD_REQUEST, - "{s:s, s:O}", - "error", "string expected", - "path", path)) - ? GNUNET_NO : GNUNET_SYSERR; - break; - } - res = GNUNET_STRINGS_string_to_data (str, strlen (str), - where, len); - if (GNUNET_OK != res) - { - GNUNET_break_op (0); - ret = (MHD_YES == - TMH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_BAD_REQUEST, - "{s:s, s:O}", - "error", "malformed binary data in JSON", - "path", path)) - ? GNUNET_NO : GNUNET_SYSERR; - break; - } - ret = GNUNET_OK; - } - break; - - case TMH_PARSE_JNC_RET_DATA_VAR: - { - void **where = va_arg (argp, void **); - size_t *len = va_arg (argp, size_t *); - const char *str; - int res; - - str = json_string_value (root); - if (NULL == str) - { - GNUNET_break_op (0); - ret = (MHD_YES == - TMH_RESPONSE_reply_internal_error (connection, - "json_string_value() failed")) - ? GNUNET_NO : GNUNET_SYSERR; - break; - } - *len = (strlen (str) * 5) / 8; - if (NULL != where) - { - *where = GNUNET_malloc (*len); - res = GNUNET_STRINGS_string_to_data (str, - strlen (str), - *where, - *len); - if (GNUNET_OK != res) - { - GNUNET_break_op (0); - GNUNET_free (*where); - *where = NULL; - *len = 0; - ret = (MHD_YES == - TMH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_BAD_REQUEST, - "{s:s, s:O}", - "error", "malformed binary data in JSON", - "path", path)) - ? GNUNET_NO : GNUNET_SYSERR; - break; - } - } - ret = GNUNET_OK; - } - break; - - case TMH_PARSE_JNC_RET_TYPED_JSON: - { - int typ = va_arg (argp, int); - const json_t **r_json = va_arg (argp, const json_t **); - - if ( (NULL == root) || - ( (-1 != typ) && - (json_typeof (root) != typ)) ) - { - GNUNET_break_op (0); - *r_json = NULL; - ret = (MHD_YES == - TMH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_BAD_REQUEST, - "{s:s, s:i, s:i, s:O}", - "error", "wrong JSON field type", - "type_expected", typ, - "type_actual", json_typeof (root), - "path", path)) - ? GNUNET_NO : GNUNET_SYSERR; - break; - } - *r_json = root; - json_incref ((json_t *) root); - ret = GNUNET_OK; - } - break; - - case TMH_PARSE_JNC_RET_UINT64: - { - uint64_t *r_u64 = va_arg (argp, uint64_t *); - - if (json_typeof (root) != JSON_INTEGER) - { - GNUNET_break_op (0); - ret = (MHD_YES == - TMH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_BAD_REQUEST, - "{s:s, s:s, s:i, s:O}", - "error", "wrong JSON field type", - "type_expected", "integer", - "type_actual", json_typeof (root), - "path", path)) - ? GNUNET_NO : GNUNET_SYSERR; - break; - } - *r_u64 = (uint64_t) json_integer_value (root); - ret = GNUNET_OK; - } - break; - - case TMH_PARSE_JNC_RET_RSA_PUBLIC_KEY: - { - struct TALER_DenominationPublicKey *where; - size_t len; - const char *str; - int res; - void *buf; - - where = va_arg (argp, - struct TALER_DenominationPublicKey *); - str = json_string_value (root); - if (NULL == str) - { - GNUNET_break_op (0); - ret = (MHD_YES == - TMH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_BAD_REQUEST, - "{s:s, s:O}", - "error", "string expected", - "path", path)) - ? GNUNET_NO : GNUNET_SYSERR; - break; - } - len = (strlen (str) * 5) / 8; - buf = GNUNET_malloc (len); - res = GNUNET_STRINGS_string_to_data (str, - strlen (str), - buf, - len); - if (GNUNET_OK != res) - { - GNUNET_break_op (0); - GNUNET_free (buf); - ret = (MHD_YES == - TMH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_BAD_REQUEST, - "{s:s, s:O}", - "error", "malformed binary data in JSON", - "path", path)) - ? GNUNET_NO : GNUNET_SYSERR; - break; - } - where->rsa_public_key = GNUNET_CRYPTO_rsa_public_key_decode (buf, - len); - GNUNET_free (buf); - if (NULL == where->rsa_public_key) - { - GNUNET_break_op (0); - ret = (MHD_YES == - TMH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_BAD_REQUEST, - "{s:s, s:O}", - "error", "malformed RSA public key in JSON", - "path", path)) - ? GNUNET_NO : GNUNET_SYSERR; - break; - } - ret = GNUNET_OK; - break; - } - - case TMH_PARSE_JNC_RET_RSA_SIGNATURE: - { - struct TALER_DenominationSignature *where; - size_t len; - const char *str; - int res; - void *buf; - - where = va_arg (argp, - struct TALER_DenominationSignature *); - str = json_string_value (root); - if (NULL == str) - { - GNUNET_break_op (0); - ret = (MHD_YES == - TMH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_BAD_REQUEST, - "{s:s, s:O}", - "error", "string expected", - "path", path)) - ? GNUNET_NO : GNUNET_SYSERR; - break; - } - len = (strlen (str) * 5) / 8; - buf = GNUNET_malloc (len); - res = GNUNET_STRINGS_string_to_data (str, - strlen (str), - buf, - len); - if (GNUNET_OK != res) - { - GNUNET_break_op (0); - GNUNET_free (buf); - ret = (MHD_YES == - TMH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_BAD_REQUEST, - "{s:s, s:O}", - "error", "malformed binary data in JSON", - "path", path)) - ? GNUNET_NO : GNUNET_SYSERR; - break; - } - where->rsa_signature = GNUNET_CRYPTO_rsa_signature_decode (buf, - len); - GNUNET_free (buf); - if (NULL == where->rsa_signature) - { - GNUNET_break_op (0); - ret = (MHD_YES == - TMH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_BAD_REQUEST, - "{s:s, s:O}", - "error", "malformed RSA signature in JSON", - "path", path)) - ? GNUNET_NO : GNUNET_SYSERR; - break; - } - ret = GNUNET_OK; - break; - } - - case TMH_PARSE_JNC_RET_AMOUNT: - { - struct TALER_Amount *where = va_arg (argp, void *); - struct GNUNET_JSON_Specification spec[] = { - TALER_JSON_spec_amount (NULL, where), - GNUNET_JSON_spec_end () - }; - - if (GNUNET_OK != - GNUNET_JSON_parse ((json_t *) root, - spec, - NULL, NULL)) - { - GNUNET_break_op (0); - ret = (MHD_YES != - TMH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_BAD_REQUEST, - "{s:s, s:O}", - "error", "Bad format", - "path", path)) - ? GNUNET_SYSERR : GNUNET_NO; - break; - } - if (0 != strcmp (where->currency, - TMH_exchange_currency_string)) - { - GNUNET_break_op (0); - ret = (MHD_YES != - TMH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_BAD_REQUEST, - "{s:s, s:O, s:s}", - "error", "Currency not supported", - "path", path, - "currency", where->currency)) - ? GNUNET_SYSERR : GNUNET_NO; - memset (where, 0, sizeof (struct TALER_Amount)); - break; - } - ret = GNUNET_OK; - break; - } - - case TMH_PARSE_JNC_RET_TIME_ABSOLUTE: - { - struct GNUNET_TIME_Absolute *where = va_arg (argp, void *); - struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_absolute_time (NULL, where), - GNUNET_JSON_spec_end () - }; - - if (GNUNET_OK != - GNUNET_JSON_parse ((json_t *) root, - spec, - NULL, NULL)) - { - GNUNET_break_op (0); - ret = (MHD_YES != - TMH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_BAD_REQUEST, - "{s:s, s:s, s:O}", - "error", "Bad format", - "hint", "expected absolute time", - "path", path)) - ? GNUNET_SYSERR : GNUNET_NO; - break; - } - ret = GNUNET_OK; - break; - } - - default: - GNUNET_break (0); - ret = (MHD_YES == - TMH_RESPONSE_reply_internal_error (connection, - "unhandled value in switch")) - ? GNUNET_NO : GNUNET_SYSERR; - break; - } - } - va_end (argp); - json_decref (path); - return ret; -} - - /** * Parse JSON object into components based on the given field - * specification. + * specification. Generates error response on parse errors. * * @param connection the connection to send an error response to * @param root the JSON node to start the navigation at. - * @param spec field specification for the parser + * @param[in,out] spec field specification for the parser * @return * #GNUNET_YES if navigation was successful (caller is responsible * for freeing allocated variable-size data using - * #TMH_PARSE_release_data() when done) + * #GNUNET_JSON_parse_free() when done) * #GNUNET_NO if json is malformed, error response was generated * #GNUNET_SYSERR on internal error */ int TMH_PARSE_json_data (struct MHD_Connection *connection, const json_t *root, - struct TMH_PARSE_FieldSpecification *spec) + struct GNUNET_JSON_Specification *spec) { - unsigned int i; int ret; + const char *error_json_name; + unsigned int error_line; - ret = GNUNET_YES; - for (i=0; NULL != spec[i].field_name; i++) + ret = GNUNET_JSON_parse (root, + spec, + &error_json_name, + &error_line); + if (GNUNET_SYSERR == ret) { - if (GNUNET_YES != ret) - break; - switch (spec[i].command) - { - case TMH_PARSE_JNC_FIELD: - GNUNET_break (0); - return GNUNET_SYSERR; - case TMH_PARSE_JNC_INDEX: - GNUNET_break (0); - return GNUNET_SYSERR; - case TMH_PARSE_JNC_RET_DATA: - ret = TMH_PARSE_navigate_json (connection, - root, - TMH_PARSE_JNC_FIELD, - spec[i].field_name, - TMH_PARSE_JNC_RET_DATA, - spec[i].destination, - spec[i].destination_size_in); - break; - case TMH_PARSE_JNC_RET_DATA_VAR: - ret = TMH_PARSE_navigate_json (connection, - root, - TMH_PARSE_JNC_FIELD, - spec[i].field_name, - TMH_PARSE_JNC_RET_DATA_VAR, - (void **) spec[i].destination, - spec[i].destination_size_out); - break; - case TMH_PARSE_JNC_RET_TYPED_JSON: - ret = TMH_PARSE_navigate_json (connection, - root, - TMH_PARSE_JNC_FIELD, - spec[i].field_name, - TMH_PARSE_JNC_RET_TYPED_JSON, - spec[i].type, - spec[i].destination); - break; - case TMH_PARSE_JNC_RET_RSA_PUBLIC_KEY: - ret = TMH_PARSE_navigate_json (connection, - root, - TMH_PARSE_JNC_FIELD, - spec[i].field_name, - TMH_PARSE_JNC_RET_RSA_PUBLIC_KEY, - spec[i].destination); - break; - case TMH_PARSE_JNC_RET_RSA_SIGNATURE: - ret = TMH_PARSE_navigate_json (connection, - root, - TMH_PARSE_JNC_FIELD, - spec[i].field_name, - TMH_PARSE_JNC_RET_RSA_SIGNATURE, - spec[i].destination); - break; - case TMH_PARSE_JNC_RET_AMOUNT: - GNUNET_assert (sizeof (struct TALER_Amount) == - spec[i].destination_size_in); - ret = TMH_PARSE_navigate_json (connection, - root, - TMH_PARSE_JNC_FIELD, - spec[i].field_name, - TMH_PARSE_JNC_RET_AMOUNT, - spec[i].destination); - break; - case TMH_PARSE_JNC_RET_TIME_ABSOLUTE: - GNUNET_assert (sizeof (struct GNUNET_TIME_Absolute) == - spec[i].destination_size_in); - ret = TMH_PARSE_navigate_json (connection, - root, - TMH_PARSE_JNC_FIELD, - spec[i].field_name, - TMH_PARSE_JNC_RET_TIME_ABSOLUTE, - spec[i].destination); - break; - case TMH_PARSE_JNC_RET_UINT64: - GNUNET_assert (sizeof (uint64_t) == - spec[i].destination_size_in); - ret = TMH_PARSE_navigate_json (connection, - root, - TMH_PARSE_JNC_FIELD, - spec[i].field_name, - TMH_PARSE_JNC_RET_UINT64, - spec[i].destination); - break; - } + if (NULL == error_json_name) + error_json_name = ""; + ret = (MHD_YES == + TMH_RESPONSE_reply_json_pack (connection, + MHD_HTTP_BAD_REQUEST, + "{s:s, s:s, s:I}", + "error", "parse error", + "field", error_json_name, + "line", (json_int_t) error_line)) + ? GNUNET_NO : GNUNET_SYSERR; + return ret; } - if (GNUNET_YES != ret) - release_data (spec, - i - 1); - return ret; + return GNUNET_YES; } /** - * Release all memory allocated for the variable-size fields in - * the parser specification. + * Parse JSON array into components based on the given field + * specification. Generates error response on parse errors. * - * @param spec specification to free + * @param connection the connection to send an error response to + * @param root the JSON node to start the navigation at. + * @param[in,out] spec field specification for the parser + * @param ... -1-terminated list of array offsets of type 'int' + * @return + * #GNUNET_YES if navigation was successful (caller is responsible + * for freeing allocated variable-size data using + * #GNUNET_JSON_parse_free() when done) + * #GNUNET_NO if json is malformed, error response was generated + * #GNUNET_SYSERR on internal error */ -void -TMH_PARSE_release_data (struct TMH_PARSE_FieldSpecification *spec) +int +TMH_PARSE_json_array (struct MHD_Connection *connection, + const json_t *root, + struct GNUNET_JSON_Specification *spec, + ...) { - unsigned int i; + int ret; + const char *error_json_name; + unsigned int error_line; + va_list ap; + json_int_t dim; - for (i=0; NULL != spec[i].field_name; i++) ; - release_data (spec, i); + va_start (ap, spec); + dim = 0; + while ( (-1 != (ret = va_arg (ap, int))) && + (NULL != root) ) + { + dim++; + root = json_array_get (root, ret); + } + if (NULL == root) + { + ret = (MHD_YES == + TMH_RESPONSE_reply_json_pack (connection, + MHD_HTTP_BAD_REQUEST, + "{s:s, s:I}", + "error", "parse error", + "dimension", dim)) + ? GNUNET_NO : GNUNET_SYSERR; + return ret; + } + ret = GNUNET_JSON_parse (root, + spec, + &error_json_name, + &error_line); + if (GNUNET_SYSERR == ret) + { + if (NULL == error_json_name) + error_json_name = ""; + ret = (MHD_YES == + TMH_RESPONSE_reply_json_pack (connection, + MHD_HTTP_BAD_REQUEST, + "{s:s, s:s, s:I}", + "error", "parse error", + "field", error_json_name, + "line", (json_int_t) error_line)) + ? GNUNET_NO : GNUNET_SYSERR; + return ret; + } + return GNUNET_YES; } -/** - * Generate line in parser specification for 64-bit integer - * given as an integer in JSON. - * - * @param field name of the field - * @param[out] u64 integer to initialize - * @return corresponding field spec - */ -struct TMH_PARSE_FieldSpecification -TMH_PARSE_member_uint64 (const char *field, - uint64_t *u64) -{ - struct TMH_PARSE_FieldSpecification ret = - { field, (void *) u64, sizeof (uint64_t), NULL, TMH_PARSE_JNC_RET_UINT64, 0 }; - return ret; -} - - -/** - * Generate line in parser specification for JSON object value. - * - * @param field name of the field - * @param[out] jsonp address of pointer to JSON to initialize - * @return corresponding field spec - */ -struct TMH_PARSE_FieldSpecification -TMH_PARSE_member_object (const char *field, - json_t **jsonp) -{ - struct TMH_PARSE_FieldSpecification ret = - { field, jsonp, 0, NULL, TMH_PARSE_JNC_RET_TYPED_JSON, JSON_OBJECT }; - *jsonp = NULL; - return ret; -} - - -/** - * Generate line in parser specification for JSON array value. - * - * @param field name of the field - * @param[out] jsonp address of JSON pointer to initialize - * @return corresponding field spec - */ -struct TMH_PARSE_FieldSpecification -TMH_PARSE_member_array (const char *field, - json_t **jsonp) -{ - struct TMH_PARSE_FieldSpecification ret = - { field, jsonp, 0, NULL, TMH_PARSE_JNC_RET_TYPED_JSON, JSON_ARRAY }; - *jsonp = NULL; - return ret; -} - - -/** - * Generate line in parser specification for an absolute time. - * - * @param field name of the field - * @param[out] atime time to initialize - */ -struct TMH_PARSE_FieldSpecification -TMH_PARSE_member_time_abs (const char *field, - struct GNUNET_TIME_Absolute *atime) -{ - struct TMH_PARSE_FieldSpecification ret = - { field, atime, sizeof(struct GNUNET_TIME_Absolute), NULL, TMH_PARSE_JNC_RET_TIME_ABSOLUTE, 0 }; - return ret; -} - - -/** - * Generate line in parser specification for RSA public key. - * - * @param field name of the field - * @param[out] pk key to initialize - * @return corresponding field spec - */ -struct TMH_PARSE_FieldSpecification -TMH_PARSE_member_denomination_public_key (const char *field, - struct TALER_DenominationPublicKey *pk) -{ - struct TMH_PARSE_FieldSpecification ret = - { field, pk, 0, NULL, TMH_PARSE_JNC_RET_RSA_PUBLIC_KEY, 0 }; - pk->rsa_public_key = NULL; - return ret; -} - - -/** - * Generate line in parser specification for RSA public key. - * - * @param field name of the field - * @param sig the signature to initialize - * @return corresponding field spec - */ -struct TMH_PARSE_FieldSpecification -TMH_PARSE_member_denomination_signature (const char *field, - struct TALER_DenominationSignature *sig) -{ - struct TMH_PARSE_FieldSpecification ret = - { field, sig, 0, NULL, TMH_PARSE_JNC_RET_RSA_SIGNATURE, 0 }; - sig->rsa_signature = NULL; - return ret; -} - - -/** - * Generate line in parser specification for an amount. - * - * @param field name of the field - * @param amount a `struct TALER_Amount *` to initialize - * @return corresponding field spec - */ -struct TMH_PARSE_FieldSpecification -TMH_PARSE_member_amount (const char *field, - struct TALER_Amount *amount) -{ - struct TMH_PARSE_FieldSpecification ret = - { field, amount, sizeof(struct TALER_Amount), NULL, TMH_PARSE_JNC_RET_AMOUNT, 0 }; - memset (amount, 0, sizeof (struct TALER_Amount)); - return ret; -} - - -/** - * Generate line in parser specification for variable-size value. - * - * @param field name of the field - * @param[out] ptr pointer to initialize - * @param[out] ptr_size size to initialize - * @return corresponding field spec - */ -struct TMH_PARSE_FieldSpecification -TMH_PARSE_member_variable (const char *field, - void **ptr, - size_t *ptr_size) -{ - struct TMH_PARSE_FieldSpecification ret = - { field, ptr, 0, ptr_size, TMH_PARSE_JNC_RET_DATA_VAR, 0 }; - *ptr = NULL; - return ret; -} - /* end of taler-exchange-httpd_parsing.c */ diff --git a/src/exchange/taler-exchange-httpd_parsing.h b/src/exchange/taler-exchange-httpd_parsing.h index a39235685..d09f58767 100644 --- a/src/exchange/taler-exchange-httpd_parsing.h +++ b/src/exchange/taler-exchange-httpd_parsing.h @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014, 2015 GNUnet e.V. + Copyright (C) 2014, 2015, 2016 GNUnet e.V. TALER is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software @@ -26,6 +26,7 @@ #include #include #include "taler_util.h" +#include "taler_json_lib.h" /** @@ -71,149 +72,6 @@ void TMH_PARSE_post_cleanup_callback (void *con_cls); -/** - * Constants for JSON navigation description. - */ -enum TMH_PARSE_JsonNavigationCommand -{ - /** - * Access a field. - * Param: const char * - */ - TMH_PARSE_JNC_FIELD, - - /** - * Access an array index. - * Param: int - */ - TMH_PARSE_JNC_INDEX, - - /** - * Return base32crockford encoded data of - * constant size. - * Params: (void *, size_t) - */ - TMH_PARSE_JNC_RET_DATA, - - /** - * Return base32crockford encoded data of - * variable size. - * Params: (void **, size_t *) - */ - TMH_PARSE_JNC_RET_DATA_VAR, - - /** - * Return a json object, which must be - * of the given type (JSON_* type constants, - * or -1 for any type). - * Params: (int, json_t **) - */ - TMH_PARSE_JNC_RET_TYPED_JSON, - - /** - * Return a `struct GNUNET_CRYPTO_rsa_PublicKey` which was - * encoded as variable-size base32crockford encoded data. - */ - TMH_PARSE_JNC_RET_RSA_PUBLIC_KEY, - - /** - * Return a `struct GNUNET_CRYPTO_rsa_Signature` which was - * encoded as variable-size base32crockford encoded data. - */ - TMH_PARSE_JNC_RET_RSA_SIGNATURE, - - /** - * Return a `struct TALER_Amount` which was - * encoded within its own json object. - */ - TMH_PARSE_JNC_RET_AMOUNT, - - /** - * Return a `struct GNUNET_TIME_Absolute` which was - * encoded within its own json object. - * Param: struct GNUNET_TIME_Absolute * - */ - TMH_PARSE_JNC_RET_TIME_ABSOLUTE, - - /** - * Return a `uint64_t` which was - * encoded as a JSON integer. - * Param: uint64_t * - */ - TMH_PARSE_JNC_RET_UINT64 - -}; - - -/** - * Navigate through a JSON tree. - * - * Sends an error response if navigation is impossible (i.e. - * the JSON object is invalid) - * - * @param connection the connection to send an error response to - * @param root the JSON node to start the navigation at. - * @param ... navigation specification (see `enum TMH_PARSE_JsonNavigationCommand`) - * @return - * #GNUNET_YES if navigation was successful - * #GNUNET_NO if json is malformed, error response was generated - * #GNUNET_SYSERR on internal error - */ -int -TMH_PARSE_navigate_json (struct MHD_Connection *connection, - const json_t *root, - ...); - - -/** - * @brief Specification for how to parse a JSON field. - */ -struct TMH_PARSE_FieldSpecification -{ - /** - * Name of the field. NULL only to terminate array. - */ - const char *field_name; - - /** - * Where to store the result. Must have exactly - * @e destination_size bytes, except if @e destination_size is zero. - * NULL to skip assignment (but check presence of the value). - */ - void *destination; - - /** - * How big should the result be, 0 for variable size. In - * this case, @e destination must be a "void **", pointing - * to a location that is currently NULL and is to be allocated. - */ - size_t destination_size_in; - - /** - * @e destination_size_out will then be set to the size of the - * value that was stored in @e destination (useful for - * variable-size allocations). - */ - size_t *destination_size_out; - - /** - * Navigation command to use to extract the value. Note that - * #TMH_PARSE_JNC_RET_DATA or #TMH_PARSE_JNC_RET_DATA_VAR must be used for @e - * destination_size_in and @e destination_size_out to have a - * meaning. #TMH_PARSE_JNC_FIELD and #TMH_PARSE_JNC_INDEX must not be used here! - */ - enum TMH_PARSE_JsonNavigationCommand command; - - /** - * JSON type to use, only meaningful in connection with a @e command - * value of #TMH_PARSE_JNC_RET_TYPED_JSON. Typical values are - * #JSON_ARRAY and #JSON_OBJECT. - */ - int type; - -}; - - /** * Parse JSON object into components based on the given field * specification. @@ -224,139 +82,36 @@ struct TMH_PARSE_FieldSpecification * @return * #GNUNET_YES if navigation was successful (caller is responsible * for freeing allocated variable-size data using - * #TMH_PARSE_release_data() when done) + * #GNUNET_JSON_parse_free() when done) * #GNUNET_NO if json is malformed, error response was generated * #GNUNET_SYSERR on internal error */ int TMH_PARSE_json_data (struct MHD_Connection *connection, const json_t *root, - struct TMH_PARSE_FieldSpecification *spec); + struct GNUNET_JSON_Specification *spec); /** - * Release all memory allocated for the variable-size fields in - * the parser specification. + * Parse JSON array into components based on the given field + * specification. Generates error response on parse errors. * - * @param spec specification to free + * @param connection the connection to send an error response to + * @param root the JSON node to start the navigation at. + * @param[in,out] spec field specification for the parser + * @param ... -1-terminated list of array offsets of type 'int' + * @return + * #GNUNET_YES if navigation was successful (caller is responsible + * for freeing allocated variable-size data using + * #GNUNET_JSON_parse_free() when done) + * #GNUNET_NO if json is malformed, error response was generated + * #GNUNET_SYSERR on internal error */ -void -TMH_PARSE_release_data (struct TMH_PARSE_FieldSpecification *spec); - - -/** - * Generate line in parser specification for fixed-size value. - * - * @param field name of the field - * @param value where to store the value - */ -#define TMH_PARSE_member_fixed(field,value) { field, value, sizeof (*value), NULL, TMH_PARSE_JNC_RET_DATA, 0 } - - -/** - * Generate line in parser specification for variable-size value. - * - * @param field name of the field - * @param[out] ptr pointer to initialize - * @param[out] ptr_size size to initialize - * @return corresponding field spec - */ -struct TMH_PARSE_FieldSpecification -TMH_PARSE_member_variable (const char *field, - void **ptr, - size_t *ptr_size); - - -/** - * Generate line in parser specification for 64-bit integer - * given as an integer in JSON. - * - * @param field name of the field - * @param[out] u64 integer to initialize - * @return corresponding field spec - */ -struct TMH_PARSE_FieldSpecification -TMH_PARSE_member_uint64 (const char *field, - uint64_t *u64); - - -/** - * Generate line in parser specification for JSON array value. - * - * @param field name of the field - * @param[out] jsonp address of JSON pointer to initialize - * @return corresponding field spec - */ -struct TMH_PARSE_FieldSpecification -TMH_PARSE_member_array (const char *field, - json_t **jsonp); - - -/** - * Generate line in parser specification for JSON object value. - * - * @param field name of the field - * @param[out] jsonp address of pointer to JSON to initialize - * @return corresponding field spec - */ -struct TMH_PARSE_FieldSpecification -TMH_PARSE_member_object (const char *field, - json_t **jsonp); - - -/** - * Generate line in parser specification for RSA public key. - * - * @param field name of the field - * @param[out] pk key to initialize - * @return corresponding field spec - */ -struct TMH_PARSE_FieldSpecification -TMH_PARSE_member_denomination_public_key (const char *field, - struct TALER_DenominationPublicKey *pk); - - -/** - * Generate line in parser specification for RSA public key. - * - * @param field name of the field - * @param sig the signature to initialize - * @return corresponding field spec - */ -struct TMH_PARSE_FieldSpecification -TMH_PARSE_member_denomination_signature (const char *field, - struct TALER_DenominationSignature *sig); - - -/** - * Generate line in parser specification for an amount. - * - * @param field name of the field - * @param[out] amount a `struct TALER_Amount *` to initialize - * @return corresponding field spec - */ -struct TMH_PARSE_FieldSpecification -TMH_PARSE_member_amount (const char *field, - struct TALER_Amount *amount); - - -/** - * Generate line in parser specification for an absolute time. - * - * @param field name of the field - * @param[out] atime time to initialize - * @return corresponding field spec - */ -struct TMH_PARSE_FieldSpecification -TMH_PARSE_member_time_abs (const char *field, - struct GNUNET_TIME_Absolute *atime); - - - -/** - * Generate line in parser specification indicating the end of the spec. - */ -#define TMH_PARSE_MEMBER_END { NULL, NULL, 0, NULL, TMH_PARSE_JNC_FIELD, 0 } +int +TMH_PARSE_json_array (struct MHD_Connection *connection, + const json_t *root, + struct GNUNET_JSON_Specification *spec, + ...); /** @@ -381,28 +136,4 @@ TMH_PARSE_mhd_request_arg_data (struct MHD_Connection *connection, size_t out_size); -/** - * Extraxt variable-size base32crockford encoded data from request. - * - * Queues an error response to the connection if the parameter is missing - * or the encoding is invalid. - * - * @param connection the MHD connection - * @param param_name the name of the parameter with the key - * @param[out] out_data pointer to allocate buffer and store the result - * @param[out] out_size set to the size of the buffer allocated in @a out_data - * @return - * #GNUNET_YES if the the argument is present - * #GNUNET_NO if the argument is absent or malformed - * #GNUNET_SYSERR on internal error (error response could not be sent) - */ -int -TMH_PARSE_mhd_request_var_arg_data (struct MHD_Connection *connection, - const char *param_name, - void **out_data, - size_t *out_size); - - - - #endif /* TALER_EXCHANGE_HTTPD_PARSING_H */ diff --git a/src/exchange/taler-exchange-httpd_refresh.c b/src/exchange/taler-exchange-httpd_refresh.c index 45bbf3d4d..2349d90ac 100644 --- a/src/exchange/taler-exchange-httpd_refresh.c +++ b/src/exchange/taler-exchange-httpd_refresh.c @@ -192,13 +192,13 @@ get_coin_public_info (struct MHD_Connection *connection, struct TALER_DenominationSignature sig; struct TALER_DenominationPublicKey pk; struct TALER_Amount amount; - struct TMH_PARSE_FieldSpecification spec[] = { - TMH_PARSE_member_fixed ("coin_pub", &r_melt_detail->coin_info.coin_pub), - TMH_PARSE_member_denomination_signature ("denom_sig", &sig), - TMH_PARSE_member_denomination_public_key ("denom_pub", &pk), - TMH_PARSE_member_fixed ("confirm_sig", &melt_sig), - TMH_PARSE_member_amount ("value_with_fee", &amount), - TMH_PARSE_MEMBER_END + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("coin_pub", &r_melt_detail->coin_info.coin_pub), + TALER_JSON_spec_denomination_signature ("denom_sig", &sig), + TALER_JSON_spec_denomination_public_key ("denom_pub", &pk), + GNUNET_JSON_spec_fixed_auto ("confirm_sig", &melt_sig), + TALER_JSON_spec_amount ("value_with_fee", &amount), + GNUNET_JSON_spec_end () }; ret = TMH_PARSE_json_data (connection, @@ -216,7 +216,7 @@ get_coin_public_info (struct MHD_Connection *connection, TALER_test_coin_valid (&r_melt_detail->coin_info)) { GNUNET_break_op (0); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); r_melt_detail->coin_info.denom_sig.rsa_signature = NULL; r_melt_detail->coin_info.denom_pub.rsa_public_key = NULL; return (MHD_YES == @@ -409,12 +409,16 @@ handle_refresh_melt_json (struct MHD_Connection *connection, { char *buf; size_t buf_size; + struct GNUNET_JSON_Specification spec[] = { + TALER_JSON_spec_denomination_public_key (NULL, + &denom_pubs[i]), + GNUNET_JSON_spec_end () + }; - res = TMH_PARSE_navigate_json (connection, - new_denoms, - TMH_PARSE_JNC_INDEX, (int) i, - TMH_PARSE_JNC_RET_RSA_PUBLIC_KEY, - &denom_pubs[i].rsa_public_key); + res = TMH_PARSE_json_array (connection, + new_denoms, + spec, + i, -1); if (GNUNET_OK != res) { res = (GNUNET_NO == res) ? MHD_YES : MHD_NO; @@ -436,6 +440,7 @@ handle_refresh_melt_json (struct MHD_Connection *connection, /* decode JSON data on coin to melt */ struct TALER_AmountNBO melt_amount; + // FIXME: check json_array_get() return value for NULL! res = get_coin_public_info (connection, json_array_get (melt_coins, i), &coin_melt_details[i]); @@ -482,15 +487,23 @@ handle_refresh_melt_json (struct MHD_Connection *connection, char *link_enc; size_t link_enc_size; struct TALER_EXCHANGEDB_RefreshCommitCoin *rcc = &commit_coin[i][j]; + struct GNUNET_JSON_Specification coin_spec[] = { + GNUNET_JSON_spec_varsize (NULL, + (void **) &rcc->coin_ev, + &rcc->coin_ev_size), + GNUNET_JSON_spec_end () + }; + struct GNUNET_JSON_Specification link_spec[] = { + GNUNET_JSON_spec_varsize (NULL, + (void **) &link_enc, + &link_enc_size), + GNUNET_JSON_spec_end () + }; - res = TMH_PARSE_navigate_json (connection, - coin_evs, - TMH_PARSE_JNC_INDEX, (int) i, - TMH_PARSE_JNC_INDEX, (int) j, - TMH_PARSE_JNC_RET_DATA_VAR, - &rcc->coin_ev, - &rcc->coin_ev_size); - + res = TMH_PARSE_json_array (connection, + coin_evs, + coin_spec, + i, j, -1); if (GNUNET_OK != res) { GNUNET_break_op (0); @@ -501,13 +514,10 @@ handle_refresh_melt_json (struct MHD_Connection *connection, GNUNET_CRYPTO_hash_context_read (hash_context, rcc->coin_ev, rcc->coin_ev_size); - res = TMH_PARSE_navigate_json (connection, - link_encs, - TMH_PARSE_JNC_INDEX, (int) i, - TMH_PARSE_JNC_INDEX, (int) j, - TMH_PARSE_JNC_RET_DATA_VAR, - &link_enc, - &link_enc_size); + res = TMH_PARSE_json_array (connection, + link_encs, + link_spec, + i, j, -1); if (GNUNET_OK != res) { GNUNET_break_op (0); @@ -520,7 +530,7 @@ handle_refresh_melt_json (struct MHD_Connection *connection, GNUNET_CRYPTO_hash_context_read (hash_context, link_enc, link_enc_size); - GNUNET_free (link_enc); + GNUNET_JSON_parse_free (link_spec); } } @@ -531,27 +541,29 @@ handle_refresh_melt_json (struct MHD_Connection *connection, for (j = 0; j < num_oldcoins; j++) { struct TALER_RefreshCommitLinkP *rcl = &commit_link[i][j]; + struct GNUNET_JSON_Specification trans_spec[] = { + GNUNET_JSON_spec_fixed_auto (NULL, &rcl->transfer_pub), + GNUNET_JSON_spec_end () + }; + struct GNUNET_JSON_Specification sec_spec[] = { + GNUNET_JSON_spec_fixed_auto (NULL, &rcl->shared_secret_enc), + GNUNET_JSON_spec_end () + }; - res = TMH_PARSE_navigate_json (connection, - transfer_pubs, - TMH_PARSE_JNC_INDEX, (int) i, - TMH_PARSE_JNC_INDEX, (int) j, - TMH_PARSE_JNC_RET_DATA, - &rcl->transfer_pub, - sizeof (struct TALER_TransferPublicKeyP)); + res = TMH_PARSE_json_array (connection, + transfer_pubs, + trans_spec, + i, j, -1); if (GNUNET_OK != res) { GNUNET_break_op (0); res = (GNUNET_SYSERR == res) ? MHD_NO : MHD_YES; goto cleanup; } - res = TMH_PARSE_navigate_json (connection, - secret_encs, - TMH_PARSE_JNC_INDEX, (int) i, - TMH_PARSE_JNC_INDEX, (int) j, - TMH_PARSE_JNC_RET_DATA, - &rcl->shared_secret_enc, - sizeof (struct TALER_EncryptedLinkSecretP)); + res = TMH_PARSE_json_array (connection, + secret_encs, + sec_spec, + i, j, -1); if (GNUNET_OK != res) { GNUNET_break_op (0); @@ -646,15 +658,16 @@ TMH_REFRESH_handler_refresh_melt (struct TMH_RequestHandler *rh, unsigned int num_oldcoins; unsigned int num_newcoins; json_t *coin_detail; + json_t *trans_detail; int res; - struct TMH_PARSE_FieldSpecification spec[] = { - TMH_PARSE_member_array ("new_denoms", &new_denoms), - TMH_PARSE_member_array ("melt_coins", &melt_coins), - TMH_PARSE_member_array ("coin_evs", &coin_evs), - TMH_PARSE_member_array ("link_encs", &link_encs), - TMH_PARSE_member_array ("transfer_pubs", &transfer_pubs), - TMH_PARSE_member_array ("secret_encs", &secret_encs), - TMH_PARSE_MEMBER_END + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_json ("new_denoms", &new_denoms), + GNUNET_JSON_spec_json ("melt_coins", &melt_coins), + GNUNET_JSON_spec_json ("coin_evs", &coin_evs), + GNUNET_JSON_spec_json ("link_encs", &link_encs), + GNUNET_JSON_spec_json ("transfer_pubs", &transfer_pubs), + GNUNET_JSON_spec_json ("secret_encs", &secret_encs), + GNUNET_JSON_spec_end () }; res = TMH_PARSE_post_json (connection, @@ -678,43 +691,36 @@ TMH_REFRESH_handler_refresh_melt (struct TMH_RequestHandler *rh, if (TALER_CNC_KAPPA != json_array_size (coin_evs)) { GNUNET_break_op (0); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return TMH_RESPONSE_reply_arg_invalid (connection, "coin_evs"); } if (TALER_CNC_KAPPA != json_array_size (transfer_pubs)) { GNUNET_break_op (0); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return TMH_RESPONSE_reply_arg_invalid (connection, "transfer_pubs"); } - res = TMH_PARSE_navigate_json (connection, - coin_evs, - TMH_PARSE_JNC_INDEX, (int) 0, - TMH_PARSE_JNC_RET_TYPED_JSON, - JSON_ARRAY, &coin_detail); - if (GNUNET_OK != res) + coin_detail = json_array_get (coin_evs, 0); + if (NULL == coin_detail) { + // FIXME: generate proper HTTP response! GNUNET_break_op (0); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return (GNUNET_SYSERR == res) ? MHD_NO : MHD_YES; } num_newcoins = json_array_size (coin_detail); - json_decref (coin_detail); - res = TMH_PARSE_navigate_json (connection, - transfer_pubs, - TMH_PARSE_JNC_INDEX, (int) 0, - TMH_PARSE_JNC_RET_TYPED_JSON, - JSON_ARRAY, &coin_detail); - if (GNUNET_OK != res) + + trans_detail = json_array_get (transfer_pubs, 0); + if (NULL == trans_detail) { + // FIXME: generate proper HTTP response! GNUNET_break_op (0); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return (GNUNET_SYSERR == res) ? MHD_NO : MHD_YES; } - num_oldcoins = json_array_size (coin_detail); - json_decref (coin_detail); + num_oldcoins = json_array_size (trans_detail); res = handle_refresh_melt_json (connection, new_denoms, melt_coins, @@ -724,7 +730,7 @@ TMH_REFRESH_handler_refresh_melt (struct TMH_RequestHandler *rh, num_newcoins, coin_evs, link_encs); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return res; } @@ -763,15 +769,16 @@ handle_refresh_reveal_json (struct MHD_Connection *connection, break; for (j = 0; j < num_oldcoins; j++) { + struct GNUNET_JSON_Specification tp_spec[] = { + GNUNET_JSON_spec_fixed_auto (NULL, &transfer_privs[i][j]), + GNUNET_JSON_spec_end () + }; if (GNUNET_OK != res) break; - res = TMH_PARSE_navigate_json (connection, - tp_json, - TMH_PARSE_JNC_INDEX, (int) i, - TMH_PARSE_JNC_INDEX, (int) j, - TMH_PARSE_JNC_RET_DATA, - &transfer_privs[i][j], - sizeof (struct TALER_TransferPrivateKeyP)); + res = TMH_PARSE_json_array (connection, + tp_json, + tp_spec, + i, j, -1); GNUNET_break_op (GNUNET_OK == res); } } @@ -817,10 +824,10 @@ TMH_REFRESH_handler_refresh_reveal (struct TMH_RequestHandler *rh, json_t *reveal_detail; json_t *root; json_t *transfer_privs; - struct TMH_PARSE_FieldSpecification spec[] = { - TMH_PARSE_member_fixed ("session_hash", &session_hash), - TMH_PARSE_member_array ("transfer_privs", &transfer_privs), - TMH_PARSE_MEMBER_END + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("session_hash", &session_hash), + GNUNET_JSON_spec_json ("transfer_privs", &transfer_privs), + GNUNET_JSON_spec_end () }; res = TMH_PARSE_post_json (connection, @@ -846,30 +853,25 @@ TMH_REFRESH_handler_refresh_reveal (struct TMH_RequestHandler *rh, /* Note we do +1 as 1 row (cut-and-choose!) is missing! */ if (TALER_CNC_KAPPA != json_array_size (transfer_privs) + 1) { - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); GNUNET_break_op (0); return TMH_RESPONSE_reply_arg_invalid (connection, "transfer_privs"); } - res = TMH_PARSE_navigate_json (connection, - transfer_privs, - TMH_PARSE_JNC_INDEX, 0, - TMH_PARSE_JNC_RET_TYPED_JSON, - JSON_ARRAY, - &reveal_detail); - if (GNUNET_OK != res) + reveal_detail = json_array_get (transfer_privs, 0); + if (NULL == reveal_detail) { - TMH_PARSE_release_data (spec); + // FIXME: generate proper HTTP response! + GNUNET_JSON_parse_free (spec); GNUNET_break_op (0); return (GNUNET_SYSERR == res) ? MHD_NO : MHD_YES; } num_oldcoins = json_array_size (reveal_detail); - json_decref (reveal_detail); res = handle_refresh_reveal_json (connection, &session_hash, num_oldcoins, transfer_privs); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return res; } diff --git a/src/exchange/taler-exchange-httpd_reserve.c b/src/exchange/taler-exchange-httpd_reserve.c index 45f073107..1763280ed 100644 --- a/src/exchange/taler-exchange-httpd_reserve.c +++ b/src/exchange/taler-exchange-httpd_reserve.c @@ -101,17 +101,17 @@ TMH_RESERVE_handler_reserve_withdraw (struct TMH_RequestHandler *rh, struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki; struct TMH_KS_StateHandle *ks; - struct TMH_PARSE_FieldSpecification spec[] = { - TMH_PARSE_member_variable ("coin_ev", + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_varsize ("coin_ev", (void **) &blinded_msg, &blinded_msg_len), - TMH_PARSE_member_fixed ("reserve_pub", + GNUNET_JSON_spec_fixed_auto ("reserve_pub", &wsrd.reserve_pub), - TMH_PARSE_member_fixed ("reserve_sig", + GNUNET_JSON_spec_fixed_auto ("reserve_sig", &signature), - TMH_PARSE_member_denomination_public_key ("denom_pub", + TALER_JSON_spec_denomination_public_key ("denom_pub", &denomination_pub), - TMH_PARSE_MEMBER_END + GNUNET_JSON_spec_end () }; res = TMH_PARSE_post_json (connection, @@ -135,7 +135,7 @@ TMH_RESERVE_handler_reserve_withdraw (struct TMH_RequestHandler *rh, TMH_KS_DKU_WITHDRAW); if (NULL == dki) { - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); TMH_KS_release (ks); return TMH_RESPONSE_reply_arg_unknown (connection, "denom_pub"); @@ -169,7 +169,7 @@ TMH_RESERVE_handler_reserve_withdraw (struct TMH_RequestHandler *rh, &wsrd.reserve_pub.eddsa_pub)) { TALER_LOG_WARNING ("Client supplied invalid signature for /reserve/withdraw request\n"); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return TMH_RESPONSE_reply_signature_invalid (connection, "reserve_sig"); } @@ -179,7 +179,7 @@ TMH_RESERVE_handler_reserve_withdraw (struct TMH_RequestHandler *rh, blinded_msg, blinded_msg_len, &signature); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return res; } diff --git a/src/exchange/taler-exchange-httpd_test.c b/src/exchange/taler-exchange-httpd_test.c index 7b6438cae..0a4181ed8 100644 --- a/src/exchange/taler-exchange-httpd_test.c +++ b/src/exchange/taler-exchange-httpd_test.c @@ -63,9 +63,9 @@ TMH_TEST_handler_test_base32 (struct TMH_RequestHandler *rh, void *in_ptr; size_t in_ptr_size; struct GNUNET_HashCode hc; - struct TMH_PARSE_FieldSpecification spec[] = { - TMH_PARSE_member_variable ("input", &in_ptr, &in_ptr_size), - TMH_PARSE_MEMBER_END + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_varsize ("input", &in_ptr, &in_ptr_size), + GNUNET_JSON_spec_end () }; res = TMH_PARSE_post_json (connection, @@ -85,7 +85,7 @@ TMH_TEST_handler_test_base32 (struct TMH_RequestHandler *rh, GNUNET_CRYPTO_hash (in_ptr, in_ptr_size, &hc); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); json_decref (json); return TMH_RESPONSE_reply_json_pack (connection, MHD_HTTP_OK, @@ -126,10 +126,10 @@ TMH_TEST_handler_test_encrypt (struct TMH_RequestHandler *rh, struct GNUNET_CRYPTO_SymmetricSessionKey skey; void *in_ptr; size_t in_ptr_size; - struct TMH_PARSE_FieldSpecification spec[] = { - TMH_PARSE_member_variable ("input", &in_ptr, &in_ptr_size), - TMH_PARSE_member_fixed ("key_hash", &key), - TMH_PARSE_MEMBER_END + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_varsize ("input", &in_ptr, &in_ptr_size), + GNUNET_JSON_spec_fixed_auto ("key_hash", &key), + GNUNET_JSON_spec_end () }; char *out; @@ -168,7 +168,7 @@ TMH_TEST_handler_test_encrypt (struct TMH_RequestHandler *rh, json = GNUNET_JSON_from_data (out, in_ptr_size); GNUNET_free (out); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return TMH_RESPONSE_reply_json_pack (connection, MHD_HTTP_OK, "{s:o}", @@ -206,9 +206,9 @@ TMH_TEST_handler_test_hkdf (struct TMH_RequestHandler *rh, struct GNUNET_HashCode hc; void *in_ptr; size_t in_ptr_size; - struct TMH_PARSE_FieldSpecification spec[] = { - TMH_PARSE_member_variable ("input", &in_ptr, &in_ptr_size), - TMH_PARSE_MEMBER_END + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_varsize ("input", &in_ptr, &in_ptr_size), + GNUNET_JSON_spec_end () }; res = TMH_PARSE_post_json (connection, @@ -231,7 +231,7 @@ TMH_TEST_handler_test_hkdf (struct TMH_RequestHandler *rh, in_ptr, in_ptr_size, NULL, 0); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); json = GNUNET_JSON_from_data (&hc, sizeof (struct GNUNET_HashCode)); return TMH_RESPONSE_reply_json_pack (connection, @@ -268,10 +268,10 @@ TMH_TEST_handler_test_ecdhe (struct TMH_RequestHandler *rh, struct GNUNET_CRYPTO_EcdhePublicKey pub; struct GNUNET_CRYPTO_EcdhePrivateKey priv; struct GNUNET_HashCode hc; - struct TMH_PARSE_FieldSpecification spec[] = { - TMH_PARSE_member_fixed ("ecdhe_pub", &pub), - TMH_PARSE_member_fixed ("ecdhe_priv", &priv), - TMH_PARSE_MEMBER_END + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("ecdhe_pub", &pub), + GNUNET_JSON_spec_fixed_auto ("ecdhe_priv", &priv), + GNUNET_JSON_spec_end () }; res = TMH_PARSE_post_json (connection, @@ -294,11 +294,11 @@ TMH_TEST_handler_test_ecdhe (struct TMH_RequestHandler *rh, &pub, &hc)) { - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return TMH_RESPONSE_reply_internal_error (connection, "Failed to perform ECDH"); } - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return TMH_RESPONSE_reply_json_pack (connection, MHD_HTTP_OK, "{s:o}", @@ -335,10 +335,10 @@ TMH_TEST_handler_test_eddsa (struct TMH_RequestHandler *rh, struct GNUNET_CRYPTO_EddsaPublicKey pub; struct GNUNET_CRYPTO_EddsaSignature sig; struct GNUNET_CRYPTO_EccSignaturePurpose purpose; - struct TMH_PARSE_FieldSpecification spec[] = { - TMH_PARSE_member_fixed ("eddsa_pub", &pub), - TMH_PARSE_member_fixed ("eddsa_sig", &sig), - TMH_PARSE_MEMBER_END + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("eddsa_pub", &pub), + GNUNET_JSON_spec_fixed_auto ("eddsa_sig", &sig), + GNUNET_JSON_spec_end () }; struct GNUNET_CRYPTO_EddsaPrivateKey *pk; @@ -365,11 +365,11 @@ TMH_TEST_handler_test_eddsa (struct TMH_RequestHandler *rh, &sig, &pub)) { - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return TMH_RESPONSE_reply_signature_invalid (connection, "eddsa_sig"); } - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); pk = GNUNET_CRYPTO_eddsa_key_create (); purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_TEST_EDDSA); if (GNUNET_OK != @@ -466,9 +466,9 @@ TMH_TEST_handler_test_rsa_sign (struct TMH_RequestHandler *rh, struct GNUNET_CRYPTO_rsa_Signature *sig; void *in_ptr; size_t in_ptr_size; - struct TMH_PARSE_FieldSpecification spec[] = { - TMH_PARSE_member_variable ("blind_ev", &in_ptr, &in_ptr_size), - TMH_PARSE_MEMBER_END + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_varsize ("blind_ev", &in_ptr, &in_ptr_size), + GNUNET_JSON_spec_end () }; res = TMH_PARSE_post_json (connection, @@ -491,7 +491,7 @@ TMH_TEST_handler_test_rsa_sign (struct TMH_RequestHandler *rh, if (NULL == rsa_pk) { GNUNET_break (0); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return TMH_RESPONSE_reply_internal_error (connection, "Failed to create RSA key"); } @@ -501,11 +501,11 @@ TMH_TEST_handler_test_rsa_sign (struct TMH_RequestHandler *rh, if (NULL == sig) { GNUNET_break (0); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return TMH_RESPONSE_reply_internal_error (connection, "Failed to RSA-sign"); } - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); res = TMH_RESPONSE_reply_json_pack (connection, MHD_HTTP_OK, "{s:o}", @@ -542,11 +542,11 @@ TMH_TEST_handler_test_transfer (struct TMH_RequestHandler *rh, struct TALER_EncryptedLinkSecretP secret_enc; struct TALER_TransferPrivateKeyP trans_priv; struct TALER_CoinSpendPublicKeyP coin_pub; - struct TMH_PARSE_FieldSpecification spec[] = { - TMH_PARSE_member_fixed ("secret_enc", &secret_enc), - TMH_PARSE_member_fixed ("trans_priv", &trans_priv), - TMH_PARSE_member_fixed ("coin_pub", &coin_pub), - TMH_PARSE_MEMBER_END + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("secret_enc", &secret_enc), + GNUNET_JSON_spec_fixed_auto ("trans_priv", &trans_priv), + GNUNET_JSON_spec_fixed_auto ("coin_pub", &coin_pub), + GNUNET_JSON_spec_end () }; struct TALER_LinkSecretP secret; @@ -571,7 +571,7 @@ TMH_TEST_handler_test_transfer (struct TMH_RequestHandler *rh, &coin_pub, &secret)) { - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); return TMH_RESPONSE_reply_internal_error (connection, "Failed to decrypt secret"); } diff --git a/src/exchange/taler-exchange-httpd_tracking.c b/src/exchange/taler-exchange-httpd_tracking.c index afb821cb9..36782332d 100644 --- a/src/exchange/taler-exchange-httpd_tracking.c +++ b/src/exchange/taler-exchange-httpd_tracking.c @@ -121,14 +121,14 @@ TMH_TRACKING_handler_deposit_wtid (struct TMH_RequestHandler *rh, struct TALER_DepositTrackPS tps; uint64_t transaction_id; struct TALER_MerchantSignatureP merchant_sig; - struct TMH_PARSE_FieldSpecification spec[] = { - TMH_PARSE_member_fixed ("H_wire", &tps.h_wire), - TMH_PARSE_member_fixed ("H_contract", &tps.h_contract), - TMH_PARSE_member_fixed ("coin_pub", &tps.coin_pub), - TMH_PARSE_member_uint64 ("transaction_id", &transaction_id), - TMH_PARSE_member_fixed ("merchant_pub", &tps.merchant), - TMH_PARSE_member_fixed ("merchant_sig", &merchant_sig), - TMH_PARSE_MEMBER_END + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("H_wire", &tps.h_wire), + GNUNET_JSON_spec_fixed_auto ("H_contract", &tps.h_contract), + GNUNET_JSON_spec_fixed_auto ("coin_pub", &tps.coin_pub), + GNUNET_JSON_spec_uint64 ("transaction_id", &transaction_id), + GNUNET_JSON_spec_fixed_auto ("merchant_pub", &tps.merchant), + GNUNET_JSON_spec_fixed_auto ("merchant_sig", &merchant_sig), + GNUNET_JSON_spec_end () }; res = TMH_PARSE_post_json (connection, @@ -156,7 +156,7 @@ TMH_TRACKING_handler_deposit_wtid (struct TMH_RequestHandler *rh, &tps.merchant, &merchant_sig, transaction_id); - TMH_PARSE_release_data (spec); + GNUNET_JSON_parse_free (spec); json_decref (json); return res; } diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h index aee151b97..3dd661a91 100644 --- a/src/include/taler_json_lib.h +++ b/src/include/taler_json_lib.h @@ -57,6 +57,30 @@ TALER_JSON_spec_amount (const char *name, struct TALER_Amount *r_amount); +/** + * Generate line in parser specification for denomination public key. + * + * @param field name of the field + * @param[out] pk key to initialize + * @return corresponding field spec + */ +struct GNUNET_JSON_Specification +TALER_JSON_spec_denomination_public_key (const char *field, + struct TALER_DenominationPublicKey *pk); + + +/** + * Generate line in parser specification for denomination signature. + * + * @param field name of the field + * @param sig the signature to initialize + * @return corresponding field spec + */ +struct GNUNET_JSON_Specification +TALER_JSON_spec_denomination_signature (const char *field, + struct TALER_DenominationSignature *sig); + + /** * Hash a JSON for binary signing. * diff --git a/src/json/json_helper.c b/src/json/json_helper.c index b61fe21a6..7eaaa441a 100644 --- a/src/json/json_helper.c +++ b/src/json/json_helper.c @@ -143,4 +143,36 @@ TALER_JSON_spec_amount (const char *name, } +/** + * Generate line in parser specification for denomination public key. + * + * @param field name of the field + * @param[out] pk key to initialize + * @return corresponding field spec + */ +struct GNUNET_JSON_Specification +TALER_JSON_spec_denomination_public_key (const char *field, + struct TALER_DenominationPublicKey *pk) +{ + return GNUNET_JSON_spec_rsa_public_key (field, + &pk->rsa_public_key); +} + + +/** + * Generate line in parser specification for denomination signature. + * + * @param field name of the field + * @param sig the signature to initialize + * @return corresponding field spec + */ +struct GNUNET_JSON_Specification +TALER_JSON_spec_denomination_signature (const char *field, + struct TALER_DenominationSignature *sig) +{ + return GNUNET_JSON_spec_rsa_signature (field, + &sig->rsa_signature); +} + + /* end of json/json_helper.c */ From 6f8fa678c1f4672165cd82ddb43ec3546d9552a9 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 21 Mar 2016 01:45:53 +0100 Subject: [PATCH 23/91] implementing #3987 --- doc/taler-auditor-sign.1 | 5 +- src/exchange-lib/exchange_api_handle.c | 12 ++- src/exchange-tools/taler-auditor-sign.c | 31 +++++-- src/exchange/taler-exchange-httpd_keystate.c | 10 ++- src/exchangedb/exchangedb_keyio.c | 92 +++++++++++++++----- src/include/taler_exchange_service.h | 20 ++--- src/include/taler_exchangedb_lib.h | 51 ++++++----- src/include/taler_signatures.h | 7 +- 8 files changed, 159 insertions(+), 69 deletions(-) diff --git a/doc/taler-auditor-sign.1 b/doc/taler-auditor-sign.1 index 177d0df04..f0f90a5b8 100644 --- a/doc/taler-auditor-sign.1 +++ b/doc/taler-auditor-sign.1 @@ -1,4 +1,4 @@ -.TH TALER\-AUDITOR\-SIGN 1 "Sep 15, 2015" "GNU Taler" +.TH TALER\-AUDITOR\-SIGN 1 "Mar 15, 2016" "GNU Taler" .SH NAME taler\-auditor\-sign \- Sign exchange denomination as auditor. @@ -22,6 +22,9 @@ Print short help on options. .IP "\-m KEY, \-\-exchange-key=KEY" Public key of the exchange in Crockford base32 encoding, for example as generated by gnunet\-ecc \-p. .B +.IP "\-u URL, \-\-auditor-url=URL" +URL of the auditor. Provides informative link for the user to learn more about the auditor. +.B .IP "\-r FILE, \-\-exchange-request=FILE" File with the exchange's denomination key signing request as generated by taler\-exchange\-keyup \-o. .B diff --git a/src/exchange-lib/exchange_api_handle.c b/src/exchange-lib/exchange_api_handle.c index aaca8bac1..26f5e7e15 100644 --- a/src/exchange-lib/exchange_api_handle.c +++ b/src/exchange-lib/exchange_api_handle.c @@ -360,16 +360,18 @@ parse_json_auditor (struct TALER_EXCHANGE_AuditorInformation *auditor, unsigned int len; unsigned int off; unsigned int i; + const char *auditor_url; struct TALER_ExchangeKeyValidityPS kv; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_fixed_auto ("auditor_pub", - &auditor->auditor_pub), + &auditor->auditor_pub), + GNUNET_JSON_spec_string ("auditor_url", + &auditor_url), GNUNET_JSON_spec_json ("denomination_keys", - &keys), + &keys), GNUNET_JSON_spec_end() }; - auditor->auditor_url = NULL; /* #3987 */ if (GNUNET_OK != GNUNET_JSON_parse (auditor_obj, spec, @@ -378,8 +380,12 @@ parse_json_auditor (struct TALER_EXCHANGE_AuditorInformation *auditor, GNUNET_break_op (0); return GNUNET_SYSERR; } + auditor->auditor_url = GNUNET_strdup (auditor_url); kv.purpose.purpose = htonl (TALER_SIGNATURE_AUDITOR_EXCHANGE_KEYS); kv.purpose.size = htonl (sizeof (struct TALER_ExchangeKeyValidityPS)); + GNUNET_CRYPTO_hash (auditor_url, + strlen (auditor_url) + 1, + &kv.auditor_url_hash); kv.master = key_data->master_pub; len = json_array_size (keys); auditor->denom_keys = GNUNET_new_array (len, diff --git a/src/exchange-tools/taler-auditor-sign.c b/src/exchange-tools/taler-auditor-sign.c index e4821f411..bde34b2a3 100644 --- a/src/exchange-tools/taler-auditor-sign.c +++ b/src/exchange-tools/taler-auditor-sign.c @@ -49,6 +49,11 @@ static char *exchange_request_file; */ static char *output_file; +/** + * URL of the auditor (informative for the user). + */ +static char *auditor_url; + /** * Master public key of the exchange. */ @@ -134,6 +139,10 @@ main (int argc, {'m', "exchange-key", "KEY", "public key of the exchange (Crockford base32 encoded)", 1, &GNUNET_GETOPT_set_filename, &exchange_public_key}, + {'u', "auditor-url", "URL", + "URL of the auditor (informative link for the user)", 1, + &GNUNET_GETOPT_set_string, &auditor_url}, + TALER_GETOPT_OPTION_HELP ("Private key of the auditor to use for signing"), {'r', "exchange-request", "FILE", "set of keys the exchange requested the auditor to sign", 1, &GNUNET_GETOPT_set_string, &exchange_request_file}, @@ -168,6 +177,12 @@ main (int argc, "Auditor key file not given\n"); return 1; } + if (NULL == auditor_url) + { + fprintf (stderr, + "Auditor URL not given\n"); + return 1; + } eddsa_priv = GNUNET_CRYPTO_eddsa_key_create_from_file (auditor_key_file); if (NULL == eddsa_priv) { @@ -240,6 +255,9 @@ main (int argc, dks_len = in_size / sizeof (struct TALER_DenominationKeyValidityPS); kv.purpose.purpose = htonl (TALER_SIGNATURE_AUDITOR_EXCHANGE_KEYS); kv.purpose.size = htonl (sizeof (struct TALER_ExchangeKeyValidityPS)); + GNUNET_CRYPTO_hash (auditor_url, + strlen (auditor_url) + 1, + &kv.auditor_url_hash); kv.master = master_public_key; dks = GNUNET_new_array (dks_len, struct TALER_DenominationKeyValidityPS); @@ -281,8 +299,6 @@ main (int argc, GNUNET_CRYPTO_eddsa_sign (eddsa_priv, &kv.purpose, &sigs[i].eddsa_sig); - - } if (NULL == output_file) @@ -298,11 +314,12 @@ main (int argc, /* write result to disk */ if (GNUNET_OK != TALER_EXCHANGEDB_auditor_write (output_file, - &apub, - sigs, - &master_public_key, - dks_len, - dks)) + &apub, + auditor_url, + sigs, + &master_public_key, + dks_len, + dks)) { fprintf (stderr, "Failed to write to file `%s': %s\n", diff --git a/src/exchange/taler-exchange-httpd_keystate.c b/src/exchange/taler-exchange-httpd_keystate.c index bf91b8183..dbb72fab2 100644 --- a/src/exchange/taler-exchange-httpd_keystate.c +++ b/src/exchange/taler-exchange-httpd_keystate.c @@ -419,6 +419,7 @@ reload_keys_sign_iter (void *cls, * Convert information from an auditor to a JSON object. * * @param apub the auditor's public key + * @param auditor_url URL of the auditor * @param dki_len length of @a dki and @a asigs arrays * @param asigs the auditor's signatures * @param dki array of denomination coin data signed by the auditor @@ -426,6 +427,7 @@ reload_keys_sign_iter (void *cls, */ static json_t * auditor_to_json (const struct TALER_AuditorPublicKeyP *apub, + const char *auditor_url, unsigned int dki_len, const struct TALER_AuditorSignatureP **asigs, const struct TALER_DenominationKeyValidityPS **dki) @@ -442,10 +444,11 @@ auditor_to_json (const struct TALER_AuditorPublicKeyP *apub, sizeof (struct GNUNET_HashCode)), "auditor_sig", GNUNET_JSON_from_data (asigs[i], - sizeof (struct TALER_AuditorSignatureP)))); + sizeof (struct TALER_AuditorSignatureP)))); return - json_pack ("{s:o, s:o}", + json_pack ("{s:o, s:s, s:o}", "denomination_keys", ja, + "auditor_url", auditor_url, "auditor_pub", GNUNET_JSON_from_data (apub, sizeof (struct TALER_AuditorPublicKeyP))); @@ -460,6 +463,7 @@ auditor_to_json (const struct TALER_AuditorPublicKeyP *apub, * * @param cls closure with the `struct TMH_KS_StateHandle *` * @param apub the auditor's public key + * @param auditor_url URL of the auditor * @param mpub the exchange's public key (as expected by the auditor) * @param dki_len length of @a dki and @a asigs * @param asigs array with the auditor's signatures, of length @a dki_len @@ -471,6 +475,7 @@ auditor_to_json (const struct TALER_AuditorPublicKeyP *apub, static int reload_auditor_iter (void *cls, const struct TALER_AuditorPublicKeyP *apub, + const char *auditor_url, const struct TALER_MasterPublicKeyP *mpub, unsigned int dki_len, const struct TALER_AuditorSignatureP *asigs, @@ -508,6 +513,7 @@ reload_auditor_iter (void *cls, /* add auditor information to our /keys response */ json_array_append_new (ctx->auditors_array, auditor_to_json (apub, + auditor_url, keep, kept_asigs, kept_dkis)); diff --git a/src/exchangedb/exchangedb_keyio.c b/src/exchangedb/exchangedb_keyio.c index 6b8ca24e3..e560e8d6b 100644 --- a/src/exchangedb/exchangedb_keyio.c +++ b/src/exchangedb/exchangedb_keyio.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014, 2015 GNUnet e.V. + Copyright (C) 2014, 2015, 2016 Inria & GNUnet e.V. TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -93,8 +93,8 @@ signkeys_iterate_dir_iter (void *cls, */ int TALER_EXCHANGEDB_signing_keys_iterate (const char *exchange_base_dir, - TALER_EXCHANGEDB_SigningKeyIterator it, - void *it_cls) + TALER_EXCHANGEDB_SigningKeyIterator it, + void *it_cls) { char *signkey_dir; struct SignkeysIterateContext skc; @@ -123,7 +123,7 @@ TALER_EXCHANGEDB_signing_keys_iterate (const char *exchange_base_dir, */ int TALER_EXCHANGEDB_denomination_key_read (const char *filename, - struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki) + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki) { uint64_t size; size_t offset; @@ -186,7 +186,7 @@ TALER_EXCHANGEDB_denomination_key_read (const char *filename, */ int TALER_EXCHANGEDB_denomination_key_write (const char *filename, - const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki) + const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki) { char *priv_enc; size_t priv_enc_size; @@ -331,8 +331,8 @@ denomkeys_iterate_topdir_iter (void *cls, */ int TALER_EXCHANGEDB_denomination_keys_iterate (const char *exchange_base_dir, - TALER_EXCHANGEDB_DenominationKeyIterator it, - void *it_cls) + TALER_EXCHANGEDB_DenominationKeyIterator it, + void *it_cls) { char *dir; struct DenomkeysIterateContext dic; @@ -388,6 +388,11 @@ struct AuditorFileHeaderP */ struct TALER_MasterPublicKeyP mpub; + /** + * Number of signatures and DKI entries in this file. + */ + uint32_t dki_len; + }; GNUNET_NETWORK_STRUCT_END @@ -412,7 +417,9 @@ auditor_iter (void *cls, struct AuditorFileHeaderP *af; const struct TALER_AuditorSignatureP *sigs; const struct TALER_DenominationKeyValidityPS *dki; - unsigned int len; + const char *auditor_url; + unsigned int dki_len; + size_t url_len; int ret; if (GNUNET_OK != GNUNET_DISK_file_size (filename, @@ -425,10 +432,7 @@ auditor_iter (void *cls, filename); return GNUNET_SYSERR; } - if ( (size < sizeof (struct AuditorFileHeaderP)) || - (0 != (len = ((size - sizeof (struct AuditorFileHeaderP)) % - (sizeof (struct TALER_DenominationKeyValidityPS) + - sizeof (struct TALER_AuditorSignatureP))))) ) + if (size < sizeof (struct AuditorFileHeaderP)) { GNUNET_break (0); return GNUNET_SYSERR; @@ -445,12 +449,49 @@ auditor_iter (void *cls, GNUNET_free (af); return GNUNET_SYSERR; } + dki_len = ntohl (af->dki_len); + if (0 == dki_len) + { + GNUNET_break_op (0); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "No signed keys in %s\n", + filename); + GNUNET_free (af); + return GNUNET_SYSERR; + } + if ( (size - sizeof (struct AuditorFileHeaderP)) / dki_len < + (sizeof (struct TALER_DenominationKeyValidityPS) + + sizeof (struct TALER_AuditorSignatureP)) ) + { + GNUNET_break_op (0); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Malformed key file %s\n", + filename); + GNUNET_free (af); + return GNUNET_SYSERR; + } + url_len = size + - sizeof (struct AuditorFileHeaderP) + - dki_len * (sizeof (struct TALER_DenominationKeyValidityPS) + + sizeof (struct TALER_AuditorSignatureP)); sigs = (const struct TALER_AuditorSignatureP *) &af[1]; - dki = (const struct TALER_DenominationKeyValidityPS *) &sigs[len]; + dki = (const struct TALER_DenominationKeyValidityPS *) &sigs[dki_len]; + auditor_url = (const char *) &dki[dki_len]; + if ( (0 == url_len) || + ('\0' != auditor_url[url_len - 1]) ) + { + GNUNET_break_op (0); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Malformed key file %s\n", + filename); + GNUNET_free (af); + return GNUNET_SYSERR; + } ret = aic->it (aic->it_cls, &af->apub, + auditor_url, &af->mpub, - len, + dki_len, sigs, dki); GNUNET_free (af); @@ -473,8 +514,8 @@ auditor_iter (void *cls, */ int TALER_EXCHANGEDB_auditor_iterate (const char *exchange_base_dir, - TALER_EXCHANGEDB_AuditorIterator it, - void *it_cls) + TALER_EXCHANGEDB_AuditorIterator it, + void *it_cls) { char *dir; struct AuditorIterateContext aic; @@ -498,6 +539,7 @@ TALER_EXCHANGEDB_auditor_iterate (const char *exchange_base_dir, * * @param filename the file where to write the auditor information to * @param apub the auditor's public key + * @param auditor_url the URL of the auditor * @param asigs the auditor's signatures, array of length @a dki_len * @param mpub the exchange's public key (as expected by the auditor) * @param dki_len length of @a dki @@ -506,11 +548,12 @@ TALER_EXCHANGEDB_auditor_iterate (const char *exchange_base_dir, */ int TALER_EXCHANGEDB_auditor_write (const char *filename, - const struct TALER_AuditorPublicKeyP *apub, - const struct TALER_AuditorSignatureP *asigs, - const struct TALER_MasterPublicKeyP *mpub, - unsigned int dki_len, - const struct TALER_DenominationKeyValidityPS *dki) + const struct TALER_AuditorPublicKeyP *apub, + const char *auditor_url, + const struct TALER_AuditorSignatureP *asigs, + const struct TALER_MasterPublicKeyP *mpub, + unsigned int dki_len, + const struct TALER_DenominationKeyValidityPS *dki) { struct AuditorFileHeaderP af; struct GNUNET_DISK_FileHandle *fh; @@ -521,6 +564,7 @@ TALER_EXCHANGEDB_auditor_write (const char *filename, af.apub = *apub; af.mpub = *mpub; + af.dki_len = htonl ((uint32_t) dki_len); ret = GNUNET_SYSERR; if (NULL == (fh = GNUNET_DISK_file_open (filename, @@ -546,6 +590,12 @@ TALER_EXCHANGEDB_auditor_write (const char *filename, dki, wsize)) ret = GNUNET_OK; + wsize = strlen (auditor_url) + 1; + if (wsize == + GNUNET_DISK_file_write (fh, + auditor_url, + wsize)) + ret = GNUNET_OK; cleanup: eno = errno; if (NULL != fh) diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index c3ecba968..cb1bd12aa 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h @@ -208,19 +208,19 @@ struct TALER_EXCHANGE_DenomPublicKey struct TALER_EXCHANGE_AuditorInformation { /** - * Public key of the auditing institution. + * Public key of the auditing institution. Wallets and merchants + * are expected to be configured with a set of public keys of + * auditors that they deem acceptable. These public keys are + * the roots of the Taler PKI. */ struct TALER_AuditorPublicKeyP auditor_pub; /** - * URL of the auditing institution. The application must check that - * this is an acceptable auditor for its purpose and also verify - * that the @a auditor_pub matches the auditor's public key given at - * that website. We expect that in practice software is going to - * often ship with an initial list of accepted auditors, just like - * browsers ship with a CA root store. - * - * This field may be NULL. (#3987). + * URL of the auditing institution. Signed by the auditor's public + * key, this URL is a place where applications can direct users for + * additional information about the auditor. In the future, there + * should also be an auditor API for automated submission about + * claims of misbehaving exchange providers. */ const char *auditor_url; @@ -230,7 +230,7 @@ struct TALER_EXCHANGE_AuditorInformation unsigned int num_denom_keys; /** - * Array of length @a denom_keys with the denomination + * Array of length @a num_denom_keys with the denomination * keys audited by this auditor. Note that the array * elements point to the same locations as the entries * in the key's main `denom_keys` array. diff --git a/src/include/taler_exchangedb_lib.h b/src/include/taler_exchangedb_lib.h index 347ad0650..e13df2d46 100644 --- a/src/include/taler_exchangedb_lib.h +++ b/src/include/taler_exchangedb_lib.h @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014, 2015 GNUnet e.V. + Copyright (C) 2014, 2015, 2016 Inria & GNUnet e.V. TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -125,8 +125,8 @@ struct TALER_EXCHANGEDB_DenominationKeyIssueInformation */ typedef int (*TALER_EXCHANGEDB_SigningKeyIterator)(void *cls, - const char *filename, - const struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP *ski); + const char *filename, + const struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP *ski); /** @@ -143,8 +143,8 @@ typedef int */ int TALER_EXCHANGEDB_signing_keys_iterate (const char *exchange_base_dir, - TALER_EXCHANGEDB_SigningKeyIterator it, - void *it_cls); + TALER_EXCHANGEDB_SigningKeyIterator it, + void *it_cls); @@ -160,8 +160,8 @@ TALER_EXCHANGEDB_signing_keys_iterate (const char *exchange_base_dir, */ typedef int (*TALER_EXCHANGEDB_DenominationKeyIterator)(void *cls, - const char *alias, - const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki); + const char *alias, + const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki); /** @@ -179,8 +179,8 @@ typedef int */ int TALER_EXCHANGEDB_denomination_keys_iterate (const char *exchange_base_dir, - TALER_EXCHANGEDB_DenominationKeyIterator it, - void *it_cls); + TALER_EXCHANGEDB_DenominationKeyIterator it, + void *it_cls); /** @@ -192,7 +192,7 @@ TALER_EXCHANGEDB_denomination_keys_iterate (const char *exchange_base_dir, */ int TALER_EXCHANGEDB_denomination_key_write (const char *filename, - const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki); + const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki); /** @@ -204,7 +204,7 @@ TALER_EXCHANGEDB_denomination_key_write (const char *filename, */ int TALER_EXCHANGEDB_denomination_key_read (const char *filename, - struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki); + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki); /** @@ -212,6 +212,7 @@ TALER_EXCHANGEDB_denomination_key_read (const char *filename, * * @param cls closure * @param apub the auditor's public key + * @param auditor_url URL of the auditor * @param mpub the exchange's public key (as expected by the auditor) * @param dki_len length of @a asig and @a dki arrays * @param asigs array of the auditor's signatures over the @a dks, of length @a dki_len @@ -222,11 +223,12 @@ TALER_EXCHANGEDB_denomination_key_read (const char *filename, */ typedef int (*TALER_EXCHANGEDB_AuditorIterator)(void *cls, - const struct TALER_AuditorPublicKeyP *apub, - const struct TALER_MasterPublicKeyP *mpub, - unsigned int dki_len, - const struct TALER_AuditorSignatureP *asigs, - const struct TALER_DenominationKeyValidityPS *dki); + const struct TALER_AuditorPublicKeyP *apub, + const char *auditor_url, + const struct TALER_MasterPublicKeyP *mpub, + unsigned int dki_len, + const struct TALER_AuditorSignatureP *asigs, + const struct TALER_DenominationKeyValidityPS *dki); /** @@ -244,8 +246,8 @@ typedef int */ int TALER_EXCHANGEDB_auditor_iterate (const char *exchange_base_dir, - TALER_EXCHANGEDB_AuditorIterator it, - void *it_cls); + TALER_EXCHANGEDB_AuditorIterator it, + void *it_cls); /** @@ -253,6 +255,7 @@ TALER_EXCHANGEDB_auditor_iterate (const char *exchange_base_dir, * * @param filename the file where to write the auditor information to * @param apub the auditor's public key + * @param auditor_url the URL of the auditor * @param asigs the auditor's signatures, array of length @a dki_len * @param mpub the exchange's public key (as expected by the auditor) * @param dki_len length of @a dki and @a asigs arrays @@ -261,11 +264,12 @@ TALER_EXCHANGEDB_auditor_iterate (const char *exchange_base_dir, */ int TALER_EXCHANGEDB_auditor_write (const char *filename, - const struct TALER_AuditorPublicKeyP *apub, - const struct TALER_AuditorSignatureP *asigs, - const struct TALER_MasterPublicKeyP *mpub, - unsigned int dki_len, - const struct TALER_DenominationKeyValidityPS *dki); + const struct TALER_AuditorPublicKeyP *apub, + const char *auditor_url, + const struct TALER_AuditorSignatureP *asigs, + const struct TALER_MasterPublicKeyP *mpub, + unsigned int dki_len, + const struct TALER_DenominationKeyValidityPS *dki); /** @@ -287,5 +291,4 @@ void TALER_EXCHANGEDB_plugin_unload (struct TALER_EXCHANGEDB_Plugin *plugin); - #endif diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h index 729bed262..d958f16ba 100644 --- a/src/include/taler_signatures.h +++ b/src/include/taler_signatures.h @@ -655,9 +655,14 @@ struct TALER_ExchangeKeyValidityPS */ struct GNUNET_CRYPTO_EccSignaturePurpose purpose; + /** + * Hash of the auditor's URL. + */ + struct GNUNET_HashCode auditor_url_hash; + /** * The long-term offline master key of the exchange, affirmed by the - * auditor. + * auditor. Hashed string, including 0-terminator. */ struct TALER_MasterPublicKeyP master; From 553d6eb23e3ac1001dd6c4e0523cddb88bc5e723 Mon Sep 17 00:00:00 2001 From: Jeff Burdges Date: Sun, 20 Mar 2016 21:30:10 +0100 Subject: [PATCH 24/91] API change in GNUnet crypto for Full Domain Hashing --- src/exchange/taler-exchange-httpd_db.c | 12 ++++++------ src/exchange/taler-exchange-httpd_test.c | 6 +++--- src/exchangedb/perf_taler_exchangedb_init.c | 6 +++--- src/exchangedb/test_exchangedb.c | 12 ++++++------ 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/exchange/taler-exchange-httpd_db.c b/src/exchange/taler-exchange-httpd_db.c index e96653a63..7698b92bb 100644 --- a/src/exchange/taler-exchange-httpd_db.c +++ b/src/exchange/taler-exchange-httpd_db.c @@ -453,9 +453,9 @@ execute_reserve_withdraw_transaction (struct MHD_Connection *connection, /* Balance is good, sign the coin! */ denom_sig->rsa_signature - = GNUNET_CRYPTO_rsa_sign (dki->denom_priv.rsa_private_key, - blinded_msg, - blinded_msg_len); + = GNUNET_CRYPTO_rsa_sign_blinded (dki->denom_priv.rsa_private_key, + blinded_msg, + blinded_msg_len); if (NULL == denom_sig->rsa_signature) { GNUNET_break (0); @@ -1112,9 +1112,9 @@ refresh_exchange_coin (struct MHD_Connection *connection, return ev_sig; } ev_sig.rsa_signature - = GNUNET_CRYPTO_rsa_sign (dki->denom_priv.rsa_private_key, - commit_coin->coin_ev, - commit_coin->coin_ev_size); + = GNUNET_CRYPTO_rsa_sign_blinded (dki->denom_priv.rsa_private_key, + commit_coin->coin_ev, + commit_coin->coin_ev_size); if (NULL == ev_sig.rsa_signature) { GNUNET_break (0); diff --git a/src/exchange/taler-exchange-httpd_test.c b/src/exchange/taler-exchange-httpd_test.c index 0a4181ed8..6f33fd4f6 100644 --- a/src/exchange/taler-exchange-httpd_test.c +++ b/src/exchange/taler-exchange-httpd_test.c @@ -495,9 +495,9 @@ TMH_TEST_handler_test_rsa_sign (struct TMH_RequestHandler *rh, return TMH_RESPONSE_reply_internal_error (connection, "Failed to create RSA key"); } - sig = GNUNET_CRYPTO_rsa_sign (rsa_pk, - in_ptr, - in_ptr_size); + sig = GNUNET_CRYPTO_rsa_sign_blinded (rsa_pk, + in_ptr, + in_ptr_size); if (NULL == sig) { GNUNET_break (0); diff --git a/src/exchangedb/perf_taler_exchangedb_init.c b/src/exchangedb/perf_taler_exchangedb_init.c index 2e613b3cf..2c2989bd5 100644 --- a/src/exchangedb/perf_taler_exchangedb_init.c +++ b/src/exchangedb/perf_taler_exchangedb_init.c @@ -351,9 +351,9 @@ PERF_TALER_EXCHANGEDB_coin_init ( coin->public_info.denom_pub.rsa_public_key = GNUNET_CRYPTO_rsa_public_key_dup (dki->denom_pub.rsa_public_key); coin->public_info.denom_sig.rsa_signature = - GNUNET_CRYPTO_rsa_sign (dki->denom_priv.rsa_private_key, - &coin->public_info.coin_pub, - sizeof (struct TALER_CoinSpendPublicKeyP)); + GNUNET_CRYPTO_rsa_sign_fdh (dki->denom_priv.rsa_private_key, + &coin->public_info.coin_pub, + sizeof (struct TALER_CoinSpendPublicKeyP)); GNUNET_assert (NULL != coin->public_info.denom_pub.rsa_public_key); GNUNET_assert (NULL != coin->public_info.denom_sig.rsa_signature); diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c index df1adf561..d03bad535 100644 --- a/src/exchangedb/test_exchangedb.c +++ b/src/exchangedb/test_exchangedb.c @@ -337,9 +337,9 @@ test_melting (struct TALER_EXCHANGEDB_Session *session) { RND_BLK (&melts[cnt].coin.coin_pub); melts[cnt].coin.denom_sig.rsa_signature = - GNUNET_CRYPTO_rsa_sign (dkp->priv.rsa_private_key, - &melts[cnt].coin.coin_pub, - sizeof (melts[cnt].coin.coin_pub)); + GNUNET_CRYPTO_rsa_sign_fdh (dkp->priv.rsa_private_key, + &melts[cnt].coin.coin_pub, + sizeof (melts[cnt].coin.coin_pub)); melts[cnt].coin.denom_pub = dkp->pub; RND_BLK (&melts[cnt].coin_sig); melts[cnt].session_hash = session_hash; @@ -663,9 +663,9 @@ run (void *cls, RND_BLK(&cbc.reserve_sig); cbc.denom_pub = dkp->pub; cbc.sig.rsa_signature - = GNUNET_CRYPTO_rsa_sign (dkp->priv.rsa_private_key, - &cbc.h_coin_envelope, - sizeof (cbc.h_coin_envelope)); + = GNUNET_CRYPTO_rsa_sign_fdh (dkp->priv.rsa_private_key, + &cbc.h_coin_envelope, + sizeof (cbc.h_coin_envelope)); cbc.reserve_pub = reserve_pub; cbc.amount_with_fee = value; GNUNET_assert (GNUNET_OK == From 3cb188e8a7ffa30a6b264355011f45f594725741 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 21 Mar 2016 14:40:57 +0100 Subject: [PATCH 25/91] rename to match GNUnet symbol change --- src/exchange-lib/exchange_api_handle.c | 2 +- src/exchange-lib/exchange_api_refresh.c | 4 ++-- src/exchange-lib/exchange_api_refresh_link.c | 4 ++-- src/exchange-lib/exchange_api_reserve.c | 4 ++-- src/exchange/taler-exchange-httpd_test.c | 6 +++--- src/exchangedb/exchangedb_keyio.c | 2 +- src/exchangedb/plugin_exchangedb_postgres.c | 4 ++-- src/include/taler_crypto_lib.h | 6 +++--- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/exchange-lib/exchange_api_handle.c b/src/exchange-lib/exchange_api_handle.c index aaca8bac1..c3dd0d4cb 100644 --- a/src/exchange-lib/exchange_api_handle.c +++ b/src/exchange-lib/exchange_api_handle.c @@ -260,7 +260,7 @@ parse_json_denomkey (struct TALER_EXCHANGE_DenomPublicKey *denom_key, struct TALER_Amount fee_deposit; struct TALER_Amount fee_refresh; struct TALER_DenominationKeyValidityPS denom_key_issue; - struct GNUNET_CRYPTO_rsa_PublicKey *pk; + struct GNUNET_CRYPTO_RsaPublicKey *pk; struct GNUNET_CRYPTO_EddsaSignature sig; struct GNUNET_JSON_Specification spec[] = { diff --git a/src/exchange-lib/exchange_api_refresh.c b/src/exchange-lib/exchange_api_refresh.c index 2949cf1e8..5cdf059b7 100644 --- a/src/exchange-lib/exchange_api_refresh.c +++ b/src/exchange-lib/exchange_api_refresh.c @@ -1762,8 +1762,8 @@ refresh_reveal_ok (struct TALER_EXCHANGE_RefreshRevealHandle *rrh, const struct FreshCoin *fc; struct TALER_DenominationPublicKey *pk; json_t *jsonai; - struct GNUNET_CRYPTO_rsa_Signature *blind_sig; - struct GNUNET_CRYPTO_rsa_Signature *sig; + struct GNUNET_CRYPTO_RsaSignature *blind_sig; + struct GNUNET_CRYPTO_RsaSignature *sig; struct TALER_CoinSpendPublicKeyP coin_pub; struct GNUNET_HashCode coin_hash; diff --git a/src/exchange-lib/exchange_api_refresh_link.c b/src/exchange-lib/exchange_api_refresh_link.c index 41d421f58..8bb40d7f4 100644 --- a/src/exchange-lib/exchange_api_refresh_link.c +++ b/src/exchange-lib/exchange_api_refresh_link.c @@ -98,8 +98,8 @@ parse_refresh_link_coin (const struct TALER_EXCHANGE_RefreshLinkHandle *rlh, { void *link_enc; size_t link_enc_size; - struct GNUNET_CRYPTO_rsa_Signature *bsig; - struct GNUNET_CRYPTO_rsa_PublicKey *rpub; + struct GNUNET_CRYPTO_RsaSignature *bsig; + struct GNUNET_CRYPTO_RsaPublicKey *rpub; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_varsize ("link_enc", &link_enc, &link_enc_size), GNUNET_JSON_spec_rsa_public_key ("denom_pub", &rpub), diff --git a/src/exchange-lib/exchange_api_reserve.c b/src/exchange-lib/exchange_api_reserve.c index 87d7b37f2..8c3663244 100644 --- a/src/exchange-lib/exchange_api_reserve.c +++ b/src/exchange-lib/exchange_api_reserve.c @@ -563,8 +563,8 @@ static int reserve_withdraw_ok (struct TALER_EXCHANGE_ReserveWithdrawHandle *wsh, json_t *json) { - struct GNUNET_CRYPTO_rsa_Signature *blind_sig; - struct GNUNET_CRYPTO_rsa_Signature *sig; + struct GNUNET_CRYPTO_RsaSignature *blind_sig; + struct GNUNET_CRYPTO_RsaSignature *sig; struct TALER_DenominationSignature dsig; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_rsa_signature ("ev_sig", &blind_sig), diff --git a/src/exchange/taler-exchange-httpd_test.c b/src/exchange/taler-exchange-httpd_test.c index 0a4181ed8..3fc8f473b 100644 --- a/src/exchange/taler-exchange-httpd_test.c +++ b/src/exchange/taler-exchange-httpd_test.c @@ -33,7 +33,7 @@ /** * Private key the test module uses for signing. */ -static struct GNUNET_CRYPTO_rsa_PrivateKey *rsa_pk; +static struct GNUNET_CRYPTO_RsaPrivateKey *rsa_pk; /** @@ -415,7 +415,7 @@ TMH_TEST_handler_test_rsa_get (struct TMH_RequestHandler *rh, size_t *upload_data_size) { int res; - struct GNUNET_CRYPTO_rsa_PublicKey *pub; + struct GNUNET_CRYPTO_RsaPublicKey *pub; if (NULL == rsa_pk) rsa_pk = GNUNET_CRYPTO_rsa_private_key_create (1024); @@ -463,7 +463,7 @@ TMH_TEST_handler_test_rsa_sign (struct TMH_RequestHandler *rh, { json_t *json; int res; - struct GNUNET_CRYPTO_rsa_Signature *sig; + struct GNUNET_CRYPTO_RsaSignature *sig; void *in_ptr; size_t in_ptr_size; struct GNUNET_JSON_Specification spec[] = { diff --git a/src/exchangedb/exchangedb_keyio.c b/src/exchangedb/exchangedb_keyio.c index 6b8ca24e3..177af2a04 100644 --- a/src/exchangedb/exchangedb_keyio.c +++ b/src/exchangedb/exchangedb_keyio.c @@ -128,7 +128,7 @@ TALER_EXCHANGEDB_denomination_key_read (const char *filename, uint64_t size; size_t offset; void *data; - struct GNUNET_CRYPTO_rsa_PrivateKey *priv; + struct GNUNET_CRYPTO_RsaPrivateKey *priv; if (GNUNET_OK != GNUNET_DISK_file_size (filename, &size, diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index 0395c208e..bcd6b9a0c 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -3457,8 +3457,8 @@ postgres_get_link_data_list (void *cls, for (i = 0; i < nrows; i++) { struct TALER_RefreshLinkEncrypted *link_enc; - struct GNUNET_CRYPTO_rsa_PublicKey *denom_pub; - struct GNUNET_CRYPTO_rsa_Signature *sig; + struct GNUNET_CRYPTO_RsaPublicKey *denom_pub; + struct GNUNET_CRYPTO_RsaSignature *sig; void *ld_buf; size_t ld_buf_size; struct GNUNET_PQ_ResultSpec rs[] = { diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index e948fa28a..a3275b74d 100644 --- a/src/include/taler_crypto_lib.h +++ b/src/include/taler_crypto_lib.h @@ -299,7 +299,7 @@ struct TALER_DenominationSignature /** * Taler uses RSA for blinding. */ - struct GNUNET_CRYPTO_rsa_Signature *rsa_signature; + struct GNUNET_CRYPTO_RsaSignature *rsa_signature; }; @@ -311,7 +311,7 @@ struct TALER_DenominationPublicKey /** * Taler uses RSA for signing coins. */ - struct GNUNET_CRYPTO_rsa_PublicKey *rsa_public_key; + struct GNUNET_CRYPTO_RsaPublicKey *rsa_public_key; }; @@ -323,7 +323,7 @@ struct TALER_DenominationPrivateKey /** * Taler uses RSA for signing coins. */ - struct GNUNET_CRYPTO_rsa_PrivateKey *rsa_private_key; + struct GNUNET_CRYPTO_RsaPrivateKey *rsa_private_key; }; From 130957f69d5dd37f9f58d9b3ec52c7b635901b70 Mon Sep 17 00:00:00 2001 From: Jeff Burdges Date: Mon, 21 Mar 2016 15:19:04 +0100 Subject: [PATCH 26/91] Note two errors in the tests suit --- src/exchangedb/perf_taler_exchangedb_init.c | 1 + src/exchangedb/test_exchangedb.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/exchangedb/perf_taler_exchangedb_init.c b/src/exchangedb/perf_taler_exchangedb_init.c index 2c2989bd5..8036d8597 100644 --- a/src/exchangedb/perf_taler_exchangedb_init.c +++ b/src/exchangedb/perf_taler_exchangedb_init.c @@ -350,6 +350,7 @@ PERF_TALER_EXCHANGEDB_coin_init ( &coin->public_info.coin_pub.eddsa_pub); coin->public_info.denom_pub.rsa_public_key = GNUNET_CRYPTO_rsa_public_key_dup (dki->denom_pub.rsa_public_key); + // This is broken at the moment because it needs to be a hash of a coin public key. coin->public_info.denom_sig.rsa_signature = GNUNET_CRYPTO_rsa_sign_fdh (dki->denom_priv.rsa_private_key, &coin->public_info.coin_pub, diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c index d03bad535..2ab91c72e 100644 --- a/src/exchangedb/test_exchangedb.c +++ b/src/exchangedb/test_exchangedb.c @@ -336,6 +336,7 @@ test_melting (struct TALER_EXCHANGEDB_Session *session) for (cnt=0; cnt < MELT_OLD_COINS; cnt++) { RND_BLK (&melts[cnt].coin.coin_pub); + // This appears to be broken because it needs to be a hash of a coin public key melts[cnt].coin.denom_sig.rsa_signature = GNUNET_CRYPTO_rsa_sign_fdh (dkp->priv.rsa_private_key, &melts[cnt].coin.coin_pub, From 08a051a7c0d7c51f7d5e19d730109fa859315051 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 23 Mar 2016 10:04:40 +0100 Subject: [PATCH 27/91] update test_bank_api to match current bank setup methods --- src/bank-lib/test_bank_api.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bank-lib/test_bank_api.c b/src/bank-lib/test_bank_api.c index 5e38ae2ec..b9b9eae5a 100644 --- a/src/bank-lib/test_bank_api.c +++ b/src/bank-lib/test_bank_api.c @@ -517,25 +517,25 @@ main (int argc, bankd = GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_ALL, NULL, NULL, NULL, - "taler-bank-httpd", - "taler-bank-httpd", - "-d", "test-bank-home", + "taler-bank-manage", + "taler-bank-manage", + "--bareserver", "8081", NULL); if (NULL == bankd) { fprintf (stderr, - "taler-bank-httpd not found, skipping test\n"); + "taler-bank-manage not found, skipping test\n"); return 77; /* report 'skip' */ } /* give child time to start and bind against the socket */ fprintf (stderr, - "Waiting for taler-bank-httpd to be ready"); + "Waiting for taler-bank-manage to be ready"); do { fprintf (stderr, "."); sleep (1); } - while (0 != system ("wget -q -t 1 -T 1 http://127.0.0.1:8081/keys -o /dev/null -O /dev/null")); + while (0 != system ("wget -q -t 1 -T 1 http://127.0.0.1:8081/ -o /dev/null -O /dev/null")); fprintf (stderr, "\n"); result = GNUNET_SYSERR; GNUNET_SCHEDULER_run (&run, NULL); From 7f7ac5d92c6e29b80ec2055f2023657d330ffd1c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 23 Mar 2016 10:06:41 +0100 Subject: [PATCH 28/91] avoid waiting forever --- src/bank-lib/test_bank_api.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/bank-lib/test_bank_api.c b/src/bank-lib/test_bank_api.c index b9b9eae5a..232900f20 100644 --- a/src/bank-lib/test_bank_api.c +++ b/src/bank-lib/test_bank_api.c @@ -510,6 +510,7 @@ main (int argc, char * const *argv) { struct GNUNET_OS_Process *bankd; + unsigned int cnt; GNUNET_log_setup ("test-bank-api", "WARNING", @@ -530,19 +531,30 @@ main (int argc, /* give child time to start and bind against the socket */ fprintf (stderr, "Waiting for taler-bank-manage to be ready"); + cnt = 0; do { fprintf (stderr, "."); sleep (1); + cnt++; + if (cnt > 30) + break; } while (0 != system ("wget -q -t 1 -T 1 http://127.0.0.1:8081/ -o /dev/null -O /dev/null")); fprintf (stderr, "\n"); result = GNUNET_SYSERR; - GNUNET_SCHEDULER_run (&run, NULL); + if (cnt <= 30) + GNUNET_SCHEDULER_run (&run, NULL); GNUNET_OS_process_kill (bankd, SIGTERM); GNUNET_OS_process_wait (bankd); GNUNET_OS_process_destroy (bankd); + if (cnt > 30) + { + fprintf (stderr, + "taler-bank-manage failed to start properly.\n"); + return 77; + } return (GNUNET_OK == result) ? 0 : 1; } From ac950fbe61defd6d451d4e5096a877e4af016590 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 23 Mar 2016 11:34:24 +0100 Subject: [PATCH 29/91] switch to wid to comply with spec --- src/bank-lib/Makefile.am | 3 ++- src/bank-lib/bank_api_admin.c | 5 +++-- src/bank-lib/test_bank_api.c | 12 +++++++++++- src/include/taler_bank_service.h | 5 ++++- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/bank-lib/Makefile.am b/src/bank-lib/Makefile.am index 4cf3472ec..58b1c67d5 100644 --- a/src/bank-lib/Makefile.am +++ b/src/bank-lib/Makefile.am @@ -43,4 +43,5 @@ test_bank_api_SOURCES = \ test_bank_api_LDADD = \ libtalerbank.la \ $(top_builddir)/src/util/libtalerutil.la \ - -lgnunetutil + -lgnunetutil \ + -ljansson diff --git a/src/bank-lib/bank_api_admin.c b/src/bank-lib/bank_api_admin.c index 443f24a8a..515181a80 100644 --- a/src/bank-lib/bank_api_admin.c +++ b/src/bank-lib/bank_api_admin.c @@ -135,7 +135,8 @@ handle_admin_add_incoming_finished (void *cls, break; } aai->cb (aai->cb_cls, - response_code); + response_code, + json); json_decref (json); TALER_BANK_admin_add_incoming_cancel (aai); } @@ -174,7 +175,7 @@ TALER_BANK_admin_add_incoming (struct TALER_BANK_Context *bank, admin_obj = json_pack ("{s:o, s:o," " s:I, s:I}", - "wtid", GNUNET_JSON_from_data (wtid, + "wid", GNUNET_JSON_from_data (wtid, sizeof (*wtid)), "amount", TALER_JSON_from_amount (amount), "debit_account", (json_int_t) debit_account_no, diff --git a/src/bank-lib/test_bank_api.c b/src/bank-lib/test_bank_api.c index 232900f20..127c271d5 100644 --- a/src/bank-lib/test_bank_api.c +++ b/src/bank-lib/test_bank_api.c @@ -246,10 +246,12 @@ interpreter_run (void *cls, * @param cls closure with the interpreter state * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request * 0 if the bank's reply is bogus (fails to follow the protocol) + * @param json detailed response from the HTTPD, or NULL if reply was not in JSON */ static void add_incoming_cb (void *cls, - unsigned int http_status) + unsigned int http_status, + json_t *json) { struct InterpreterState *is = cls; struct Command *cmd = &is->commands[is->ip]; @@ -258,6 +260,14 @@ add_incoming_cb (void *cls, if (cmd->expected_response_code != http_status) { GNUNET_break (0); + if (NULL != json) + { + fprintf (stderr, + "Unexpected response code %u:\n", + http_status); + json_dumpf (json, stderr, 0); + fprintf (stderr, "\n"); + } fail (is); return; } diff --git a/src/include/taler_bank_service.h b/src/include/taler_bank_service.h index 508ca714b..920ae47fd 100644 --- a/src/include/taler_bank_service.h +++ b/src/include/taler_bank_service.h @@ -22,6 +22,7 @@ #ifndef _TALER_BANK_SERVICE_H #define _TALER_BANK_SERVICE_H +#include #include "taler_util.h" /* ********************* event loop *********************** */ @@ -117,10 +118,12 @@ struct TALER_BANK_AdminAddIncomingHandle; * @param cls closure * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request * 0 if the bank's reply is bogus (fails to follow the protocol) + * @param json detailed response from the HTTPD, or NULL if reply was not in JSON */ typedef void (*TALER_BANK_AdminAddIncomingResultCallback) (void *cls, - unsigned int http_status); + unsigned int http_status, + json_t *json); /** From e76154e076e3f8819ce0a49d5eda93b49de1740d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 23 Mar 2016 11:34:50 +0100 Subject: [PATCH 30/91] ref to bug #4340 --- src/bank-lib/bank_api_admin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bank-lib/bank_api_admin.c b/src/bank-lib/bank_api_admin.c index 515181a80..36872d7a9 100644 --- a/src/bank-lib/bank_api_admin.c +++ b/src/bank-lib/bank_api_admin.c @@ -176,7 +176,7 @@ TALER_BANK_admin_add_incoming (struct TALER_BANK_Context *bank, admin_obj = json_pack ("{s:o, s:o," " s:I, s:I}", "wid", GNUNET_JSON_from_data (wtid, - sizeof (*wtid)), + sizeof (*wtid)), /* #4340 */ "amount", TALER_JSON_from_amount (amount), "debit_account", (json_int_t) debit_account_no, "credit_account", (json_int_t) credit_account_no); From 73a05107052ce4aa3c417dd16179c8a022b38575 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 23 Mar 2016 18:38:57 +0100 Subject: [PATCH 31/91] use bank and exchange account numbers in test --- src/bank-lib/test_bank_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bank-lib/test_bank_api.c b/src/bank-lib/test_bank_api.c index 127c271d5..66f3557b9 100644 --- a/src/bank-lib/test_bank_api.c +++ b/src/bank-lib/test_bank_api.c @@ -486,8 +486,8 @@ run (void *cls, { .oc = OC_ADMIN_ADD_INCOMING, .label = "deposit-1", .expected_response_code = MHD_HTTP_OK, - .details.admin_add_incoming.credit_account_no = 1, - .details.admin_add_incoming.debit_account_no = 2, + .details.admin_add_incoming.credit_account_no = 0, + .details.admin_add_incoming.debit_account_no = 1, .details.admin_add_incoming.amount = "EUR:5.01" }, { .oc = OC_END } From 3d04687b6f55faa7923a75ca12ad7fab01927f38 Mon Sep 17 00:00:00 2001 From: Jeff Burdges Date: Fri, 25 Mar 2016 14:01:27 +0100 Subject: [PATCH 32/91] References for FDH, one-more-inversion, RSA-KTI vs RSA-CTI, etc. --- doc/paper/taler.bib | 60 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/doc/paper/taler.bib b/doc/paper/taler.bib index b5bd5938d..10f4ef439 100644 --- a/doc/paper/taler.bib +++ b/doc/paper/taler.bib @@ -173,3 +173,63 @@ www_pdf_url = {https://www.torproject.org/svn/trunk/doc/design-paper/tor-design.pdf}, www_section = {Anonymous communication}, } + + +@inbook{BellareRogaway1996, + author="Bellare, Mihir and Rogaway, Phillip", + editor="Maurer, Ueli", + chapter="The Exact Security of Digital Signatures-How to Sign with RSA and Rabin", + title="Advances in Cryptology --- EUROCRYPT '96: International Conference on the Theory and Application of Cryptographic Techniques Saragossa, Spain, May 12--16, 1996 Proceedings", + year="1996", + publisher="Springer Berlin Heidelberg", + address="Berlin, Heidelberg", + pages="399--416", + isbn="978-3-540-68339-1", + doi="10.1007/3-540-68339-9_34", + url_doi="http://dx.doi.org/10.1007/3-540-68339-9_34", + url="http://web.cs.ucdavis.edu/~rogaway/papers/exact.pdf" +} + + + +@article{OneMoreInversion, + author="Bellare and Namprempre and Pointcheval and Semanko", + title="The One-More-RSA-Inversion Problems and the Security of Chaum's Blind Signature Scheme ", + journal="Journal of Cryptology", + volume="16", + number="3", + pages="185--215", + abstract="We introduce a new class of computational problems which we call the ``one-more-RSA-inversion'' problems. Our main result is that two problems in this class, which we call the chosen-target and known-target inversion problems, respectively, have polynomially equivalent computational complexity. We show how this leads to a proof of security for Chaum's RSA-based blind signature scheme in the random oracle model based on the assumed hardness of either of these problems. We define and prove analogous results for ``one-more-discrete-logarithm'' problems. Since the appearence of the preliminary version of this paper, the new problems we have introduced have found other uses as well.", + issn="1432-1378", + doi="10.1007/s00145-002-0120-1", + url_doi="http://dx.doi.org/10.1007/s00145-002-0120-1" + url="https://eprint.iacr.org/2001/002" +} + +@misc{cryptoeprint:2001:002, + author = {M. Bellare and C. Namprempre and D. Pointcheval and M. Semanko}, + title = {The One-More-RSA-Inversion Problems and the Security of Chaum's Blind Signature Scheme}, + howpublished = {Cryptology ePrint Archive, Report 2001/002}, + year = {2001}, + note = {\url{http://eprint.iacr.org/}}, +} + + +@inbook{RSA-KTIvCTI, + author="Bellare, Mihir and Namprempre, Chanathip and Pointcheval, David and Semanko, Michael", + editor="Syverson, Paul", + chapter="The Power of RSA Inversion Oracles and the Security of Chaum's RSA-Based Blind Signature Scheme", + title="Financial Cryptography: 5th International Conference, FC 2001 Grand Cayman, British West Indies, February 19--22, 2001 Proceedings", + year="2002", + publisher="Springer Berlin Heidelberg", + address="Berlin, Heidelberg", + pages="319--338", + isbn="978-3-540-46088-6", + doi="10.1007/3-540-46088-8_25", + url_doi="https://www.di.ens.fr/~pointche/Documents/Papers/2001_fcA.pdf" +} + + + + + From 946b9ed995f11966e7e6e9df8de85d21b2967bff Mon Sep 17 00:00:00 2001 From: Jeff Burdges Date: Fri, 25 Mar 2016 15:59:48 +0100 Subject: [PATCH 33/91] Another FDH reference but maybe unneeded --- doc/paper/taler.bib | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/doc/paper/taler.bib b/doc/paper/taler.bib index 10f4ef439..b22e9eb55 100644 --- a/doc/paper/taler.bib +++ b/doc/paper/taler.bib @@ -202,7 +202,7 @@ abstract="We introduce a new class of computational problems which we call the ``one-more-RSA-inversion'' problems. Our main result is that two problems in this class, which we call the chosen-target and known-target inversion problems, respectively, have polynomially equivalent computational complexity. We show how this leads to a proof of security for Chaum's RSA-based blind signature scheme in the random oracle model based on the assumed hardness of either of these problems. We define and prove analogous results for ``one-more-discrete-logarithm'' problems. Since the appearence of the preliminary version of this paper, the new problems we have introduced have found other uses as well.", issn="1432-1378", doi="10.1007/s00145-002-0120-1", - url_doi="http://dx.doi.org/10.1007/s00145-002-0120-1" + doi_url="http://dx.doi.org/10.1007/s00145-002-0120-1", url="https://eprint.iacr.org/2001/002" } @@ -226,10 +226,24 @@ pages="319--338", isbn="978-3-540-46088-6", doi="10.1007/3-540-46088-8_25", - url_doi="https://www.di.ens.fr/~pointche/Documents/Papers/2001_fcA.pdf" + url="https://www.di.ens.fr/~pointche/Documents/Papers/2001_fcA.pdf" +} + + +@inbook{Coron2000, + author="Coron, Jean-S{\'e}bastien", + editor="Bellare, Mihir", + chapter="On the Exact Security of Full Domain Hash", + title="Advances in Cryptology --- CRYPTO 2000: 20th Annual International Cryptology Conference Santa Barbara, California, USA, August 20--24, 2000 Proceedings", + year="2000", + publisher="Springer Berlin Heidelberg", + address="Berlin, Heidelberg", + pages="229--235", + isbn="978-3-540-44598-2", + doi="10.1007/3-540-44598-6_14", + doi_url="http://dx.doi.org/10.1007/3-540-44598-6_14", + url="https://www.iacr.org/archive/crypto2000/18800229/18800229.pdf" } - - From 17b2c7e0114f596ac8aa98e2caba11b92a27c4c4 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 26 Mar 2016 18:18:57 +0100 Subject: [PATCH 34/91] fix indent, fix some comments --- src/include/taler_exchange_service.h | 195 ++++++++++++++------------- 1 file changed, 98 insertions(+), 97 deletions(-) diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index cb1bd12aa..e4aa89a59 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014, 2015 GNUnet e.V. + Copyright (C) 2014, 2015, 2016 GNUnet e.V. TALER is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software @@ -74,11 +74,11 @@ TALER_EXCHANGE_init (void); */ void TALER_EXCHANGE_get_select_info (struct TALER_EXCHANGE_Context *ctx, - fd_set *read_fd_set, - fd_set *write_fd_set, - fd_set *except_fd_set, - int *max_fd, - long *timeout); + fd_set *read_fd_set, + fd_set *write_fd_set, + fd_set *except_fd_set, + int *max_fd, + long *timeout); /** @@ -486,8 +486,8 @@ struct TALER_EXCHANGE_DepositHandle; */ typedef void (*TALER_EXCHANGE_DepositResultCallback) (void *cls, - unsigned int http_status, - json_t *obj); + unsigned int http_status, + json_t *obj); /** @@ -526,20 +526,20 @@ typedef void */ struct TALER_EXCHANGE_DepositHandle * TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange, - const struct TALER_Amount *amount, - struct GNUNET_TIME_Absolute wire_deadline, - json_t *wire_details, - const struct GNUNET_HashCode *h_contract, - const struct TALER_CoinSpendPublicKeyP *coin_pub, - const struct TALER_DenominationSignature *denom_sig, - const struct TALER_DenominationPublicKey *denom_pub, - struct GNUNET_TIME_Absolute timestamp, - uint64_t transaction_id, - const struct TALER_MerchantPublicKeyP *merchant_pub, - struct GNUNET_TIME_Absolute refund_deadline, - const struct TALER_CoinSpendSignatureP *coin_sig, - TALER_EXCHANGE_DepositResultCallback cb, - void *cb_cls); + const struct TALER_Amount *amount, + struct GNUNET_TIME_Absolute wire_deadline, + json_t *wire_details, + const struct GNUNET_HashCode *h_contract, + const struct TALER_CoinSpendPublicKeyP *coin_pub, + const struct TALER_DenominationSignature *denom_sig, + const struct TALER_DenominationPublicKey *denom_pub, + struct GNUNET_TIME_Absolute timestamp, + uint64_t transaction_id, + const struct TALER_MerchantPublicKeyP *merchant_pub, + struct GNUNET_TIME_Absolute refund_deadline, + const struct TALER_CoinSpendSignatureP *coin_sig, + TALER_EXCHANGE_DepositResultCallback cb, + void *cb_cls); /** @@ -617,7 +617,7 @@ struct TALER_EXCHANGE_ReserveHistory /** * Callbacks of this type are used to serve the result of submitting a - * deposit permission request to a exchange. + * reserve status request to a exchange. * * @param cls closure * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request @@ -629,11 +629,11 @@ struct TALER_EXCHANGE_ReserveHistory */ typedef void (*TALER_EXCHANGE_ReserveStatusResultCallback) (void *cls, - unsigned int http_status, - json_t *json, - const struct TALER_Amount *balance, - unsigned int history_length, - const struct TALER_EXCHANGE_ReserveHistory *history); + unsigned int http_status, + json_t *json, + const struct TALER_Amount *balance, + unsigned int history_length, + const struct TALER_EXCHANGE_ReserveHistory *history); /** @@ -654,9 +654,9 @@ typedef void */ struct TALER_EXCHANGE_ReserveStatusHandle * TALER_EXCHANGE_reserve_status (struct TALER_EXCHANGE_Handle *exchange, - const struct TALER_ReservePublicKeyP *reserve_pub, - TALER_EXCHANGE_ReserveStatusResultCallback cb, - void *cb_cls); + const struct TALER_ReservePublicKeyP *reserve_pub, + TALER_EXCHANGE_ReserveStatusResultCallback cb, + void *cb_cls); /** @@ -680,7 +680,7 @@ struct TALER_EXCHANGE_ReserveWithdrawHandle; /** * Callbacks of this type are used to serve the result of submitting a - * deposit permission request to a exchange. + * withdraw request to a exchange. * * @param cls closure * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request @@ -690,9 +690,9 @@ struct TALER_EXCHANGE_ReserveWithdrawHandle; */ typedef void (*TALER_EXCHANGE_ReserveWithdrawResultCallback) (void *cls, - unsigned int http_status, - const struct TALER_DenominationSignature *sig, - json_t *full_response); + unsigned int http_status, + const struct TALER_DenominationSignature *sig, + json_t *full_response); /** @@ -783,14 +783,14 @@ TALER_EXCHANGE_reserve_withdraw_cancel (struct TALER_EXCHANGE_ReserveWithdrawHan */ char * TALER_EXCHANGE_refresh_prepare (unsigned int num_melts, - const struct TALER_CoinSpendPrivateKeyP *melt_privs, - const struct TALER_Amount *melt_amounts, - const struct TALER_DenominationSignature *melt_sigs, - const struct TALER_EXCHANGE_DenomPublicKey *melt_pks, - int check_sigs, - unsigned int fresh_pks_len, - const struct TALER_EXCHANGE_DenomPublicKey *fresh_pks, - size_t *res_size); + const struct TALER_CoinSpendPrivateKeyP *melt_privs, + const struct TALER_Amount *melt_amounts, + const struct TALER_DenominationSignature *melt_sigs, + const struct TALER_EXCHANGE_DenomPublicKey *melt_pks, + int check_sigs, + unsigned int fresh_pks_len, + const struct TALER_EXCHANGE_DenomPublicKey *fresh_pks, + size_t *res_size); /* ********************* /refresh/melt ***************************** */ @@ -821,7 +821,7 @@ typedef void /** - * Submit a melt request to the exchange and get the exchange's + * Submit a refresh melt request to the exchange and get the exchange's * response. * * This API is typically used by a wallet. Note that to ensure that @@ -842,10 +842,10 @@ typedef void */ struct TALER_EXCHANGE_RefreshMeltHandle * TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange, - size_t refresh_data_length, - const char *refresh_data, - TALER_EXCHANGE_RefreshMeltCallback melt_cb, - void *melt_cb_cls); + size_t refresh_data_length, + const char *refresh_data, + TALER_EXCHANGE_RefreshMeltCallback melt_cb, + void *melt_cb_cls); /** @@ -879,12 +879,12 @@ TALER_EXCHANGE_refresh_melt_cancel (struct TALER_EXCHANGE_RefreshMeltHandle *rmh */ typedef void (*TALER_EXCHANGE_RefreshRevealCallback) (void *cls, - unsigned int http_status, + unsigned int http_status, - unsigned int num_coins, - const struct TALER_CoinSpendPrivateKeyP *coin_privs, - const struct TALER_DenominationSignature *sigs, - json_t *full_response); + unsigned int num_coins, + const struct TALER_CoinSpendPrivateKeyP *coin_privs, + const struct TALER_DenominationSignature *sigs, + json_t *full_response); /** @@ -917,11 +917,11 @@ struct TALER_EXCHANGE_RefreshRevealHandle; */ struct TALER_EXCHANGE_RefreshRevealHandle * TALER_EXCHANGE_refresh_reveal (struct TALER_EXCHANGE_Handle *exchange, - size_t refresh_data_length, - const char *refresh_data, - uint16_t noreveal_index, - TALER_EXCHANGE_RefreshRevealCallback reveal_cb, - void *reveal_cb_cls); + size_t refresh_data_length, + const char *refresh_data, + uint16_t noreveal_index, + TALER_EXCHANGE_RefreshRevealCallback reveal_cb, + void *reveal_cb_cls); /** @@ -960,16 +960,17 @@ struct TALER_EXCHANGE_RefreshLinkHandle; */ typedef void (*TALER_EXCHANGE_RefreshLinkCallback) (void *cls, - unsigned int http_status, - unsigned int num_coins, - const struct TALER_CoinSpendPrivateKeyP *coin_privs, - const struct TALER_DenominationSignature *sigs, - const struct TALER_DenominationPublicKey *pubs, - json_t *full_response); + unsigned int http_status, + unsigned int num_coins, + const struct TALER_CoinSpendPrivateKeyP *coin_privs, + const struct TALER_DenominationSignature *sigs, + const struct TALER_DenominationPublicKey *pubs, + json_t *full_response); /** - * Submit a link request to the exchange and get the exchange's response. + * Submit a refresh link request to the exchange and get the + * exchange's response. * * This API is typically not used by anyone, it is more a threat * against those trying to receive a funds transfer by abusing the @@ -984,9 +985,9 @@ typedef void */ struct TALER_EXCHANGE_RefreshLinkHandle * TALER_EXCHANGE_refresh_link (struct TALER_EXCHANGE_Handle *exchange, - const struct TALER_CoinSpendPrivateKeyP *coin_priv, - TALER_EXCHANGE_RefreshLinkCallback link_cb, - void *link_cb_cls); + const struct TALER_CoinSpendPrivateKeyP *coin_priv, + TALER_EXCHANGE_RefreshLinkCallback link_cb, + void *link_cb_cls); /** @@ -1019,8 +1020,8 @@ struct TALER_EXCHANGE_AdminAddIncomingHandle; */ typedef void (*TALER_EXCHANGE_AdminAddIncomingResultCallback) (void *cls, - unsigned int http_status, - json_t *full_response); + unsigned int http_status, + json_t *full_response); /** @@ -1042,12 +1043,12 @@ typedef void */ struct TALER_EXCHANGE_AdminAddIncomingHandle * TALER_EXCHANGE_admin_add_incoming (struct TALER_EXCHANGE_Handle *exchange, - const struct TALER_ReservePublicKeyP *reserve_pub, - const struct TALER_Amount *amount, - struct GNUNET_TIME_Absolute execution_date, - const json_t *wire, - TALER_EXCHANGE_AdminAddIncomingResultCallback res_cb, - void *res_cb_cls); + const struct TALER_ReservePublicKeyP *reserve_pub, + const struct TALER_Amount *amount, + struct GNUNET_TIME_Absolute execution_date, + const json_t *wire, + TALER_EXCHANGE_AdminAddIncomingResultCallback res_cb, + void *res_cb_cls); /** @@ -1119,12 +1120,12 @@ struct TALER_WireDepositDetails */ typedef void (*TALER_EXCHANGE_WireDepositsCallback)(void *cls, - unsigned int http_status, - json_t *json, - const struct GNUNET_HashCode *h_wire, - const struct TALER_Amount *total_amount, - unsigned int details_length, - const struct TALER_WireDepositDetails *details); + unsigned int http_status, + json_t *json, + const struct GNUNET_HashCode *h_wire, + const struct TALER_Amount *total_amount, + unsigned int details_length, + const struct TALER_WireDepositDetails *details); /** @@ -1139,9 +1140,9 @@ typedef void */ struct TALER_EXCHANGE_WireDepositsHandle * TALER_EXCHANGE_wire_deposits (struct TALER_EXCHANGE_Handle *exchange, - const struct TALER_WireTransferIdentifierRawP *wtid, - TALER_EXCHANGE_WireDepositsCallback cb, - void *cb_cls); + const struct TALER_WireTransferIdentifierRawP *wtid, + TALER_EXCHANGE_WireDepositsCallback cb, + void *cb_cls); /** @@ -1177,11 +1178,11 @@ struct TALER_EXCHANGE_DepositWtidHandle; */ typedef void (*TALER_EXCHANGE_DepositWtidCallback)(void *cls, - unsigned int http_status, - json_t *json, - const struct TALER_WireTransferIdentifierRawP *wtid, - struct GNUNET_TIME_Absolute execution_time, - const struct TALER_Amount *coin_contribution); + unsigned int http_status, + json_t *json, + const struct TALER_WireTransferIdentifierRawP *wtid, + struct GNUNET_TIME_Absolute execution_time, + const struct TALER_Amount *coin_contribution); /** @@ -1199,13 +1200,13 @@ typedef void */ struct TALER_EXCHANGE_DepositWtidHandle * TALER_EXCHANGE_deposit_wtid (struct TALER_EXCHANGE_Handle *exchange, - const struct TALER_MerchantPrivateKeyP *merchant_priv, - const struct GNUNET_HashCode *h_wire, - const struct GNUNET_HashCode *h_contract, - const struct TALER_CoinSpendPublicKeyP *coin_pub, - uint64_t transaction_id, - TALER_EXCHANGE_DepositWtidCallback cb, - void *cb_cls); + const struct TALER_MerchantPrivateKeyP *merchant_priv, + const struct GNUNET_HashCode *h_wire, + const struct GNUNET_HashCode *h_contract, + const struct TALER_CoinSpendPublicKeyP *coin_pub, + uint64_t transaction_id, + TALER_EXCHANGE_DepositWtidCallback cb, + void *cb_cls); /** From b4c4f0b07822b66e2b60e43c3654a927c768ac94 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 30 Mar 2016 22:56:17 +0200 Subject: [PATCH 35/91] towards a testcase for aggregation logic --- .gitignore | 1 + doc/Makefile.am | 1 + doc/taler-exchange-aggregator.1 | 35 +++++ src/bank-lib/bank_api_admin.c | 2 +- src/exchange-lib/test_exchange_api.c | 18 +-- src/exchange/Makefile.am | 23 ++- src/exchange/taler-exchange-aggregator.c | 13 +- .../config/exchange-common.conf | 33 ++++ ...st-taler-exchange-aggregator-postgres.conf | 8 + src/exchange/test_taler_exchange_aggregator.c | 142 ++++++++++++++++++ src/exchangedb/test_exchangedb.c | 44 +++--- src/include/taler_exchangedb_plugin.h | 52 +++---- src/util/Makefile.am | 2 +- 13 files changed, 312 insertions(+), 62 deletions(-) create mode 100644 doc/taler-exchange-aggregator.1 create mode 100644 src/exchange/test-exchange-home/config/exchange-common.conf create mode 100644 src/exchange/test-taler-exchange-aggregator-postgres.conf create mode 100644 src/exchange/test_taler_exchange_aggregator.c diff --git a/.gitignore b/.gitignore index 671e39e98..f633a66eb 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ doc/doxygen/doxygen_sqlite3.db src/bank-lib/test_bank_api src/exchange-lib/test_exchange_api src/exchange/taler-exchange-aggregator +src/exchange/test_taler_exchange_aggregator src/exchange-tools/taler-auditor-sign src/exchange-tools/taler-exchange-dbinit src/exchange-tools/taler-exchange-keycheck diff --git a/doc/Makefile.am b/doc/Makefile.am index 0b3dc39c4..5a9de87a0 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -4,6 +4,7 @@ SUBDIRS = . doxygen man_MANS = \ taler-auditor-sign.1 \ + taler-exchange-aggregator.1 \ taler-exchange-dbinit.1 \ taler-exchange-httpd.1 \ taler-exchange-keyup.1 \ diff --git a/doc/taler-exchange-aggregator.1 b/doc/taler-exchange-aggregator.1 new file mode 100644 index 000000000..954f88b20 --- /dev/null +++ b/doc/taler-exchange-aggregator.1 @@ -0,0 +1,35 @@ +.TH TALER\-EXCHANGE\-AGGREGATOR 1 "Mar 30, 2016" "GNU Taler" + +.SH NAME +taler\-exchange\-aggregator \- Aggregate and execute exchange transactions + +.SH SYNOPSIS +.B taler\-exchange\-aggregator +.RI [ options ] +.br + +.SH DESCRIPTION +\fBtaler\-exchange\-aggregator\fP is a command line tool to run pending transactions from the Taler exchange. + +.SH OPTIONS +.B +.IP "\-d DIRNAME, \-\-exchange-dir=DIRNAME" +Use the configuration and other resources for the exchange to operate from DIRNAME. +.B +.IP "\-f WIREFORMAT, \-\-format=WIREFORMAT" +Overrides WIREFORMAT option from the configuation file. +.B +.IP "\-h, \-\-help" +Print short help on options. +.B +.IP "\-t, \-\-test" +Run in test mode (use temporary tables). Only useful for testcases. +.B +.IP "\-v, \-\-version" +Print version information. +.B +.SH BUGS +Report bugs by using Mantis or by sending electronic mail to + +.SH "SEE ALSO" +\fBtaler\-exchange\-dbinit\fP(1), \fBtaler\-exchange\-keyup\fP(1), \fBtaler\-exchange\-httpd\fP(1), \fBtaler.conf\fP(5) diff --git a/src/bank-lib/bank_api_admin.c b/src/bank-lib/bank_api_admin.c index 36872d7a9..907e15ea7 100644 --- a/src/bank-lib/bank_api_admin.c +++ b/src/bank-lib/bank_api_admin.c @@ -175,7 +175,7 @@ TALER_BANK_admin_add_incoming (struct TALER_BANK_Context *bank, admin_obj = json_pack ("{s:o, s:o," " s:I, s:I}", - "wid", GNUNET_JSON_from_data (wtid, + "wtid", GNUNET_JSON_from_data (wtid, sizeof (*wtid)), /* #4340 */ "amount", TALER_JSON_from_amount (amount), "debit_account", (json_int_t) debit_account_no, diff --git a/src/exchange-lib/test_exchange_api.c b/src/exchange-lib/test_exchange_api.c index 2aee8077d..2a7f670cd 100644 --- a/src/exchange-lib/test_exchange_api.c +++ b/src/exchange-lib/test_exchange_api.c @@ -2543,9 +2543,9 @@ run (void *cls, ctx_task = GNUNET_SCHEDULER_add_now (&context_task, ctx); exchange = TALER_EXCHANGE_connect (ctx, - "http://localhost:8081", - &cert_cb, is, - TALER_EXCHANGE_OPTION_END); + "http://localhost:8081", + &cert_cb, is, + TALER_EXCHANGE_OPTION_END); GNUNET_assert (NULL != exchange); shutdown_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply @@ -2581,12 +2581,12 @@ main (int argc, GNUNET_OS_process_wait (proc); GNUNET_OS_process_destroy (proc); exchanged = GNUNET_OS_start_process (GNUNET_NO, - GNUNET_OS_INHERIT_STD_ALL, - NULL, NULL, NULL, - "taler-exchange-httpd", - "taler-exchange-httpd", - "-d", "test-exchange-home", - NULL); + GNUNET_OS_INHERIT_STD_ALL, + NULL, NULL, NULL, + "taler-exchange-httpd", + "taler-exchange-httpd", + "-d", "test-exchange-home", + NULL); /* give child time to start and bind against the socket */ fprintf (stderr, "Waiting for taler-exchange-httpd to be ready"); do diff --git a/src/exchange/Makefile.am b/src/exchange/Makefile.am index e29a51bbb..18a7c1b54 100644 --- a/src/exchange/Makefile.am +++ b/src/exchange/Makefile.am @@ -59,4 +59,25 @@ check_SCRIPTS += \ test_taler_exchange_httpd_afl.sh endif -TESTS = $(check_SCRIPTS) +test_taler_exchange_aggregator_postgres_SOURCES = \ + test_taler_exchange_aggregator.c +test_taler_exchange_aggregator_postgres_LDADD = \ + $(LIBGCRYPT_LIBS) \ + $(top_builddir)/src/exchangedb/libtalerexchangedb.la \ + $(top_builddir)/src/util/libtalerutil.la \ + -lmicrohttpd \ + -lgnunetutil \ + -lgnunetjson \ + -ljansson \ + -lpthread + +check_PROGRAMS = \ + test_taler_exchange_aggregator-postgres + +TESTS = \ + $(check_SCRIPTS) \ + $(check_PROGRAMS) + + +EXTRA_DIST = \ + test-taler-exchange-aggregator-postgres.conf diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c index e399a422e..4699ff4bc 100644 --- a/src/exchange/taler-exchange-aggregator.c +++ b/src/exchange/taler-exchange-aggregator.c @@ -67,6 +67,11 @@ static struct TALER_WIRE_Plugin *wire_plugin; */ static struct GNUNET_SCHEDULER_Task *task; +/** + * #GNUNET_YES if we are in test mode and are using temporary tables. + */ +static int test_mode; + /** * Limit on the number of transactions we aggregate at once. Note * that the limit must be big enough to ensure that when transactions @@ -448,7 +453,7 @@ run_aggregation (void *cls, if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) return; if (NULL == (session = db_plugin->get_session (db_plugin->cls, - GNUNET_NO))) + test_mode))) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to obtain database session!\n"); @@ -813,7 +818,7 @@ run_transfers (void *cls, if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) return; if (NULL == (session = db_plugin->get_session (db_plugin->cls, - GNUNET_NO))) + test_mode))) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to obtain database session!\n"); @@ -879,6 +884,10 @@ main (int argc, "wireformat to use, overrides WIREFORMAT option in [exchange] section", 1, &GNUNET_GETOPT_set_filename, &exchange_wireformat}, TALER_GETOPT_OPTION_HELP ("background process that aggregates and executes wire transfers to merchants"), + {'t', "test", NULL, + "run in test mode with temporary tables", 0, + &GNUNET_GETOPT_set_one, &test_mode}, + TALER_GETOPT_OPTION_HELP ("background process that aggregates and executes wire transfers to merchants"), GNUNET_GETOPT_OPTION_VERSION (VERSION "-" VCS_VERSION), GNUNET_GETOPT_OPTION_END }; diff --git a/src/exchange/test-exchange-home/config/exchange-common.conf b/src/exchange/test-exchange-home/config/exchange-common.conf new file mode 100644 index 000000000..e4ff2a4d6 --- /dev/null +++ b/src/exchange/test-exchange-home/config/exchange-common.conf @@ -0,0 +1,33 @@ +[exchange] +# Currency supported by the exchange (can only be one) +CURRENCY = EUR + +# Wire format supported by the exchange +# We use 'test' for testing of the actual +# coin operations. +WIREFORMAT = test + +# HTTP port the exchange listens to +PORT = 8081 + +# Master public key used to sign the exchange's various keys +MASTER_PUBLIC_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG + +# How to access our database +DB = postgres + +# Is this is a testcase, use transient DB actions? +TESTRUN = YES + +[exchangedb-postgres] +DB_CONN_STR = "postgres:///talercheck" + +[wire-test] +# What is the main website of the bank? +BANK_URI = "http://localhost:8082/" +# Into which account at the 'bank' should incoming +# wire transfers be made? +BANK_ACCOUNT_NO_INCOMING = 2 +# From which account at the 'bank' should outgoing +# wire transfers be made? +BANK_ACCOUNT_NO_OUTGOING = 3 diff --git a/src/exchange/test-taler-exchange-aggregator-postgres.conf b/src/exchange/test-taler-exchange-aggregator-postgres.conf new file mode 100644 index 000000000..0822bab44 --- /dev/null +++ b/src/exchange/test-taler-exchange-aggregator-postgres.conf @@ -0,0 +1,8 @@ +[exchange] +#The DB plugin to use +DB = postgres + +[exchangedb-postgres] + +#The connection string the plugin has to use for connecting to the database +DB_CONN_STR = postgres:///talercheck diff --git a/src/exchange/test_taler_exchange_aggregator.c b/src/exchange/test_taler_exchange_aggregator.c new file mode 100644 index 000000000..a36fcdec4 --- /dev/null +++ b/src/exchange/test_taler_exchange_aggregator.c @@ -0,0 +1,142 @@ +/* + This file is part of TALER + (C) 2016 GNUnet e.V. + + TALER is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + TALER; see the file COPYING. If not, If not, see +*/ + +/** + * @file exchange/test_taler_exchange_aggregator.c + * @brief Tests for taler-exchange-aggregator logic + * @author Christian Grothoff + */ +#include "platform.h" +#include "taler_util.h" +#include "taler_exchangedb_plugin.h" + +/** + * Return value from main(). + */ +static int result; + +/** + * Name of the configuration file to use. + */ +static char *config_filename; + + +/** + * Runs the aggregator process. + */ +static void +run_aggregator () +{ + struct GNUNET_OS_Process *proc; + + proc = GNUNET_OS_start_process (GNUNET_NO, + GNUNET_OS_INHERIT_STD_ALL, + NULL, NULL, NULL, + "taler-exchange-aggregator", + "taler-exchange-aggregator", + /* "-c", config_filename, */ + "-d", "test-exchange-home", + "-t", /* enable temporary tables */ + NULL); + GNUNET_OS_process_wait (proc); + GNUNET_OS_process_destroy (proc); +} + + +/** + * Main function that will be run by the scheduler. + * + * @param cls closure + * @param args remaining command-line arguments + * @param cfgfile name of the configuration file used (for saving, can be NULL!) + * @param cfg configuration + */ +static void +run (void *cls, + char *const *args, + const char *cfgfile, + const struct GNUNET_CONFIGURATION_Handle *cfg) +{ + struct TALER_EXCHANGEDB_Plugin *plugin; + struct TALER_EXCHANGEDB_Session *session; + + plugin = TALER_EXCHANGEDB_plugin_load (cfg); + if (GNUNET_OK != + plugin->create_tables (plugin->cls, + GNUNET_YES)) + { + TALER_EXCHANGEDB_plugin_unload (plugin); + result = 77; + return; + } + session = plugin->get_session (plugin->cls, + GNUNET_YES); + /* FIXME: prime DB */ + /* FIXME: launch bank on 8082! */ + run_aggregator (); + /* FIXME: check DB and bank */ + + plugin->drop_temporary (plugin->cls, + session); + TALER_EXCHANGEDB_plugin_unload (plugin); + result = 77; /* skip: not finished */ +} + + +int +main (int argc, + char *const argv[]) +{ + static const struct GNUNET_GETOPT_CommandLineOption options[] = { + GNUNET_GETOPT_OPTION_END + }; + char *argv2[] = { + "test-taler-exchange-aggregator-", /* will be replaced later */ + "-c", "test-taler-exchange-aggregator-.conf", /* will be replaced later */ + NULL, + }; + const char *plugin_name; + char *testname; + + result = -1; + if (NULL == (plugin_name = strrchr (argv[0], (int) '-'))) + { + GNUNET_break (0); + return -1; + } + plugin_name++; + (void) GNUNET_asprintf (&testname, + "test-taler-exchange-aggregator-%s", plugin_name); + (void) GNUNET_asprintf (&config_filename, + "%s.conf", testname); + argv2[0] = argv[0]; + argv2[2] = config_filename; + if (GNUNET_OK != + GNUNET_PROGRAM_run ((sizeof (argv2)/sizeof (char *)) - 1, argv2, + testname, + "Test cases for exchange aggregator.", + options, &run, NULL)) + { + GNUNET_free (config_filename); + GNUNET_free (testname); + return 3; + } + GNUNET_free (config_filename); + GNUNET_free (testname); + return result; +} + +/* end of test_taler_exchange_aggregator.c */ diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c index 2ab91c72e..090c08fbd 100644 --- a/src/exchangedb/test_exchangedb.c +++ b/src/exchangedb/test_exchangedb.c @@ -867,31 +867,31 @@ int main (int argc, char *const argv[]) { - static const struct GNUNET_GETOPT_CommandLineOption options[] = { + static const struct GNUNET_GETOPT_CommandLineOption options[] = { GNUNET_GETOPT_OPTION_END }; - char *argv2[] = { - "test-exchange-db-", /* will be replaced later */ - "-c", "test-exchange-db-.conf", /* will be replaced later */ - NULL, - }; - const char *plugin_name; - char *config_filename; - char *testname; + char *argv2[] = { + "test-exchange-db-", /* will be replaced later */ + "-c", "test-exchange-db-.conf", /* will be replaced later */ + NULL, + }; + const char *plugin_name; + char *config_filename; + char *testname; - result = -1; - if (NULL == (plugin_name = strrchr (argv[0], (int) '-'))) - { - GNUNET_break (0); - return -1; - } - plugin_name++; - (void) GNUNET_asprintf (&testname, - "test-exchange-db-%s", plugin_name); - (void) GNUNET_asprintf (&config_filename, - "%s.conf", testname); - argv2[0] = argv[0]; - argv2[2] = config_filename; + result = -1; + if (NULL == (plugin_name = strrchr (argv[0], (int) '-'))) + { + GNUNET_break (0); + return -1; + } + plugin_name++; + (void) GNUNET_asprintf (&testname, + "test-exchange-db-%s", plugin_name); + (void) GNUNET_asprintf (&config_filename, + "%s.conf", testname); + argv2[0] = argv[0]; + argv2[2] = config_filename; if (GNUNET_OK != GNUNET_PROGRAM_run ((sizeof (argv2)/sizeof (char *)) - 1, argv2, testname, diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index f45014463..cb1dcb344 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -546,15 +546,15 @@ struct TALER_EXCHANGEDB_Session; */ typedef int (*TALER_EXCHANGEDB_DepositIterator)(void *cls, - unsigned long long rowid, - const struct TALER_MerchantPublicKeyP *merchant_pub, - const struct TALER_CoinSpendPublicKeyP *coin_pub, - const struct TALER_Amount *amount_with_fee, - const struct TALER_Amount *deposit_fee, - uint64_t transaction_id, - const struct GNUNET_HashCode *h_contract, - struct GNUNET_TIME_Absolute wire_deadline, - const json_t *wire); + unsigned long long rowid, + const struct TALER_MerchantPublicKeyP *merchant_pub, + const struct TALER_CoinSpendPublicKeyP *coin_pub, + const struct TALER_Amount *amount_with_fee, + const struct TALER_Amount *deposit_fee, + uint64_t transaction_id, + const struct GNUNET_HashCode *h_contract, + struct GNUNET_TIME_Absolute wire_deadline, + const json_t *wire); /** @@ -568,9 +568,9 @@ typedef int */ typedef void (*TALER_EXCHANGEDB_TransferDataCallback)(void *cls, - const struct GNUNET_HashCode *session_hash, - const struct TALER_TransferPublicKeyP *transfer_pub, - const struct TALER_EncryptedLinkSecretP *shared_secret_enc); + const struct GNUNET_HashCode *session_hash, + const struct TALER_TransferPublicKeyP *transfer_pub, + const struct TALER_EncryptedLinkSecretP *shared_secret_enc); /** @@ -589,10 +589,10 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_DepositWtidCallback)(void *cls, - const struct TALER_WireTransferIdentifierRawP *wtid, - const struct TALER_Amount *coin_contribution, - const struct TALER_Amount *coin_fee, - struct GNUNET_TIME_Absolute execution_time); + const struct TALER_WireTransferIdentifierRawP *wtid, + const struct TALER_Amount *coin_contribution, + const struct TALER_Amount *coin_fee, + struct GNUNET_TIME_Absolute execution_time); /** @@ -610,13 +610,13 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_WireTransferDataCallback)(void *cls, - const struct TALER_MerchantPublicKeyP *merchant_pub, - const struct GNUNET_HashCode *h_wire, - const struct GNUNET_HashCode *h_contract, - uint64_t transaction_id, - const struct TALER_CoinSpendPublicKeyP *coin_pub, - const struct TALER_Amount *coin_value, - const struct TALER_Amount *coin_fee); + const struct TALER_MerchantPublicKeyP *merchant_pub, + const struct GNUNET_HashCode *h_wire, + const struct GNUNET_HashCode *h_contract, + uint64_t transaction_id, + const struct TALER_CoinSpendPublicKeyP *coin_pub, + const struct TALER_Amount *coin_value, + const struct TALER_Amount *coin_fee); /** @@ -629,9 +629,9 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_WirePreparationCallback) (void *cls, - unsigned long long rowid, - const char *buf, - size_t buf_size); + unsigned long long rowid, + const char *buf, + size_t buf_size); /** diff --git a/src/util/Makefile.am b/src/util/Makefile.am index 41afcc97f..e4352852c 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -47,7 +47,7 @@ TESTS = \ test_amount \ test_crypto -check_PROGRAMS= \ +check_PROGRAMS = \ test_amount \ test_crypto From 3a2e547da9cc5669a73e10ec30e67dac3016a24d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 31 Mar 2016 20:56:16 +0200 Subject: [PATCH 36/91] use GNUnet-SVN #36970 API improvement to de-duplicate code in Taler --- src/util/os_installation.c | 693 ++----------------------------------- src/util/plugin.c | 2 +- 2 files changed, 28 insertions(+), 667 deletions(-) diff --git a/src/util/os_installation.c b/src/util/os_installation.c index 757dba4b6..4fce72ee9 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c @@ -1,701 +1,62 @@ /* - This file is part of GNUnet. - Copyright (C) 2006-2014 GNUnet e.V. + This file is part of GNU Taler. + Copyright (C) 2016 Inria - GNUnet is free software; you can redistribute it and/or modify + Taler is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. - GNUnet is distributed in the hope that it will be useful, but + Taler is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with GNUnet; see the file COPYING. If not, write to the + along with Taler; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /** * @file os_installation.c - * @brief get paths used by the program; based heavily on the - * corresponding GNUnet file, just adapted for Taler. - * @author Milan + * @brief initialize libgnunet OS subsystem for Taler. + * @author Christian Grothoff */ #include "platform.h" #include -#if DARWIN -#include -#include -#elif WINDOWS -#include -#endif -#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) - -#define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) - - -#if LINUX /** - * Try to determine path by reading /proc/PID/exe - * - * @return NULL on error + * Default project data used for installation path detection + * for GNU Taler. */ -static char * -get_path_from_proc_maps () -{ - char fn[64]; - char line[1024]; - char dir[1024]; - FILE *f; - char *lgu; +static const struct GNUNET_OS_ProjectData taler_pd = { + .libname = "libtalerutil", + .project_dirname = "taler", + .binary_name = "taler-exchange-httpd", + .env_varname = "TALER_PREFIX" +}; - GNUNET_snprintf (fn, sizeof (fn), "/proc/%u/maps", getpid ()); - if (NULL == (f = FOPEN (fn, "r"))) - return NULL; - while (NULL != fgets (line, sizeof (line), f)) - { - if ((1 == - SSCANF (line, "%*x-%*x %*c%*c%*c%*c %*x %*2x:%*2x %*u%*[ ]%1023s", dir)) && - (NULL != (lgu = strstr (dir, "libtalerutil")))) - { - lgu[0] = '\0'; - FCLOSE (f); - return GNUNET_strdup (dir); - } - } - FCLOSE (f); - return NULL; + +/** + * Return default project data used by gnunet-gtk. + */ +const struct GNUNET_OS_ProjectData * +TALER_project_data_default (void) +{ + return &taler_pd; } /** - * Try to determine path by reading /proc/PID/exe - * - * @return NULL on error + * Initialize libtalerutil. */ -static char * -get_path_from_proc_exe () +void __attribute__ ((constructor)) +TALER_OS_init () { - char fn[64]; - char lnk[1024]; - ssize_t size; - - GNUNET_snprintf (fn, sizeof (fn), "/proc/%u/exe", getpid ()); - size = readlink (fn, lnk, sizeof (lnk) - 1); - if (size <= 0) - { - LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "readlink", fn); - return NULL; - } - GNUNET_assert (size < sizeof (lnk)); - lnk[size] = '\0'; - while ((lnk[size] != '/') && (size > 0)) - size--; - /* test for being in lib/taler/libexec/ or lib/MULTIARCH/taler/libexec */ - if ( (size > strlen ("/taler/libexec/")) && - (0 == strcmp ("/taler/libexec/", - &lnk[size - strlen ("/taler/libexec/")])) ) - size -= strlen ("taler/libexec/"); - if ((size < 4) || (lnk[size - 4] != '/')) - { - /* not installed in "/bin/" -- binary path probably useless */ - return NULL; - } - lnk[size] = '\0'; - return GNUNET_strdup (lnk); + GNUNET_OS_init (&taler_pd); } -#endif - - -#if WINDOWS -static HINSTANCE dll_instance; - - -/** - * GNUNET_util_cl_init() in common_logging.c is preferred. - * This function is only for thread-local storage (not used in GNUnet) - * and hInstance saving. - */ -BOOL WINAPI -DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - dll_instance = hinstDLL; - break; - case DLL_THREAD_ATTACH: - break; - case DLL_THREAD_DETACH: - break; - case DLL_PROCESS_DETACH: - break; - } - return TRUE; -} - - -/** - * Try to determine path with win32-specific function - * - * @return NULL on error - */ -static char * -get_path_from_module_filename () -{ - size_t pathlen = 512; - DWORD real_pathlen; - wchar_t *idx; - wchar_t *modulepath = NULL; - char *upath; - uint8_t *u8_string; - size_t u8_string_length; - - /* This braindead function won't tell us how much space it needs, so - * we start at 1024 and double the space up if it doesn't fit, until - * it fits, or we exceed the threshold. - */ - do - { - pathlen = pathlen * 2; - modulepath = GNUNET_realloc (modulepath, pathlen * sizeof (wchar_t)); - SetLastError (0); - real_pathlen = GetModuleFileNameW (dll_instance, modulepath, pathlen * sizeof (wchar_t)); - } while (real_pathlen >= pathlen && pathlen < 16*1024); - if (real_pathlen >= pathlen) - GNUNET_assert (0); - /* To be safe */ - modulepath[real_pathlen] = '\0'; - - idx = modulepath + real_pathlen; - while ((idx > modulepath) && (*idx != L'\\') && (*idx != L'/')) - idx--; - *idx = L'\0'; - - /* Now modulepath holds full path to the directory where libtalerutil is. - * This directory should look like /bin or . - */ - if (wcschr (modulepath, L'/') || wcschr (modulepath, L'\\')) - { - /* At least one directory component (i.e. we're not in a root directory) */ - wchar_t *dirname = idx; - while ((dirname > modulepath) && (*dirname != L'\\') && (*dirname != L'/')) - dirname--; - *dirname = L'\0'; - if (dirname > modulepath) - { - dirname++; - /* Now modulepath holds full path to the parent directory of the directory - * where libtalerutil is. - * dirname holds the name of the directory where libtalerutil is. - */ - if (wcsicmp (dirname, L"bin") == 0) - { - /* pass */ - } - else - { - /* Roll back our changes to modulepath */ - dirname--; - *dirname = L'/'; - } - } - } - - /* modulepath is TALER_PREFIX */ - u8_string = u16_to_u8 (modulepath, wcslen (modulepath), NULL, &u8_string_length); - if (NULL == u8_string) - GNUNET_assert (0); - - upath = GNUNET_malloc (u8_string_length + 1); - memcpy (upath, u8_string, u8_string_length); - upath[u8_string_length] = '\0'; - - free (u8_string); - GNUNET_free (modulepath); - - return upath; -} -#endif - - -#if DARWIN -/** - * Signature of the '_NSGetExecutablePath" function. - * - * @param buf where to write the path - * @param number of bytes available in 'buf' - * @return 0 on success, otherwise desired number of bytes is stored in 'bufsize' - */ -typedef int (*MyNSGetExecutablePathProto) (char *buf, size_t * bufsize); - - -/** - * Try to obtain the path of our executable using '_NSGetExecutablePath'. - * - * @return NULL on error - */ -static char * -get_path_from_NSGetExecutablePath () -{ - static char zero = '\0'; - char *path; - size_t len; - MyNSGetExecutablePathProto func; - - path = NULL; - if (NULL == (func = - (MyNSGetExecutablePathProto) dlsym (RTLD_DEFAULT, "_NSGetExecutablePath"))) - return NULL; - path = &zero; - len = 0; - /* get the path len, including the trailing \0 */ - (void) func (path, &len); - if (0 == len) - return NULL; - path = GNUNET_malloc (len); - if (0 != func (path, &len)) - { - GNUNET_free (path); - return NULL; - } - len = strlen (path); - while ((path[len] != '/') && (len > 0)) - len--; - path[len] = '\0'; - return path; -} - - -/** - * Try to obtain the path of our executable using '_dyld_image' API. - * - * @return NULL on error - */ -static char * -get_path_from_dyld_image () -{ - const char *path; - char *p; - char *s; - unsigned int i; - int c; - - c = _dyld_image_count (); - for (i = 0; i < c; i++) - { - if (((const void *) _dyld_get_image_header (i)) != (const void *)&_mh_dylib_header) - continue; - path = _dyld_get_image_name (i); - if ( (NULL == path) || (0 == strlen (path)) ) - continue; - p = GNUNET_strdup (path); - s = p + strlen (p); - while ((s > p) && ('/' != *s)) - s--; - s++; - *s = '\0'; - return p; - } - return NULL; -} -#endif - - -/** - * Return the actual path to a file found in the current - * PATH environment variable. - * - * @param binary the name of the file to find - * @return path to binary, NULL if not found - */ -static char * -get_path_from_PATH (const char *binary) -{ - char *path; - char *pos; - char *end; - char *buf; - const char *p; - - if (NULL == (p = getenv ("PATH"))) - return NULL; -#if WINDOWS - /* On W32 look in CWD first. */ - GNUNET_asprintf (&path, ".%c%s", PATH_SEPARATOR, p); -#else - path = GNUNET_strdup (p); /* because we write on it */ -#endif - buf = GNUNET_malloc (strlen (path) + strlen (binary) + 1 + 1); - pos = path; - while (NULL != (end = strchr (pos, PATH_SEPARATOR))) - { - *end = '\0'; - sprintf (buf, "%s/%s", pos, binary); - if (GNUNET_DISK_file_test (buf) == GNUNET_YES) - { - pos = GNUNET_strdup (pos); - GNUNET_free (buf); - GNUNET_free (path); - return pos; - } - pos = end + 1; - } - sprintf (buf, "%s/%s", pos, binary); - if (GNUNET_YES == GNUNET_DISK_file_test (buf)) - { - pos = GNUNET_strdup (pos); - GNUNET_free (buf); - GNUNET_free (path); - return pos; - } - GNUNET_free (buf); - GNUNET_free (path); - return NULL; -} - - -/** - * Try to obtain the installation path using the "TALER_PREFIX" environment - * variable. - * - * @return NULL on error (environment variable not set) - */ -static char * -get_path_from_TALER_PREFIX () -{ - const char *p; - - if (NULL != (p = getenv ("TALER_PREFIX"))) - return GNUNET_strdup (p); - return NULL; -} - - -/** - * @brief get the path to Taler bin/ or lib/, prefering the lib/ path - * @author Milan - * - * @return a pointer to the executable path, or NULL on error - */ -static char * -os_get_taler_path () -{ - char *ret; - - if (NULL != (ret = get_path_from_TALER_PREFIX ())) - return ret; -#if LINUX - if (NULL != (ret = get_path_from_proc_maps ())) - return ret; - /* try path *first*, before /proc/exe, as /proc/exe can be wrong */ - if (NULL != (ret = get_path_from_PATH ("taler-exchange-httpd"))) - return ret; - if (NULL != (ret = get_path_from_proc_exe ())) - return ret; -#endif -#if WINDOWS - if (NULL != (ret = get_path_from_module_filename ())) - return ret; -#endif -#if DARWIN - if (NULL != (ret = get_path_from_dyld_image ())) - return ret; - if (NULL != (ret = get_path_from_NSGetExecutablePath ())) - return ret; -#endif - if (NULL != (ret = get_path_from_PATH ("taler-exchange-httpd"))) - return ret; - /* other attempts here */ - LOG (GNUNET_ERROR_TYPE_ERROR, - _("Could not determine installation path for %s. Set `%s' environment variable.\n"), - "Taler", "TALER_PREFIX"); - return NULL; -} - - -/** - * @brief get the path to current app's bin/ - * @author Milan - * - * @return a pointer to the executable path, or NULL on error - */ -static char * -os_get_exec_path () -{ - char *ret = NULL; - -#if LINUX - if (NULL != (ret = get_path_from_proc_exe ())) - return ret; -#endif -#if WINDOWS - if (NULL != (ret = get_path_from_module_filename ())) - return ret; -#endif -#if DARWIN - if (NULL != (ret = get_path_from_NSGetExecutablePath ())) - return ret; -#endif - /* other attempts here */ - return ret; -} - - -/** - * @brief get the path to a specific Taler installation directory or, - * with #GNUNET_OS_IPK_SELF_PREFIX, the current running apps installation directory - * @author Milan - * @return a pointer to the dir path (to be freed by the caller) - */ -char * -TALER_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind) -{ - size_t n; - const char *dirname; - char *execpath = NULL; - char *tmp; - char *multiarch; - char *libdir; - int isbasedir; - - /* if wanted, try to get the current app's bin/ */ - if (dirkind == GNUNET_OS_IPK_SELF_PREFIX) - execpath = os_get_exec_path (); - - /* try to get Taler's bin/ or lib/, or if previous was unsuccessful some - * guess for the current app */ - if (NULL == execpath) - execpath = os_get_taler_path (); - - if (NULL == execpath) - return NULL; - - n = strlen (execpath); - if (0 == n) - { - /* should never happen, but better safe than sorry */ - GNUNET_free (execpath); - return NULL; - } - /* remove filename itself */ - while ((n > 1) && (DIR_SEPARATOR == execpath[n - 1])) - execpath[--n] = '\0'; - - isbasedir = 1; - if ((n > 6) && - ((0 == strcasecmp (&execpath[n - 6], "/lib32")) || - (0 == strcasecmp (&execpath[n - 6], "/lib64")))) - { - if ( (GNUNET_OS_IPK_LIBDIR != dirkind) && - (GNUNET_OS_IPK_LIBEXECDIR != dirkind) ) - { - /* strip '/lib32' or '/lib64' */ - execpath[n - 6] = '\0'; - n -= 6; - } - else - isbasedir = 0; - } - else if ((n > 4) && - ((0 == strcasecmp (&execpath[n - 4], "/bin")) || - (0 == strcasecmp (&execpath[n - 4], "/lib")))) - { - /* strip '/bin' or '/lib' */ - execpath[n - 4] = '\0'; - n -= 4; - } - multiarch = NULL; - if (NULL != (libdir = strstr (execpath, "/lib/"))) - { - /* test for multi-arch path of the form "PREFIX/lib/MULTIARCH/"; - here we need to re-add 'multiarch' to lib and libexec paths later! */ - multiarch = &libdir[5]; - if (NULL == strchr (multiarch, '/')) - libdir[0] = '\0'; /* Debian multiarch format, cut of from 'execpath' but preserve in multicarch */ - else - multiarch = NULL; /* maybe not, multiarch still has a '/', which is not OK */ - } - /* in case this was a directory named foo-bin, remove "foo-" */ - while ((n > 1) && (execpath[n - 1] == DIR_SEPARATOR)) - execpath[--n] = '\0'; - switch (dirkind) - { - case GNUNET_OS_IPK_PREFIX: - case GNUNET_OS_IPK_SELF_PREFIX: - dirname = DIR_SEPARATOR_STR; - break; - case GNUNET_OS_IPK_BINDIR: - dirname = DIR_SEPARATOR_STR "bin" DIR_SEPARATOR_STR; - break; - case GNUNET_OS_IPK_LIBDIR: - if (isbasedir) - { - GNUNET_asprintf (&tmp, - "%s%s%s%s%s", - execpath, - DIR_SEPARATOR_STR "lib", - (NULL != multiarch) ? DIR_SEPARATOR_STR : "", - (NULL != multiarch) ? multiarch : "", - DIR_SEPARATOR_STR "taler" DIR_SEPARATOR_STR); - if (GNUNET_YES == - GNUNET_DISK_directory_test (tmp, GNUNET_YES)) - { - GNUNET_free (execpath); - return tmp; - } - GNUNET_free (tmp); - tmp = NULL; - if (4 == sizeof (void *)) - { - dirname = - DIR_SEPARATOR_STR "lib32" DIR_SEPARATOR_STR "taler" DIR_SEPARATOR_STR; - GNUNET_asprintf (&tmp, - "%s%s", - execpath, - dirname); - } - if (8 == sizeof (void *)) - { - dirname = - DIR_SEPARATOR_STR "lib64" DIR_SEPARATOR_STR "taler" DIR_SEPARATOR_STR; - GNUNET_asprintf (&tmp, - "%s%s", - execpath, - dirname); - } - - if ( (NULL != tmp) && - (GNUNET_YES == - GNUNET_DISK_directory_test (tmp, GNUNET_YES)) ) - { - GNUNET_free (execpath); - return tmp; - } - GNUNET_free (tmp); - } - dirname = DIR_SEPARATOR_STR "taler" DIR_SEPARATOR_STR; - break; - case GNUNET_OS_IPK_DATADIR: - dirname = - DIR_SEPARATOR_STR "share" DIR_SEPARATOR_STR "taler" DIR_SEPARATOR_STR; - break; - case GNUNET_OS_IPK_LOCALEDIR: - dirname = - DIR_SEPARATOR_STR "share" DIR_SEPARATOR_STR "locale" DIR_SEPARATOR_STR; - break; - case GNUNET_OS_IPK_ICONDIR: - dirname = - DIR_SEPARATOR_STR "share" DIR_SEPARATOR_STR "icons" DIR_SEPARATOR_STR; - break; - case GNUNET_OS_IPK_DOCDIR: - dirname = - DIR_SEPARATOR_STR "share" DIR_SEPARATOR_STR "doc" DIR_SEPARATOR_STR \ - "gnunet" DIR_SEPARATOR_STR; - break; - case GNUNET_OS_IPK_LIBEXECDIR: - if (isbasedir) - { - dirname = - DIR_SEPARATOR_STR "taler" DIR_SEPARATOR_STR "libexec" DIR_SEPARATOR_STR; - GNUNET_asprintf (&tmp, - "%s%s%s%s", - execpath, - DIR_SEPARATOR_STR "lib" DIR_SEPARATOR_STR, - (NULL != multiarch) ? multiarch : "", - dirname); - if (GNUNET_YES == - GNUNET_DISK_directory_test (tmp, GNUNET_YES)) - { - GNUNET_free (execpath); - return tmp; - } - GNUNET_free (tmp); - tmp = NULL; - if (4 == sizeof (void *)) - { - dirname = - DIR_SEPARATOR_STR "lib32" DIR_SEPARATOR_STR "taler" DIR_SEPARATOR_STR \ - "libexec" DIR_SEPARATOR_STR; - GNUNET_asprintf (&tmp, - "%s%s", - execpath, - dirname); - } - if (8 == sizeof (void *)) - { - dirname = - DIR_SEPARATOR_STR "lib64" DIR_SEPARATOR_STR "taler" DIR_SEPARATOR_STR \ - "libexec" DIR_SEPARATOR_STR; - GNUNET_asprintf (&tmp, - "%s%s", - execpath, - dirname); - } - if ( (NULL != tmp) && - (GNUNET_YES == - GNUNET_DISK_directory_test (tmp, GNUNET_YES)) ) - { - GNUNET_free (execpath); - return tmp; - } - - GNUNET_free (tmp); - } - dirname = - DIR_SEPARATOR_STR "taler" DIR_SEPARATOR_STR \ - "libexec" DIR_SEPARATOR_STR; - break; - default: - GNUNET_free (execpath); - return NULL; - } - GNUNET_asprintf (&tmp, - "%s%s", - execpath, - dirname); - GNUNET_free (execpath); - return tmp; -} - - -/** - * Given the name of a taler-helper, taler-service or taler-daemon - * binary, try to prefix it with the libexec/-directory to get the - * full path. - * - * @param progname name of the binary - * @return full path to the binary, if possible, otherwise copy of 'progname' - */ -char * -TALER_OS_get_libexec_binary_path (const char *progname) -{ - static char *cache; - char *libexecdir; - char *binary; - - if ( (DIR_SEPARATOR == progname[0]) || - (GNUNET_YES == GNUNET_STRINGS_path_is_absolute (progname, GNUNET_NO, NULL, NULL)) ) - return GNUNET_strdup (progname); - if (NULL != cache) - libexecdir = cache; - else - libexecdir = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_LIBEXECDIR); - if (NULL == libexecdir) - return GNUNET_strdup (progname); - GNUNET_asprintf (&binary, - "%s%s", - libexecdir, - progname); - cache = libexecdir; - return binary; -} - /* end of os_installation.c */ diff --git a/src/util/plugin.c b/src/util/plugin.c index 6f8e03df6..65c28fa2b 100644 --- a/src/util/plugin.c +++ b/src/util/plugin.c @@ -51,7 +51,7 @@ plugin_init () opath = lt_dlgetsearchpath (); if (NULL != opath) old_dlsearchpath = GNUNET_strdup (opath); - path = TALER_OS_installation_get_path (GNUNET_OS_IPK_LIBDIR); + path = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_LIBDIR); if (NULL != path) { if (NULL != opath) From 92907bee45681b1273172a3c88461a60bcae8589 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 1 Apr 2016 08:37:44 +0200 Subject: [PATCH 37/91] return nicer error message from bank API and fix compiler warning --- src/wire/plugin_wire_test.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c index 70cf82462..3ef76aa6b 100644 --- a/src/wire/plugin_wire_test.c +++ b/src/wire/plugin_wire_test.c @@ -419,22 +419,40 @@ test_prepare_wire_transfer_cancel (void *cls, * @param cls closure with the `struct TALER_WIRE_ExecuteHandle` * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request * 0 if the bank's reply is bogus (fails to follow the protocol) + * @param json detailed response from the HTTPD, or NULL if reply was not JSON */ static void execute_cb (void *cls, - unsigned int http_status) + unsigned int http_status, + json_t *json) { struct TALER_WIRE_ExecuteHandle *eh = cls; - char s[14]; + json_t *reason; + const char *emsg; + char *s; eh->aaih = NULL; - GNUNET_snprintf (s, - sizeof (s), - "%u", - http_status); + emsg = NULL; + if (NULL != json) + { + reason = json_object_get (json, + "reason"); + if (NULL != reason) + emsg = json_string_value (reason); + } + if (NULL != emsg) + GNUNET_asprintf (&s, + "%u (%s)", + http_status, + emsg); + else + GNUNET_asprintf (&s, + "%u", + http_status); eh->cc (eh->cc_cls, (MHD_HTTP_OK == http_status) ? GNUNET_OK : GNUNET_SYSERR, (MHD_HTTP_OK == http_status) ? NULL : s); + GNUNET_free (s); GNUNET_free (eh); } From de3e26303e0069614d4a5aa425e4fa5ddb088b8b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 1 Apr 2016 16:15:35 +0200 Subject: [PATCH 38/91] implementing #4356, tests still failing, but main logic should now be updated --- src/exchange-lib/exchange_api_wire.c | 317 +++--------------- src/exchange-lib/test_exchange_api.c | 96 +++--- src/exchange/taler-exchange-httpd.c | 16 +- .../taler-exchange-httpd_validation.c | 38 ++- .../taler-exchange-httpd_validation.h | 9 +- src/exchange/taler-exchange-httpd_wire.c | 190 +---------- src/exchange/taler-exchange-httpd_wire.h | 37 +- src/include/taler_exchange_service.h | 46 +-- src/include/taler_signatures.h | 26 -- src/include/taler_wire_plugin.h | 15 + src/wire/plugin_wire_sepa.c | 60 +++- src/wire/plugin_wire_template.c | 20 ++ src/wire/plugin_wire_test.c | 53 +++ 13 files changed, 277 insertions(+), 646 deletions(-) diff --git a/src/exchange-lib/exchange_api_wire.c b/src/exchange-lib/exchange_api_wire.c index 27ae1dce7..0e93a9d20 100644 --- a/src/exchange-lib/exchange_api_wire.c +++ b/src/exchange-lib/exchange_api_wire.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014, 2015 GNUnet e.V. + Copyright (C) 2014, 2015, 2016 Inria and GNUnet e.V. TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -128,257 +128,6 @@ verify_wire_method_signature_ok (const struct TALER_EXCHANGE_WireHandle *wh, } -/** - * Perform the next /wire/method request or signal - * the end of the iteration. - * - * @param wh the wire handle - * @return a handle for this request - */ -static void -request_wire_method (struct TALER_EXCHANGE_WireHandle *wh); - - -/** - * Function called when we're done processing the - * HTTP /wire/METHOD request. - * - * @param cls the `struct TALER_EXCHANGE_WireHandle` - * @param eh the curl request handle - */ -static void -handle_wire_method_finished (void *cls, - CURL *eh) -{ - struct TALER_EXCHANGE_WireHandle *wh = cls; - long response_code; - json_t *json; - - wh->job = NULL; - json = MAC_download_get_result (&wh->db, - eh, - &response_code); - switch (response_code) - { - case 0: - break; - case MHD_HTTP_OK: - { - const char *method; - - method = json_string_value (json_array_get (wh->methods, - wh->methods_off - 1)); - if (GNUNET_OK != - verify_wire_method_signature_ok (wh, - method, - json)) - { - GNUNET_break_op (0); - response_code = 0; - break; - } - break; - } - case MHD_HTTP_FOUND: - /* /wire/test returns a 302 redirect, we should just give - this information back to the callback below */ - break; - case MHD_HTTP_BAD_REQUEST: - /* This should never happen, either us or the exchange is buggy - (or API version conflict); just pass JSON reply to the application */ - break; - case MHD_HTTP_NOT_FOUND: - /* Nothing really to verify, this should never - happen, we should pass the JSON reply to the application */ - break; - case MHD_HTTP_INTERNAL_SERVER_ERROR: - /* Server had an internal issue; we should retry, but this API - leaves this to the application */ - break; - default: - /* unexpected response code */ - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Unexpected response code %u\n", - response_code); - GNUNET_break (0); - response_code = 0; - break; - } - if (0 == response_code) - { - /* signal end of iteration */ - wh->cb (wh->cb_cls, - 0, - NULL, - NULL); - json_decref (json); - TALER_EXCHANGE_wire_cancel (wh); - return; - } - /* pass on successful reply */ - wh->cb (wh->cb_cls, - response_code, - json_string_value (json_array_get (wh->methods, - wh->methods_off-1)), - json); - json_decref (json); - /* trigger request for the next /wire/method */ - request_wire_method (wh); -} - - -/** - * Perform the next /wire/method request or signal - * the end of the iteration. - * - * @param wh the wire handle - * @return a handle for this request - */ -static void -request_wire_method (struct TALER_EXCHANGE_WireHandle *wh) -{ - struct TALER_EXCHANGE_Context *ctx; - CURL *eh; - char *path; - - if (json_array_size (wh->methods) <= wh->methods_off) - { - /* we are done, signal end of iteration */ - wh->cb (wh->cb_cls, - 0, - NULL, - NULL); - TALER_EXCHANGE_wire_cancel (wh); - return; - } - GNUNET_free_non_null (wh->db.buf); - wh->db.buf = NULL; - wh->db.buf_size = 0; - wh->db.eno = 0; - GNUNET_free_non_null (wh->url); - GNUNET_asprintf (&path, - "/wire/%s", - json_string_value (json_array_get (wh->methods, - wh->methods_off++))); - wh->url = MAH_path_to_url (wh->exchange, - path); - GNUNET_free (path); - - eh = curl_easy_init (); - GNUNET_assert (CURLE_OK == - curl_easy_setopt (eh, - CURLOPT_URL, - wh->url)); - GNUNET_assert (CURLE_OK == - curl_easy_setopt (eh, - CURLOPT_WRITEFUNCTION, - &MAC_download_cb)); - GNUNET_assert (CURLE_OK == - curl_easy_setopt (eh, - CURLOPT_WRITEDATA, - &wh->db)); - /* The default is 'disabled', but let's be sure */ - GNUNET_assert (CURLE_OK == - curl_easy_setopt (eh, - CURLOPT_FOLLOWLOCATION, - (long) 0)); - ctx = MAH_handle_to_context (wh->exchange); - wh->job = MAC_job_add (ctx, - eh, - GNUNET_YES, - &handle_wire_method_finished, - wh); - TALER_EXCHANGE_perform (ctx); -} - - -/** - * Verify that the signature on the "200 OK" response - * for /wire from the exchange is valid. - * - * @param wh wire handle - * @param json json reply with the signature - * @return NULL if @a json is invalid, otherwise the - * "methods" array (with an RC of 1) - */ -static json_t * -verify_wire_signature_ok (const struct TALER_EXCHANGE_WireHandle *wh, - json_t *json) -{ - struct TALER_ExchangeSignatureP exchange_sig; - struct TALER_ExchangePublicKeyP exchange_pub; - struct TALER_ExchangeWireSupportMethodsPS mp; - json_t *methods; - const struct TALER_EXCHANGE_Keys *key_state; - struct GNUNET_HashContext *hc; - struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_fixed_auto ("sig", &exchange_sig), - GNUNET_JSON_spec_fixed_auto ("pub", &exchange_pub), - GNUNET_JSON_spec_json ("methods", &methods), - GNUNET_JSON_spec_end() - }; - unsigned int i; - - if (GNUNET_OK != - GNUNET_JSON_parse (json, - spec, - NULL, NULL)) - { - GNUNET_break_op (0); - return NULL; - } - if (! json_is_array (methods)) - { - GNUNET_break_op (0); - GNUNET_JSON_parse_free (spec); - return NULL; - } - - key_state = TALER_EXCHANGE_get_keys (wh->exchange); - if (GNUNET_OK != - TALER_EXCHANGE_test_signing_key (key_state, - &exchange_pub)) - { - GNUNET_break_op (0); - return NULL; - } - hc = GNUNET_CRYPTO_hash_context_start (); - for (i=0;imethods = methods; - request_wire_method (wh); - return; + else + { + /* some supported methods were invalid, release 'keep', preserve + full 'json' for application-level error handling. */ + json_decref (keep); + } } break; case MHD_HTTP_BAD_REQUEST: @@ -440,19 +217,9 @@ handle_wire_finished (void *cls, response_code = 0; break; } - if (0 != response_code) - { - /* pass on successful reply */ - wh->cb (wh->cb_cls, - response_code, - NULL, - json); - } - /* signal end of iteration */ wh->cb (wh->cb_cls, - 0, - NULL, - NULL); + response_code, + json); if (NULL != json) json_decref (json); TALER_EXCHANGE_wire_cancel (wh); @@ -481,8 +248,8 @@ handle_wire_finished (void *cls, */ struct TALER_EXCHANGE_WireHandle * TALER_EXCHANGE_wire (struct TALER_EXCHANGE_Handle *exchange, - TALER_EXCHANGE_WireResultCallback wire_cb, - void *wire_cb_cls) + TALER_EXCHANGE_WireResultCallback wire_cb, + void *wire_cb_cls) { struct TALER_EXCHANGE_WireHandle *wh; struct TALER_EXCHANGE_Context *ctx; diff --git a/src/exchange-lib/test_exchange_api.c b/src/exchange-lib/test_exchange_api.c index 2a7f670cd..6eae08f4d 100644 --- a/src/exchange-lib/test_exchange_api.c +++ b/src/exchange-lib/test_exchange_api.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014, 2015, 2016 GNUnet e.V. + Copyright (C) 2014, 2015, 2016 GNUnet e.V. and Inria TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -1213,76 +1213,56 @@ find_pk (const struct TALER_EXCHANGE_Keys *keys, * Callbacks called with the result(s) of a * wire format inquiry request to the exchange. * - * The callback is invoked multiple times, once for each supported @a - * method. Finally, it is invoked one more time with cls/0/NULL/NULL - * to indicate the end of the iteration. If any request fails to - * generate a valid response from the exchange, @a http_status will also - * be zero and the iteration will also end. Thus, the iteration - * always ends with a final call with an @a http_status of 0. If the - * @a http_status is already 0 on the first call, then the response to - * the /wire request was invalid. Later, clients can tell the - * difference between @a http_status of 0 indicating a failed - * /wire/method request and a regular end of the iteration by @a - * method being non-NULL. If the exchange simply correctly asserts that - * it does not support any methods, @a method will be NULL but the @a - * http_status will be #MHD_HTTP_OK for the first call (followed by a - * cls/0/NULL/NULL call to signal the end of the iteration). - * * @param cls closure with the interpreter state * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful request; * 0 if the exchange's reply is bogus (fails to follow the protocol) - * @param method wire format method supported, i.e. "test" or "sepa", or NULL - * if already the /wire request failed. * @param obj the received JSON reply, if successful this should be the wire - * format details as provided by /wire/METHOD/, or NULL if the - * reply was not in JSON format (in this case, the client might - * want to do an HTTP request to /wire/METHOD/ with a browser to - * provide more information to the user about the @a method). + * format details as provided by /wire. */ static void wire_cb (void *cls, unsigned int http_status, - const char *method, json_t *obj) { struct InterpreterState *is = cls; struct Command *cmd = &is->commands[is->ip]; - if (0 == http_status) - { - /* 0 always signals the end of the iteration */ - cmd->details.wire.wh = NULL; - } - else if ( (NULL != method) && - (0 != strcasecmp (method, - cmd->details.wire.format)) ) - { - /* not the method we care about, skip */ - return; - } if (cmd->expected_response_code != http_status) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Unexpected response code %u to command %s/%s\n", + "Unexpected response code %u to command %s\n", http_status, - cmd->label, - method); + cmd->label); json_dumpf (obj, stderr, 0); fail (is); return; } - if (0 == http_status) + switch (http_status) { - /* end of iteration, move to next command */ - is->ip++; - is->task = GNUNET_SCHEDULER_add_now (&interpreter_run, - is); - return; + case MHD_HTTP_OK: + { + json_t *method; + + method = json_object_get (obj, + cmd->details.wire.format); + if (NULL == method) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Expected method `%s' not included in response to command %s\n", + cmd->details.wire.format, + cmd->label); + json_dumpf (obj, stderr, 0); + fail (is); + return; + } + } + break; + default: + break; } - /* For now, we only support to be called only once - with a "positive" result; so we switch to an - expected value of 0 for the 2nd iteration */ - cmd->expected_response_code = 0; + is->ip++; + is->task = GNUNET_SCHEDULER_add_now (&interpreter_run, + is); } @@ -1899,9 +1879,9 @@ interpreter_run (void *cls, /* finally, use private key from withdraw sign command */ cmd->details.refresh_link.rlh = TALER_EXCHANGE_refresh_link (exchange, - &ref->details.reserve_withdraw.coin_priv, - &link_cb, - is); + &ref->details.reserve_withdraw.coin_priv, + &link_cb, + is); if (NULL == cmd->details.refresh_link.rlh) { GNUNET_break (0); @@ -1912,8 +1892,8 @@ interpreter_run (void *cls, return; case OC_WIRE: cmd->details.wire.wh = TALER_EXCHANGE_wire (exchange, - &wire_cb, - is); + &wire_cb, + is); trigger_context_task (); return; case OC_WIRE_DEPOSITS: @@ -1926,9 +1906,9 @@ interpreter_run (void *cls, } cmd->details.wire_deposits.wdh = TALER_EXCHANGE_wire_deposits (exchange, - &cmd->details.wire_deposits.wtid, - &wire_deposits_cb, - is); + &cmd->details.wire_deposits.wtid, + &wire_deposits_cb, + is); trigger_context_task (); return; case OC_DEPOSIT_WTID: @@ -2337,14 +2317,14 @@ run (void *cls, #if WIRE_TEST { .oc = OC_WIRE, .label = "wire-test", - /* /wire/test replies with a 200 OK */ + /* expecting 'test' method in response */ .expected_response_code = MHD_HTTP_OK, .details.wire.format = "test" }, #endif #if WIRE_SEPA { .oc = OC_WIRE, .label = "wire-sepa", - /* /wire/sepa replies with a 200 redirect */ + /* expecting 'sepa' method in response */ .expected_response_code = MHD_HTTP_OK, .details.wire.format = "sepa" }, #endif diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index 877876dbb..2ef58b0f7 100644 --- a/src/exchange/taler-exchange-httpd.c +++ b/src/exchange/taler-exchange-httpd.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014, 2015 GNUnet e.V. + Copyright (C) 2014, 2015, 2016 Inria and GNUnet e.V. TALER is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software @@ -177,20 +177,6 @@ handle_mhd_request (void *cls, "Only GET is allowed", 0, &TMH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED }, - { "/wire/test", MHD_HTTP_METHOD_GET, "application/json", - NULL, 0, - &TMH_WIRE_handler_wire_test, MHD_HTTP_FOUND }, - { "/wire/test", NULL, "text/plain", - "Only GET is allowed", 0, - &TMH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED }, - - { "/wire/sepa", MHD_HTTP_METHOD_GET, "application/json", - NULL, 0, - &TMH_WIRE_handler_wire_sepa, MHD_HTTP_OK }, - { "/wire/sepa", NULL, "text/plain", - "Only GET is allowed", 0, - &TMH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED }, - /* Withdrawing coins / interaction with reserves */ { "/reserve/status", MHD_HTTP_METHOD_GET, "application/json", NULL, 0, diff --git a/src/exchange/taler-exchange-httpd_validation.c b/src/exchange/taler-exchange-httpd_validation.c index b7e8a7f80..0b72960c5 100644 --- a/src/exchange/taler-exchange-httpd_validation.c +++ b/src/exchange/taler-exchange-httpd_validation.c @@ -200,33 +200,39 @@ TMH_VALIDATION_test_method (const char *type) /** - * Obtain supported validation methods as a JSON array, - * and as a hash. + * Obtain JSON of the supported wire methods for a given + * account name prefix. * - * @param[out] h set to the hash of the JSON methods + * @param prefix prefix for the account, the suffix will + * be determined by the name of the plugin * @return JSON array with the supported validation methods */ json_t * -TMH_VALIDATION_get_methods (struct GNUNET_HashCode *h) +TMH_VALIDATION_get_wire_methods (const char *prefix) { json_t *methods; - struct GNUNET_HashContext *hc; - const char *wf; + json_t *method; struct Plugin *p; + struct TALER_WIRE_Plugin *plugin; + char *account_name; - methods = json_array (); - hc = GNUNET_CRYPTO_hash_context_start (); + methods = json_object (); for (p=wire_head;NULL != p;p = p->next) { - wf = p->type; - json_array_append_new (methods, - json_string (wf)); - GNUNET_CRYPTO_hash_context_read (hc, - wf, - strlen (wf) + 1); + plugin = p->plugin; + GNUNET_asprintf (&account_name, + "%s-%s\n", + prefix, + p->type); + method = plugin->get_wire_details (plugin->cls, + cfg, + account_name); + if (NULL != method) + json_object_set_new (methods, + p->type, + method); + GNUNET_free (account_name); } - GNUNET_CRYPTO_hash_context_finish (hc, - h); return methods; } diff --git a/src/exchange/taler-exchange-httpd_validation.h b/src/exchange/taler-exchange-httpd_validation.h index f41e2ee5f..a5403edd4 100644 --- a/src/exchange/taler-exchange-httpd_validation.h +++ b/src/exchange/taler-exchange-httpd_validation.h @@ -63,14 +63,15 @@ TMH_VALIDATION_test_method (const char *type); /** - * Obtain supported validation methods as a JSON array, - * and as a hash. + * Obtain JSON of the supported wire methods for a given + * account name prefix. * - * @param[out] h set to the hash of the JSON methods + * @param prefix prefix for the account, the suffix will + * be determined by the name of the plugin * @return JSON array with the supported validation methods */ json_t * -TMH_VALIDATION_get_methods (struct GNUNET_HashCode *h); +TMH_VALIDATION_get_wire_methods (const char *prefix); #endif diff --git a/src/exchange/taler-exchange-httpd_wire.c b/src/exchange/taler-exchange-httpd_wire.c index 1b3d3b541..975788b35 100644 --- a/src/exchange/taler-exchange-httpd_wire.c +++ b/src/exchange/taler-exchange-httpd_wire.c @@ -43,191 +43,15 @@ TMH_WIRE_handler_wire (struct TMH_RequestHandler *rh, const char *upload_data, size_t *upload_data_size) { - struct TALER_ExchangeWireSupportMethodsPS wsm; - struct TALER_ExchangePublicKeyP pub; - struct TALER_ExchangeSignatureP sig; - json_t *methods; + static json_t *wire_methods; - wsm.purpose.size = htonl (sizeof (wsm)); - wsm.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_WIRE_TYPES); - methods = TMH_VALIDATION_get_methods (&wsm.h_wire_types); - TMH_KS_sign (&wsm.purpose, - &pub, - &sig); - return TMH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_OK, - "{s:o, s:o, s:o}", - "methods", methods, - "sig", GNUNET_JSON_from_data (&sig, - sizeof (sig)), - "pub", GNUNET_JSON_from_data (&pub, - sizeof (pub))); + if (NULL == wire_methods) + wire_methods = TMH_VALIDATION_get_wire_methods ("wire-incoming"); + + return TMH_RESPONSE_reply_json (connection, + wire_methods, + MHD_HTTP_OK); } -/** - * Handle a "/wire/test" request. - * - * @param rh context of the handler - * @param connection the MHD connection to handle - * @param[in,out] connection_cls the connection's closure (can be updated) - * @param upload_data upload data - * @param[in,out] upload_data_size number of bytes (left) in @a upload_data - * @return MHD result code - */ -int -TMH_WIRE_handler_wire_test (struct TMH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size) -{ - struct MHD_Response *response; - int ret; - char *bank_uri; - unsigned long long account_number; - - response = MHD_create_response_from_buffer (0, NULL, - MHD_RESPMEM_PERSISTENT); - if (NULL == response) - { - GNUNET_break (0); - return MHD_NO; - } - TMH_RESPONSE_add_global_headers (response); - if (GNUNET_NO == TMH_VALIDATION_test_method ("test")) - { - /* Return 501: not implemented */ - ret = MHD_queue_response (connection, - MHD_HTTP_NOT_IMPLEMENTED, - response); - MHD_destroy_response (response); - return ret; - } - if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_string (cfg, - "wire-test", - "BANK_URI", - &bank_uri)) - { - /* oopsie, configuration error */ - MHD_destroy_response (response); - return TMH_RESPONSE_reply_internal_error (connection, - "BANK_URI not configured"); - } - if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_number (cfg, - "wire-test", - "BANK_ACCOUNT_NO_INCOMING", - &account_number)) - { - /* oopsie, configuration error */ - MHD_destroy_response (response); - GNUNET_free (bank_uri); - return TMH_RESPONSE_reply_internal_error (connection, - "BANK_ACCOUNT_NO_INCOMING not configured"); - } - ret = TMH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_OK, - "{s:s, s:I, s:s}", - "type", "test", - "account_number", (json_int_t) account_number, - "bank_uri", bank_uri); - GNUNET_free (bank_uri); - return ret; -} - - -/** - * Handle a "/wire/sepa" request. - * - * @param rh context of the handler - * @param connection the MHD connection to handle - * @param[in,out] connection_cls the connection's closure (can be updated) - * @param upload_data upload data - * @param[in,out] upload_data_size number of bytes (left) in @a upload_data - * @return MHD result code - */ -int -TMH_WIRE_handler_wire_sepa (struct TMH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size) -{ - struct MHD_Response *response; - int ret; - char *sepa_wire_file; - int fd; - struct stat sbuf; - - if (GNUNET_NO == TMH_VALIDATION_test_method ("sepa")) - { - /* Return 501: not implemented */ - response = MHD_create_response_from_buffer (0, NULL, - MHD_RESPMEM_PERSISTENT); - if (NULL == response) - { - GNUNET_break (0); - return MHD_NO; - } - TMH_RESPONSE_add_global_headers (response); - ret = MHD_queue_response (connection, - MHD_HTTP_NOT_IMPLEMENTED, - response); - MHD_destroy_response (response); - return ret; - } - /* Fetch reply */ - if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_filename (cfg, - "wire-sepa", - "SEPA_RESPONSE_FILE", - &sepa_wire_file)) - { - return TMH_RESPONSE_reply_internal_error (connection, - "SEPA_RESPONSE_FILE not configured"); - } - fd = open (sepa_wire_file, - O_RDONLY); - if (-1 == fd) - { - GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, - "open", - sepa_wire_file); - GNUNET_free (sepa_wire_file); - return TMH_RESPONSE_reply_internal_error (connection, - "Failed to open SEPA_RESPONSE_FILE"); - } - if (0 != fstat (fd, &sbuf)) - { - GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, - "fstat", - sepa_wire_file); - (void) close (fd); - GNUNET_free (sepa_wire_file); - return TMH_RESPONSE_reply_internal_error (connection, - "Failed to open SEPA_RESPONSE_FILE"); - } - response = MHD_create_response_from_fd ((size_t) sbuf.st_size, - fd); - GNUNET_free (sepa_wire_file); - if (NULL == response) - { - (void) close (fd); - GNUNET_break (0); - return MHD_NO; - } - TMH_RESPONSE_add_global_headers (response); - if (NULL != rh->mime_type) - (void) MHD_add_response_header (response, - MHD_HTTP_HEADER_CONTENT_TYPE, - rh->mime_type); - ret = MHD_queue_response (connection, - rh->response_code, - response); - MHD_destroy_response (response); - return ret; -} - /* end of taler-exchange-httpd_wire.c */ diff --git a/src/exchange/taler-exchange-httpd_wire.h b/src/exchange/taler-exchange-httpd_wire.h index dc6dcc0f4..cf04f16ff 100644 --- a/src/exchange/taler-exchange-httpd_wire.h +++ b/src/exchange/taler-exchange-httpd_wire.h @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014 GNUnet e.V. + Copyright (C) 2014, 2015, 2016 Inria and GNUnet e.V. TALER is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software @@ -44,39 +44,4 @@ TMH_WIRE_handler_wire (struct TMH_RequestHandler *rh, size_t *upload_data_size); -/** - * Handle a "/wire/test" request. - * - * @param rh context of the handler - * @param connection the MHD connection to handle - * @param[in,out] connection_cls the connection's closure (can be updated) - * @param upload_data upload data - * @param[in,out] upload_data_size number of bytes (left) in @a upload_data - * @return MHD result code - */ -int -TMH_WIRE_handler_wire_test (struct TMH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size); - - -/** - * Handle a "/wire/sepa" request. - * - * @param rh context of the handler - * @param connection the MHD connection to handle - * @param[in,out] connection_cls the connection's closure (can be updated) - * @param upload_data upload data - * @param[in,out] upload_data_size number of bytes (left) in @a upload_data - * @return MHD result code - */ -int -TMH_WIRE_handler_wire_sepa (struct TMH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size); - #endif diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index e4aa89a59..4a1592cf2 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h @@ -396,53 +396,35 @@ struct TALER_EXCHANGE_WireHandle; * Callbacks of this type are used to serve the result of submitting a * wire format inquiry request to a exchange. * - * The callback is invoked multiple times, once for each supported @a - * method. Finally, it is invoked one more time with cls/0/NULL/NULL - * to indicate the end of the iteration. If any request fails to - * generate a valid response from the exchange, @a http_status will also - * be zero and the iteration will also end. Thus, the iteration - * always ends with a final call with an @a http_status of 0. If the - * @a http_status is already 0 on the first call, then the response to - * the /wire request was invalid. Later, clients can tell the - * difference between @a http_status of 0 indicating a failed - * /wire/method request and a regular end of the iteration by @a - * method being non-NULL. If the exchange simply correctly asserts that - * it does not support any methods, @a method will be NULL but the @a - * http_status will be #MHD_HTTP_OK for the first call (followed by a - * cls/0/NULL/NULL call to signal the end of the iteration). + * If the request fails to generate a valid response from the + * exchange, @a http_status will also be zero. * * @param cls closure * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful request; * 0 if the exchange's reply is bogus (fails to follow the protocol) - * @param method wire format method supported, i.e. "test" or "sepa", or NULL - * if already the /wire request failed. * @param obj the received JSON reply, if successful this should be the wire - * format details as provided by /wire/METHOD/, or NULL if the - * reply was not in JSON format (in this case, the client might - * want to do an HTTP request to /wire/METHOD/ with a browser to - * provide more information to the user about the @a method). + * format details as provided by /wire, or NULL if the + * reply was not in JSON format. */ typedef void (*TALER_EXCHANGE_WireResultCallback) (void *cls, unsigned int http_status, - const char *method, json_t *obj); /** - * Obtain information about a exchange's wire instructions. - * A exchange may provide wire instructions for creating - * a reserve. The wire instructions also indicate - * which wire formats merchants may use with the exchange. - * This API is typically used by a wallet for wiring - * funds, and possibly by a merchant to determine - * supported wire formats. + * Obtain information about a exchange's wire instructions. A + * exchange may provide wire instructions for creating a reserve. The + * wire instructions also indicate which wire formats merchants may + * use with the exchange. This API is typically used by a wallet for + * wiring funds, and possibly by a merchant to determine supported + * wire formats. * * Note that while we return the (main) response verbatim to the * caller for further processing, we do already verify that the * response is well-formed (i.e. that signatures included in the - * response are all valid). If the exchange's reply is not well-formed, - * we return an HTTP status code of zero to @a cb. + * response are all valid). If the exchange's reply is not + * well-formed, we return an HTTP status code of zero to @a cb. * * @param exchange the exchange handle; the exchange must be ready to operate * @param wire_cb the callback to call when a reply for this request is available @@ -451,8 +433,8 @@ typedef void */ struct TALER_EXCHANGE_WireHandle * TALER_EXCHANGE_wire (struct TALER_EXCHANGE_Handle *exchange, - TALER_EXCHANGE_WireResultCallback wire_cb, - void *wire_cb_cls); + TALER_EXCHANGE_WireResultCallback wire_cb, + void *wire_cb_cls); /** diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h index d958f16ba..23bdaa578 100644 --- a/src/include/taler_signatures.h +++ b/src/include/taler_signatures.h @@ -101,11 +101,6 @@ */ #define TALER_SIGNATURE_EXCHANGE_KEY_SET 1035 -/** - * Signature where the Exchange confirms the /wire response. - */ -#define TALER_SIGNATURE_EXCHANGE_WIRE_TYPES 1036 - /** * Signature where the Exchange confirms the /deposit/wtid response. */ @@ -784,27 +779,6 @@ struct TALER_MasterWireSepaDetailsPS }; -/** - * @brief Information signed by a exchange's online signing key affirming - * the wire formats supported by the exchange. - */ -struct TALER_ExchangeWireSupportMethodsPS -{ - - /** - * Purpose is #TALER_SIGNATURE_EXCHANGE_WIRE_TYPES. - */ - struct GNUNET_CRYPTO_EccSignaturePurpose purpose; - - /** - * Hash over the various wire formats supported by this exchange - * (all as 0-terminated strings). - */ - struct GNUNET_HashCode h_wire_types GNUNET_PACKED; - -}; - - /** * @brief Format used to generate the signature on a request to obtain * the wire transfer identifier associated with a deposit. diff --git a/src/include/taler_wire_plugin.h b/src/include/taler_wire_plugin.h index c80aa2e49..e166558a7 100644 --- a/src/include/taler_wire_plugin.h +++ b/src/include/taler_wire_plugin.h @@ -98,6 +98,21 @@ struct TALER_WIRE_Plugin struct TALER_Amount *amount); + /** + * Obtain wire transfer details in the plugin-specific format + * from the configuration. + * + * @param cls closure + * @param cfg configuration with details about wire accounts + * @param account_name which section in the configuration should we parse + * @return NULL if @a cfg fails to have valid wire details for @a account_name + */ + json_t * + (*get_wire_details)(void *cls, + const struct GNUNET_CONFIGURATION_Handle *cfg, + const char *account_name); + + /** * Check if the given wire format JSON object is correctly formatted * diff --git a/src/wire/plugin_wire_sepa.c b/src/wire/plugin_wire_sepa.c index 904afa9bf..995436725 100644 --- a/src/wire/plugin_wire_sepa.c +++ b/src/wire/plugin_wire_sepa.c @@ -380,7 +380,7 @@ verify_wire_sepa_signature_ok (const json_t *json, if (NULL == master_pub) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Skipping signature check as master public key not given\n"); return GNUNET_OK; } @@ -491,6 +491,63 @@ sepa_wire_validate (void *cls, } +/** + * Obtain wire transfer details in the plugin-specific format + * from the configuration. + * + * @param cls closure + * @param cfg configuration with details about wire accounts + * @param account_name which section in the configuration should we parse + * @return NULL if @a cfg fails to have valid wire details for @a account_name + */ +static json_t * +sepa_get_wire_details (void *cls, + const struct GNUNET_CONFIGURATION_Handle *cfg, + const char *account_name) +{ + char *sepa_wire_file; + json_error_t err; + json_t *ret; + + /* Fetch reply */ + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_filename (cfg, + account_name, + "SEPA_RESPONSE_FILE", + &sepa_wire_file)) + { + return NULL; + } + ret = json_load_file (sepa_wire_file, + JSON_REJECT_DUPLICATES, + &err); + if (NULL == ret) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Failed to parse JSON in %s: %s (%s:%u)\n", + sepa_wire_file, + err.text, + err.source, + err.line); + GNUNET_free (sepa_wire_file); + return NULL; + } + if (GNUNET_YES != sepa_wire_validate (cls, + ret, + NULL)) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Failed to validate SEPA data in %s\n", + sepa_wire_file); + GNUNET_free (sepa_wire_file); + json_decref (ret); + return NULL; + } + GNUNET_free (sepa_wire_file); + return ret; +} + + /** * Prepare for exeuction of a wire transfer. * @@ -604,6 +661,7 @@ libtaler_plugin_wire_sepa_init (void *cls) plugin = GNUNET_new (struct TALER_WIRE_Plugin); plugin->cls = sc; plugin->amount_round = &sepa_amount_round; + plugin->get_wire_details = &sepa_get_wire_details; plugin->wire_validate = &sepa_wire_validate; plugin->prepare_wire_transfer = &sepa_prepare_wire_transfer; plugin->prepare_wire_transfer_cancel = &sepa_prepare_wire_transfer_cancel; diff --git a/src/wire/plugin_wire_template.c b/src/wire/plugin_wire_template.c index 91b380c38..fd6fbfbe9 100644 --- a/src/wire/plugin_wire_template.c +++ b/src/wire/plugin_wire_template.c @@ -73,6 +73,25 @@ template_amount_round (void *cls, } +/** + * Obtain wire transfer details in the plugin-specific format + * from the configuration. + * + * @param cls closure + * @param cfg configuration with details about wire accounts + * @param account_name which section in the configuration should we parse + * @return NULL if @a cfg fails to have valid wire details for @a account_name + */ +static json_t * +template_get_wire_details (void *cls, + const struct GNUNET_CONFIGURATION_Handle *cfg, + const char *account_name) +{ + GNUNET_break (0); + return NULL; +} + + /** * Check if the given wire format JSON object is correctly formatted * @@ -216,6 +235,7 @@ libtaler_plugin_wire_template_init (void *cls) plugin = GNUNET_new (struct TALER_WIRE_Plugin); plugin->cls = tc; plugin->amount_round = &template_amount_round; + plugin->get_wire_details = &template_get_wire_details; plugin->wire_validate = &template_wire_validate; plugin->prepare_wire_transfer = &template_prepare_wire_transfer; plugin->prepare_wire_transfer_cancel = &template_prepare_wire_transfer_cancel; diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c index 3ef76aa6b..a03f8127d 100644 --- a/src/wire/plugin_wire_test.c +++ b/src/wire/plugin_wire_test.c @@ -232,6 +232,58 @@ test_amount_round (void *cls, } +/** + * Obtain wire transfer details in the plugin-specific format + * from the configuration. + * + * @param cls closure + * @param cfg configuration with details about wire accounts + * @param account_name which section in the configuration should we parse + * @return NULL if @a cfg fails to have valid wire details for @a account_name + */ +static json_t * +test_get_wire_details (void *cls, + const struct GNUNET_CONFIGURATION_Handle *cfg, + const char *account_name) +{ + json_t *ret; + char *bank_uri; + unsigned long long account_number; + + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (cfg, + account_name, + "BANK_URI", + &bank_uri)) + { + /* oopsie, configuration error */ + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + account_name, + "BANK_URI"); + return NULL; + } + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_number (cfg, + account_name, + "BANK_ACCOUNT_NUMBER", + &account_number)) + { + /* oopsie, configuration error */ + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + account_name, + "BANK_URI"); + GNUNET_free (bank_uri); + return NULL; + } + ret = json_pack ("{s:s, s:I, s:s}", + "type", "test", + "account_number", (json_int_t) account_number, + "bank_uri", bank_uri); + GNUNET_free (bank_uri); + return ret; +} + + /** * Check if the given wire format JSON object is correctly formatted. * Right now, the only thing we require is a field @@ -628,6 +680,7 @@ libtaler_plugin_wire_test_init (void *cls) plugin = GNUNET_new (struct TALER_WIRE_Plugin); plugin->cls = tc; plugin->amount_round = &test_amount_round; + plugin->get_wire_details = &test_get_wire_details; plugin->wire_validate = &test_wire_validate; plugin->prepare_wire_transfer = &test_prepare_wire_transfer; plugin->prepare_wire_transfer_cancel = &test_prepare_wire_transfer_cancel; From 76c8ab07e120210f248ce141aa9013de305aa5cf Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 1 Apr 2016 17:14:30 +0200 Subject: [PATCH 39/91] fix testcase with new path detection logic --- src/exchange/test_taler_exchange_aggregator.c | 34 +++++++------------ 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/src/exchange/test_taler_exchange_aggregator.c b/src/exchange/test_taler_exchange_aggregator.c index a36fcdec4..d4821bbd1 100644 --- a/src/exchange/test_taler_exchange_aggregator.c +++ b/src/exchange/test_taler_exchange_aggregator.c @@ -59,17 +59,14 @@ run_aggregator () /** * Main function that will be run by the scheduler. * - * @param cls closure - * @param args remaining command-line arguments - * @param cfgfile name of the configuration file used (for saving, can be NULL!) - * @param cfg configuration + * @param cls closure with configuration + * @param tc unused */ static void run (void *cls, - char *const *args, - const char *cfgfile, - const struct GNUNET_CONFIGURATION_Handle *cfg) + const struct GNUNET_SCHEDULER_TaskContext *tc) { + struct GNUNET_CONFIGURATION_Handle *cfg = cls; struct TALER_EXCHANGEDB_Plugin *plugin; struct TALER_EXCHANGEDB_Session *session; @@ -100,16 +97,9 @@ int main (int argc, char *const argv[]) { - static const struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_END - }; - char *argv2[] = { - "test-taler-exchange-aggregator-", /* will be replaced later */ - "-c", "test-taler-exchange-aggregator-.conf", /* will be replaced later */ - NULL, - }; const char *plugin_name; char *testname; + struct GNUNET_CONFIGURATION_Handle *cfg; result = -1; if (NULL == (plugin_name = strrchr (argv[0], (int) '-'))) @@ -122,18 +112,18 @@ main (int argc, "test-taler-exchange-aggregator-%s", plugin_name); (void) GNUNET_asprintf (&config_filename, "%s.conf", testname); - argv2[0] = argv[0]; - argv2[2] = config_filename; + cfg = GNUNET_CONFIGURATION_create (); if (GNUNET_OK != - GNUNET_PROGRAM_run ((sizeof (argv2)/sizeof (char *)) - 1, argv2, - testname, - "Test cases for exchange aggregator.", - options, &run, NULL)) + GNUNET_CONFIGURATION_parse (cfg, + config_filename)) { + GNUNET_break (0); GNUNET_free (config_filename); GNUNET_free (testname); - return 3; + return 2; } + GNUNET_SCHEDULER_run (&run, cfg); + GNUNET_CONFIGURATION_destroy (cfg); GNUNET_free (config_filename); GNUNET_free (testname); return result; From 9bc96506bb6441467c6558f5252e803c4292c9fe Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 1 Apr 2016 17:32:10 +0200 Subject: [PATCH 40/91] update man pages and templates to use current options --- .../config/exchange-common.conf | 16 ++++++++++---- doc/taler.conf.5 | 16 +++++++------- .../config/exchange-common.conf | 21 ++++++++++++------- src/exchange-lib/test_exchange_api.c | 1 + .../config/exchange-common.conf | 12 ++++++++--- src/wire/plugin_wire_test.c | 21 ++++++++++--------- 6 files changed, 55 insertions(+), 32 deletions(-) diff --git a/contrib/exchange-template/config/exchange-common.conf b/contrib/exchange-template/config/exchange-common.conf index 26bf4ff94..eddde3c32 100644 --- a/contrib/exchange-template/config/exchange-common.conf +++ b/contrib/exchange-template/config/exchange-common.conf @@ -21,15 +21,23 @@ TESTRUN = YES [exchangedb-postgres] DB_CONN_STR = "postgres:///talercheck" -[wire-sepa] +[wire-incoming-sepa] SEPA_RESPONSE_FILE = "sepa.json" -[wire-test] +[wire-outgoing-sepa] +SEPA_RESPONSE_FILE = "sepa.json" + + +[wire-incoming-test] # What is the main website of the bank? BANK_URI = "https://bank/" # Into which account at the 'bank' should incoming # wire transfers be made? -BANK_ACCOUNT_NO_INCOMING = 2 +BANK_ACCOUNT_NUMBER = 2 + +[wire-outgoing-test] +# What is the main website of the bank? +BANK_URI = "https://bank/" # From which account at the 'bank' should outgoing # wire transfers be made? -BANK_ACCOUNT_NO_OUTGOING = 2 +BANK_ACCOUNT_NUMBER = 2 diff --git a/doc/taler.conf.5 b/doc/taler.conf.5 index f9d9d6312..e4c7083d6 100644 --- a/doc/taler.conf.5 +++ b/doc/taler.conf.5 @@ -28,20 +28,23 @@ The following options are from the "[exchange]" section and used by most exchang .SH WIRE transfer details -The following options must be in section "[exchange-wire-test]": +The following options must be in section "[wire\-incoming\-test]" and "[wire\-outgoing\-test]": -.IP REDIRECT_URL - URL to redirect /wire/test to. Should contain a Web form the user can use to charge his wallet with coins in a "test" currency for testing. If this option is not provided, /wire/test will return "501 NOT IMPLEMENTED". +.IP BANK_URI + URL of the Taler bank. -The following options must be in section "[exchange-wire-sepa]": +.IP BANK_ACCOUNT_NUMBER + Number of the bank account of the exchange. + +The following options must be in section "[wire\-incoming\-sepa]" and "[wire\-outgoing\-sepa]": .IP SEPA_RESPONSE_FILE - Filename with the JSON body for the /wire/sepa response, signed using the exchange's long-term offline master key. If this option is not provided, /wire/test will return "501 NOT IMPLEMENTED". Use "taler-exchange-sepa" to create the SEPA_RESPONSE_FILE. + Filename with the JSON body for the /wire response, signed using the exchange\'s long-term offline master key. Use taler\-exchange\-sepa to create the SEPA_RESPONSE_FILE. .SH Postgres database options -The following options must be in section "[exchangedb-postgres]": +The following options must be in section "[exchangedb\-postgres]": .IP DB_CONN_STR How to access the database, i.e. "postgres:///taler" to use the "taler" database. Testcases use "talercheck". @@ -86,4 +89,3 @@ Report bugs by using Mantis or by sending electronic .SH "SEE ALSO" \fBtaler\-exchange\-httpd\fP(1), \fBtaler\-exchange\-keyup\fP(1), \fBtaler\-exchange\-reservemod\fP(1), \fBtaler\-exchange\-dbinit\fP(1), \fBtaler\-exchange\-sepa(1) - diff --git a/src/exchange-lib/test-exchange-home/config/exchange-common.conf b/src/exchange-lib/test-exchange-home/config/exchange-common.conf index 89b7f5182..97947f111 100644 --- a/src/exchange-lib/test-exchange-home/config/exchange-common.conf +++ b/src/exchange-lib/test-exchange-home/config/exchange-common.conf @@ -22,15 +22,20 @@ TESTRUN = YES [exchangedb-postgres] DB_CONN_STR = "postgres:///talercheck" -[wire-sepa] +[wire-incoming-sepa] SEPA_RESPONSE_FILE = "test-exchange-home/sepa.json" -[wire-test] +[wire-incoming-sepa] +SEPA_RESPONSE_FILE = "test-exchange-home/sepa.json" + +[wire-incoming-test] # What is the main website of the bank? BANK_URI = "http://localhost/" -# Into which account at the 'bank' should incoming -# wire transfers be made? -BANK_ACCOUNT_NO_INCOMING = 2 -# From which account at the 'bank' should outgoing -# wire transfers be made? -BANK_ACCOUNT_NO_OUTGOING = 2 \ No newline at end of file +# Into which account at the 'bank' should (incoming) wire transfers be made? +BANK_ACCOUNT_NUMBER = 2 + +[wire-outgoing-test] +# What is the main website of the bank? +BANK_URI = "http://localhost/" +# Into which account at the 'bank' should (incoming) wire transfers be made? +BANK_ACCOUNT_NUMBER = 2 diff --git a/src/exchange-lib/test_exchange_api.c b/src/exchange-lib/test_exchange_api.c index 6eae08f4d..bfe54d507 100644 --- a/src/exchange-lib/test_exchange_api.c +++ b/src/exchange-lib/test_exchange_api.c @@ -1227,6 +1227,7 @@ wire_cb (void *cls, struct InterpreterState *is = cls; struct Command *cmd = &is->commands[is->ip]; + cmd->details.wire.wh = NULL; if (cmd->expected_response_code != http_status) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, diff --git a/src/exchange/test-exchange-home/config/exchange-common.conf b/src/exchange/test-exchange-home/config/exchange-common.conf index e4ff2a4d6..4078cbee5 100644 --- a/src/exchange/test-exchange-home/config/exchange-common.conf +++ b/src/exchange/test-exchange-home/config/exchange-common.conf @@ -22,12 +22,18 @@ TESTRUN = YES [exchangedb-postgres] DB_CONN_STR = "postgres:///talercheck" -[wire-test] + +[wire-incoming-test] # What is the main website of the bank? BANK_URI = "http://localhost:8082/" # Into which account at the 'bank' should incoming # wire transfers be made? -BANK_ACCOUNT_NO_INCOMING = 2 +BANK_ACCOUNT_NUMBER = 2 + +[wire-outgoing-test] +# What is the main website of the bank? +BANK_URI = "http://localhost:8082/" + # From which account at the 'bank' should outgoing # wire transfers be made? -BANK_ACCOUNT_NO_OUTGOING = 3 +BANK_ACCOUNT_NUMBER = 3 diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c index a03f8127d..888501afb 100644 --- a/src/wire/plugin_wire_test.c +++ b/src/wire/plugin_wire_test.c @@ -44,9 +44,10 @@ struct TestClosure char *currency; /** - * Number of the account that the exchange has at the bank. + * Number of the account that the exchange has at the bank for outgoing + * transfers. */ - unsigned long long exchange_account_no; + unsigned long long exchange_account_outgoing_no; /** * Handle to the bank task, or NULL. @@ -576,7 +577,7 @@ test_execute_wire_transfer (void *cls, eh->aaih = TALER_BANK_admin_add_incoming (tc->bank, &bf.wtid, &amount, - (uint64_t) tc->exchange_account_no, + (uint64_t) tc->exchange_account_outgoing_no, (uint64_t) account_no, &execute_cb, eh); @@ -632,25 +633,25 @@ libtaler_plugin_wire_test_init (void *cls) { if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, - "wire-test", + "wire-outgoing-test", "BANK_URI", &uri)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "wire-test", + "wire-outgoing-test", "BANK_URI"); GNUNET_free (tc); return NULL; } if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (cfg, - "wire-test", - "BANK_ACCOUNT_NO_OUTGOING", - &tc->exchange_account_no)) + "wire-outgoing-test", + "BANK_ACCOUNT_NUMBER", + &tc->exchange_account_outgoing_no)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "wire-test", - "BANK_ACCOUNT_NO_OUTGOING"); + "wire-incoming-test", + "BANK_ACCOUNT_NUMBER"); GNUNET_free (uri); GNUNET_free (tc); return NULL; From 4154e41a411df9d30ab0213a7409642c924e78b0 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 1 Apr 2016 20:18:18 +0200 Subject: [PATCH 41/91] hash inputs to sign_fdh functions as required by new API --- src/exchangedb/perf_taler_exchangedb_init.c | 8 +++++--- src/exchangedb/test_exchangedb.c | 17 ++++++++++++----- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/exchangedb/perf_taler_exchangedb_init.c b/src/exchangedb/perf_taler_exchangedb_init.c index 8036d8597..c669518ad 100644 --- a/src/exchangedb/perf_taler_exchangedb_init.c +++ b/src/exchangedb/perf_taler_exchangedb_init.c @@ -335,6 +335,7 @@ PERF_TALER_EXCHANGEDB_coin_init ( { struct PERF_TALER_EXCHANGEDB_Coin *coin; struct GNUNET_CRYPTO_EddsaPrivateKey *priv; + struct GNUNET_HashCode hc; coin = GNUNET_new (struct PERF_TALER_EXCHANGEDB_Coin); GNUNET_assert (NULL != coin); @@ -350,11 +351,12 @@ PERF_TALER_EXCHANGEDB_coin_init ( &coin->public_info.coin_pub.eddsa_pub); coin->public_info.denom_pub.rsa_public_key = GNUNET_CRYPTO_rsa_public_key_dup (dki->denom_pub.rsa_public_key); - // This is broken at the moment because it needs to be a hash of a coin public key. + GNUNET_CRYPTO_hash (&coin->public_info.coin_pub, + sizeof (struct TALER_CoinSpendPublicKeyP), + &hc); coin->public_info.denom_sig.rsa_signature = GNUNET_CRYPTO_rsa_sign_fdh (dki->denom_priv.rsa_private_key, - &coin->public_info.coin_pub, - sizeof (struct TALER_CoinSpendPublicKeyP)); + &hc); GNUNET_assert (NULL != coin->public_info.denom_pub.rsa_public_key); GNUNET_assert (NULL != coin->public_info.denom_sig.rsa_signature); diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c index 090c08fbd..56c300678 100644 --- a/src/exchangedb/test_exchangedb.c +++ b/src/exchangedb/test_exchangedb.c @@ -335,12 +335,15 @@ test_melting (struct TALER_EXCHANGEDB_Session *session) melts = GNUNET_new_array (MELT_OLD_COINS, struct TALER_EXCHANGEDB_RefreshMelt); for (cnt=0; cnt < MELT_OLD_COINS; cnt++) { + struct GNUNET_HashCode hc; + RND_BLK (&melts[cnt].coin.coin_pub); - // This appears to be broken because it needs to be a hash of a coin public key + GNUNET_CRYPTO_hash (&melts[cnt].coin.coin_pub, + sizeof (melts[cnt].coin.coin_pub), + &hc); melts[cnt].coin.denom_sig.rsa_signature = GNUNET_CRYPTO_rsa_sign_fdh (dkp->priv.rsa_private_key, - &melts[cnt].coin.coin_pub, - sizeof (melts[cnt].coin.coin_pub)); + &hc); melts[cnt].coin.denom_pub = dkp->pub; RND_BLK (&melts[cnt].coin_sig); melts[cnt].session_hash = session_hash; @@ -569,6 +572,7 @@ run (void *cls, struct TALER_EXCHANGEDB_Deposit deposit; struct TALER_EXCHANGEDB_Deposit deposit2; struct TALER_WireTransferIdentifierRawP wtid; + struct GNUNET_HashCode hc; json_t *wire; json_t *just; const char * const json_wire_str = @@ -663,10 +667,12 @@ run (void *cls, RND_BLK(&cbc.h_coin_envelope); RND_BLK(&cbc.reserve_sig); cbc.denom_pub = dkp->pub; + GNUNET_CRYPTO_hash (&cbc.h_coin_envelope, + sizeof (cbc.h_coin_envelope), + &hc); cbc.sig.rsa_signature = GNUNET_CRYPTO_rsa_sign_fdh (dkp->priv.rsa_private_key, - &cbc.h_coin_envelope, - sizeof (cbc.h_coin_envelope)); + &hc); cbc.reserve_pub = reserve_pub; cbc.amount_with_fee = value; GNUNET_assert (GNUNET_OK == @@ -890,6 +896,7 @@ main (int argc, "test-exchange-db-%s", plugin_name); (void) GNUNET_asprintf (&config_filename, "%s.conf", testname); + argv2[0] = argv[0]; argv2[2] = config_filename; if (GNUNET_OK != From 1c568f8eb61e97dfefb61f7372e7338ed997e8c1 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 1 Apr 2016 20:27:57 +0200 Subject: [PATCH 42/91] fix testcase init with new API --- src/exchangedb/perf_taler_exchangedb_init.c | 2 +- .../perf_taler_exchangedb_interpreter.c | 67 +++++++++---------- src/exchangedb/test_exchangedb.c | 44 +++++------- 3 files changed, 50 insertions(+), 63 deletions(-) diff --git a/src/exchangedb/perf_taler_exchangedb_init.c b/src/exchangedb/perf_taler_exchangedb_init.c index c669518ad..516f3ea58 100644 --- a/src/exchangedb/perf_taler_exchangedb_init.c +++ b/src/exchangedb/perf_taler_exchangedb_init.c @@ -486,7 +486,7 @@ PERF_TALER_EXCHANGEDB_refresh_session_free (struct TALER_EXCHANGEDB_RefreshSessi */ struct TALER_EXCHANGEDB_RefreshMelt * PERF_TALER_EXCHANGEDB_refresh_melt_init (struct GNUNET_HashCode *session, - struct PERF_TALER_EXCHANGEDB_Coin *coin) + struct PERF_TALER_EXCHANGEDB_Coin *coin) { struct TALER_EXCHANGEDB_RefreshMelt *melt; struct TALER_CoinSpendSignatureP coin_sig; diff --git a/src/exchangedb/perf_taler_exchangedb_interpreter.c b/src/exchangedb/perf_taler_exchangedb_interpreter.c index 75b32cb60..78b58a5ae 100644 --- a/src/exchangedb/perf_taler_exchangedb_interpreter.c +++ b/src/exchangedb/perf_taler_exchangedb_interpreter.c @@ -759,7 +759,7 @@ cmd_init (struct PERF_TALER_EXCHANGEDB_Cmd cmd[]) return GNUNET_SYSERR; } if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) - { + { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", i, @@ -785,7 +785,7 @@ cmd_init (struct PERF_TALER_EXCHANGEDB_Cmd cmd[]) return GNUNET_SYSERR; } if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) - { + { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", i, @@ -804,7 +804,7 @@ cmd_init (struct PERF_TALER_EXCHANGEDB_Cmd cmd[]) return GNUNET_SYSERR; } if (PERF_TALER_EXCHANGEDB_COIN != cmd[ret].exposed.type) - { + { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", i, @@ -828,7 +828,7 @@ cmd_init (struct PERF_TALER_EXCHANGEDB_Cmd cmd[]) return GNUNET_SYSERR; } if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) - { + { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", i, @@ -853,7 +853,7 @@ cmd_init (struct PERF_TALER_EXCHANGEDB_Cmd cmd[]) return GNUNET_SYSERR; } if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) - { + { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", i, @@ -873,7 +873,7 @@ cmd_init (struct PERF_TALER_EXCHANGEDB_Cmd cmd[]) return GNUNET_SYSERR; } if (PERF_TALER_EXCHANGEDB_DENOMINATION_INFO != cmd[ret].exposed.type) - { + { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", i, @@ -898,14 +898,14 @@ cmd_init (struct PERF_TALER_EXCHANGEDB_Cmd cmd[]) return GNUNET_SYSERR; } if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) - { + { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", i, cmd[i].details.get_refresh_order.label_hash); return GNUNET_SYSERR; } - cmd[i].details.get_refresh_order.index_hash = ret; + cmd[i].details.get_refresh_order.index_hash = ret; } break; @@ -923,15 +923,15 @@ cmd_init (struct PERF_TALER_EXCHANGEDB_Cmd cmd[]) return GNUNET_SYSERR; } if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) - { + { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", i, cmd[i].details.insert_refresh_commit_coin.label_hash); return GNUNET_SYSERR; } - cmd[i].details.insert_refresh_commit_coin.index_hash = ret; - } + cmd[i].details.insert_refresh_commit_coin.index_hash = ret; + } break; case PERF_TALER_EXCHANGEDB_CMD_GET_REFRESH_COMMIT_COIN: @@ -948,14 +948,14 @@ cmd_init (struct PERF_TALER_EXCHANGEDB_Cmd cmd[]) return GNUNET_SYSERR; } if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) - { + { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", i, cmd[i].details.get_refresh_commit_coin.label_hash); return GNUNET_SYSERR; } - cmd[i].details.get_refresh_commit_coin.index_hash = ret; + cmd[i].details.get_refresh_commit_coin.index_hash = ret; } break; @@ -973,14 +973,14 @@ cmd_init (struct PERF_TALER_EXCHANGEDB_Cmd cmd[]) return GNUNET_SYSERR; } if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) - { + { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", i, cmd[i].details.insert_refresh_commit_link.label_hash); return GNUNET_SYSERR; } - cmd[i].details.insert_refresh_commit_link.index_hash = ret; + cmd[i].details.insert_refresh_commit_link.index_hash = ret; } break; @@ -998,14 +998,14 @@ cmd_init (struct PERF_TALER_EXCHANGEDB_Cmd cmd[]) return GNUNET_SYSERR; } if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) - { + { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", i, cmd[i].details.get_refresh_commit_link.label_hash); return GNUNET_SYSERR; } - cmd[i].details.get_refresh_commit_link.index_hash = ret; + cmd[i].details.get_refresh_commit_link.index_hash = ret; } break; @@ -1023,14 +1023,14 @@ cmd_init (struct PERF_TALER_EXCHANGEDB_Cmd cmd[]) return GNUNET_SYSERR; } if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) - { + { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", i, cmd[i].details.get_melt_commitment.label_hash); return GNUNET_SYSERR; } - cmd[i].details.get_melt_commitment.index_hash = ret; + cmd[i].details.get_melt_commitment.index_hash = ret; } break; @@ -1048,14 +1048,14 @@ cmd_init (struct PERF_TALER_EXCHANGEDB_Cmd cmd[]) return GNUNET_SYSERR; } if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) - { + { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", i, cmd[i].details.insert_refresh_out.label_hash); return GNUNET_SYSERR; } - cmd[i].details.insert_refresh_out.index_hash = ret; + cmd[i].details.insert_refresh_out.index_hash = ret; } break; @@ -1073,14 +1073,14 @@ cmd_init (struct PERF_TALER_EXCHANGEDB_Cmd cmd[]) return GNUNET_SYSERR; } if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) - { + { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", i, cmd[i].details.get_link_data_list.label_hash); return GNUNET_SYSERR; } - cmd[i].details.get_link_data_list.index_hash = ret; + cmd[i].details.get_link_data_list.index_hash = ret; } break; @@ -1098,14 +1098,14 @@ cmd_init (struct PERF_TALER_EXCHANGEDB_Cmd cmd[]) return GNUNET_SYSERR; } if (PERF_TALER_EXCHANGEDB_REFRESH_HASH != cmd[ret].exposed.type) - { + { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%d:Wrong type reference to %s\n", i, cmd[i].details.get_transfer.label_hash); return GNUNET_SYSERR; } - cmd[i].details.get_transfer.index_hash = ret; + cmd[i].details.get_transfer.index_hash = ret; } break; @@ -1538,7 +1538,7 @@ interpret (struct PERF_TALER_EXCHANGEDB_interpreter_state *state) int ret; struct PERF_TALER_EXCHANGEDB_Data *data; - denom_index = state->cmd[state->i].details.get_denomination.index_denom; + denom_index = state->cmd[state->i].details.get_denomination.index_denom; data = &state->cmd[denom_index].exposed; ret = state->plugin->get_denomination_info (state->plugin->cls, state->session, @@ -1735,7 +1735,7 @@ interpret (struct PERF_TALER_EXCHANGEDB_interpreter_state *state) 1, 1, refresh_commit); - GNUNET_assert (GNUNET_OK == ret); + GNUNET_assert (GNUNET_OK == ret); } break; @@ -1743,7 +1743,7 @@ interpret (struct PERF_TALER_EXCHANGEDB_interpreter_state *state) { unsigned int hash_index; struct TALER_EXCHANGEDB_RefreshCommitCoin refresh_commit; - + hash_index = state->cmd[state->i].details.insert_refresh_commit_coin.index_hash; state->plugin->get_refresh_commit_coins (state->plugin->cls, state->session, @@ -1837,9 +1837,9 @@ PERF_TALER_EXCHANGEDB_interpret (struct TALER_EXCHANGEDB_Plugin *db_plugin, */ int PERF_TALER_EXCHANGEDB_run_benchmark (const char *benchmark_name, - const char *configuration_file, - struct PERF_TALER_EXCHANGEDB_Cmd *init, - struct PERF_TALER_EXCHANGEDB_Cmd *benchmark) + const char *configuration_file, + struct PERF_TALER_EXCHANGEDB_Cmd *init, + struct PERF_TALER_EXCHANGEDB_Cmd *benchmark) { struct TALER_EXCHANGEDB_Plugin *plugin; struct GNUNET_CONFIGURATION_Handle *config; @@ -1927,9 +1927,8 @@ PERF_TALER_EXCHANGEDB_run_benchmark (const char *benchmark_name, "INFO", NULL); config = GNUNET_CONFIGURATION_create (); - - ret = GNUNET_CONFIGURATION_load (config, - configuration_file); + ret = GNUNET_CONFIGURATION_parse (config, + configuration_file); if (GNUNET_OK != ret) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c index 56c300678..f33bb18c3 100644 --- a/src/exchangedb/test_exchangedb.c +++ b/src/exchangedb/test_exchangedb.c @@ -549,17 +549,14 @@ cb_wtid_check (void *cls, /** * Main function that will be run by the scheduler. * - * @param cls closure - * @param args remaining command-line arguments - * @param cfgfile name of the configuration file used (for saving, can be NULL!) - * @param cfg configuration + * @param cls closure with config + * @param tc unused */ static void run (void *cls, - char *const *args, - const char *cfgfile, - const struct GNUNET_CONFIGURATION_Handle *cfg) + const struct GNUNET_SCHEDULER_TaskContext *tc) { + struct GNUNET_CONFIGURATION_Handle *cfg = cls; struct TALER_EXCHANGEDB_Session *session; struct TALER_ReservePublicKeyP reserve_pub; struct DenomKeyPair *dkp; @@ -572,7 +569,6 @@ run (void *cls, struct TALER_EXCHANGEDB_Deposit deposit; struct TALER_EXCHANGEDB_Deposit deposit2; struct TALER_WireTransferIdentifierRawP wtid; - struct GNUNET_HashCode hc; json_t *wire; json_t *just; const char * const json_wire_str = @@ -659,6 +655,7 @@ run (void *cls, value.value * 2, value.fraction * 2, value.currency)); + result = 5; dkp = create_denom_key_pair (1024, session, &value, &fee_withdraw, @@ -667,12 +664,9 @@ run (void *cls, RND_BLK(&cbc.h_coin_envelope); RND_BLK(&cbc.reserve_sig); cbc.denom_pub = dkp->pub; - GNUNET_CRYPTO_hash (&cbc.h_coin_envelope, - sizeof (cbc.h_coin_envelope), - &hc); cbc.sig.rsa_signature = GNUNET_CRYPTO_rsa_sign_fdh (dkp->priv.rsa_private_key, - &hc); + &cbc.h_coin_envelope); cbc.reserve_pub = reserve_pub; cbc.amount_with_fee = value; GNUNET_assert (GNUNET_OK == @@ -699,10 +693,12 @@ run (void *cls, FAILIF (0 != memcmp (&cbc2.reserve_pub, &cbc.reserve_pub, sizeof (cbc2.reserve_pub))); + result = 6; FAILIF (GNUNET_OK != GNUNET_CRYPTO_rsa_verify (&cbc.h_coin_envelope, cbc2.sig.rsa_signature, dkp->pub.rsa_public_key)); + result = 7; rh = plugin->get_reserve_history (plugin->cls, session, &reserve_pub); @@ -873,17 +869,10 @@ int main (int argc, char *const argv[]) { - static const struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_END - }; - char *argv2[] = { - "test-exchange-db-", /* will be replaced later */ - "-c", "test-exchange-db-.conf", /* will be replaced later */ - NULL, - }; const char *plugin_name; char *config_filename; char *testname; + struct GNUNET_CONFIGURATION_Handle *cfg; result = -1; if (NULL == (plugin_name = strrchr (argv[0], (int) '-'))) @@ -896,19 +885,18 @@ main (int argc, "test-exchange-db-%s", plugin_name); (void) GNUNET_asprintf (&config_filename, "%s.conf", testname); - - argv2[0] = argv[0]; - argv2[2] = config_filename; + cfg = GNUNET_CONFIGURATION_create (); if (GNUNET_OK != - GNUNET_PROGRAM_run ((sizeof (argv2)/sizeof (char *)) - 1, argv2, - testname, - "Test cases for exchange database helper functions.", - options, &run, NULL)) + GNUNET_CONFIGURATION_parse (cfg, + config_filename)) { + GNUNET_break (0); GNUNET_free (config_filename); GNUNET_free (testname); - return 3; + return 2; } + GNUNET_SCHEDULER_run (&run, cfg); + GNUNET_CONFIGURATION_destroy (cfg); GNUNET_free (config_filename); GNUNET_free (testname); return result; From 116801016058023e90b33e1e0576e127685d87f3 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 1 Apr 2016 20:30:52 +0200 Subject: [PATCH 43/91] fix error message --- src/wire/plugin_wire_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c index 888501afb..304380721 100644 --- a/src/wire/plugin_wire_test.c +++ b/src/wire/plugin_wire_test.c @@ -272,7 +272,7 @@ test_get_wire_details (void *cls, /* oopsie, configuration error */ GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, account_name, - "BANK_URI"); + "BANK_ACCOUNT_NUMBER"); GNUNET_free (bank_uri); return NULL; } From bf3e5487b474e0a76d7ba9d15fae758ba693eb37 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 1 Apr 2016 20:32:44 +0200 Subject: [PATCH 44/91] fix newline --- src/exchange/taler-exchange-httpd_validation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exchange/taler-exchange-httpd_validation.c b/src/exchange/taler-exchange-httpd_validation.c index 0b72960c5..61599fe1f 100644 --- a/src/exchange/taler-exchange-httpd_validation.c +++ b/src/exchange/taler-exchange-httpd_validation.c @@ -221,7 +221,7 @@ TMH_VALIDATION_get_wire_methods (const char *prefix) { plugin = p->plugin; GNUNET_asprintf (&account_name, - "%s-%s\n", + "%s-%s", prefix, p->type); method = plugin->get_wire_details (plugin->cls, From d7d33b681216c397c0b0b4c7e633eee068f48b45 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 1 Apr 2016 20:35:22 +0200 Subject: [PATCH 45/91] set environment variable to ensure plugins are found during tests --- src/exchange-lib/Makefile.am | 2 ++ src/exchange/Makefile.am | 2 ++ src/exchangedb/Makefile.am | 1 + src/wire/Makefile.am | 2 ++ 4 files changed, 7 insertions(+) diff --git a/src/exchange-lib/Makefile.am b/src/exchange-lib/Makefile.am index 10188c8fe..49cb234a1 100644 --- a/src/exchange-lib/Makefile.am +++ b/src/exchange-lib/Makefile.am @@ -45,6 +45,8 @@ endif check_PROGRAMS = \ test_exchange_api +AM_TESTS_ENVIRONMENT=export TALER_PREFIX=$${TALER_PREFIX:-@libdir@};export PATH=$${TALER_PREFIX:-@prefix@}/bin:$$PATH; + TESTS = \ $(check_PROGRAMS) diff --git a/src/exchange/Makefile.am b/src/exchange/Makefile.am index 18a7c1b54..3375a41d5 100644 --- a/src/exchange/Makefile.am +++ b/src/exchange/Makefile.am @@ -74,6 +74,8 @@ test_taler_exchange_aggregator_postgres_LDADD = \ check_PROGRAMS = \ test_taler_exchange_aggregator-postgres +AM_TESTS_ENVIRONMENT=export TALER_PREFIX=$${TALER_PREFIX:-@libdir@};export PATH=$${TALER_PREFIX:-@prefix@}/bin:$$PATH; + TESTS = \ $(check_SCRIPTS) \ $(check_PROGRAMS) diff --git a/src/exchangedb/Makefile.am b/src/exchangedb/Makefile.am index d56d6676a..416d5688f 100644 --- a/src/exchangedb/Makefile.am +++ b/src/exchangedb/Makefile.am @@ -53,6 +53,7 @@ check_PROGRAMS = \ test-perf-taler-exchangedb \ perf-exchangedb +AM_TESTS_ENVIRONMENT=export TALER_PREFIX=$${TALER_PREFIX:-@libdir@};export PATH=$${TALER_PREFIX:-@prefix@}/bin:$$PATH; TESTS = \ test-exchangedb-postgres \ test-perf-taler-exchangedb diff --git a/src/wire/Makefile.am b/src/wire/Makefile.am index 67a559a36..fd59c8eb7 100644 --- a/src/wire/Makefile.am +++ b/src/wire/Makefile.am @@ -62,6 +62,8 @@ libtalerwire_la_LDFLAGS = \ -export-dynamic -no-undefined +AM_TESTS_ENVIRONMENT=export TALER_PREFIX=$${TALER_PREFIX:-@libdir@};export PATH=$${TALER_PREFIX:-@prefix@}/bin:$$PATH; + TESTS = \ test_sepa_wireformat From a2a7a3272da4e0783bb7562d5f66baffc51d96dc Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 1 Apr 2016 20:43:03 +0200 Subject: [PATCH 46/91] fix ignores --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f633a66eb..81be5b2f5 100644 --- a/.gitignore +++ b/.gitignore @@ -32,7 +32,7 @@ doc/doxygen/doxygen_sqlite3.db src/bank-lib/test_bank_api src/exchange-lib/test_exchange_api src/exchange/taler-exchange-aggregator -src/exchange/test_taler_exchange_aggregator +src/exchange/test_taler_exchange_aggregator-postgres src/exchange-tools/taler-auditor-sign src/exchange-tools/taler-exchange-dbinit src/exchange-tools/taler-exchange-keycheck From 937078bbdc747c92d45a3879862ff4664d1ff636 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 1 Apr 2016 21:00:05 +0200 Subject: [PATCH 47/91] fix NPE --- src/exchange/taler-exchange-aggregator.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c index 4699ff4bc..e293a23cd 100644 --- a/src/exchange/taler-exchange-aggregator.c +++ b/src/exchange/taler-exchange-aggregator.c @@ -93,8 +93,6 @@ static unsigned int aggregation_limit = 10000; static int exchange_serve_process_config (const char *exchange_directory) { - char *type; - cfg = TALER_config_load (exchange_directory); if (NULL == cfg) { @@ -130,7 +128,7 @@ exchange_serve_process_config (const char *exchange_directory) GNUNET_CONFIGURATION_get_value_string (cfg, "exchange", "wireformat", - &type)) + &exchange_wireformat)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, "exchange", @@ -143,21 +141,18 @@ exchange_serve_process_config (const char *exchange_directory) { fprintf (stderr, "Failed to initialize DB subsystem\n"); - GNUNET_free (type); return GNUNET_SYSERR; } if (NULL == (wire_plugin = TALER_WIRE_plugin_load (cfg, - type))) + exchange_wireformat))) { fprintf (stderr, "Failed to load wire plugin for `%s'\n", - type); - GNUNET_free (type); + exchange_wireformat); return GNUNET_SYSERR; } - GNUNET_free (type); return GNUNET_OK; } From daae3d3ddf1cbee4761a6a2c0066732fb4723fb0 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 2 Apr 2016 20:58:22 +0200 Subject: [PATCH 48/91] change taler-exchange-sepa to a more generic taler-exchange-wire tool using the wire plugins (#4237) --- doc/Makefile.am | 1 + doc/taler-exchange-sepa.1 | 41 ----- doc/taler-exchange-wire.1 | 38 +++++ src/exchange-tools/Makefile.am | 10 +- src/exchange-tools/taler-exchange-sepa.c | 189 --------------------- src/exchange-tools/taler-exchange-wire.c | 201 +++++++++++++++++++++++ src/include/taler_signatures.h | 13 +- src/include/taler_wire_plugin.h | 18 ++ src/wire/plugin_wire_sepa.c | 132 ++++++++++++--- src/wire/plugin_wire_template.c | 23 +++ src/wire/plugin_wire_test.c | 93 +++++++++++ 11 files changed, 499 insertions(+), 260 deletions(-) delete mode 100644 doc/taler-exchange-sepa.1 create mode 100644 doc/taler-exchange-wire.1 delete mode 100644 src/exchange-tools/taler-exchange-sepa.c create mode 100644 src/exchange-tools/taler-exchange-wire.c diff --git a/doc/Makefile.am b/doc/Makefile.am index 5a9de87a0..0ccd84746 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -10,6 +10,7 @@ man_MANS = \ taler-exchange-keyup.1 \ taler-exchange-keycheck.1 \ taler-exchange-reservemod.1 \ + taler-exchange-wire.1 \ taler.conf.5 EXTRA_DIST = \ diff --git a/doc/taler-exchange-sepa.1 b/doc/taler-exchange-sepa.1 deleted file mode 100644 index b24828d96..000000000 --- a/doc/taler-exchange-sepa.1 +++ /dev/null @@ -1,41 +0,0 @@ -.TH TALER\-EXCHANGE\-SEPA 1 "Apr 22, 2015" "GNU Taler" - -.SH NAME -taler\-exchange\-sepa \- Create the master-key signed response to /wire/sepa. - -.SH SYNOPSIS -.B taler\-exchange\-sepa -.RI [ options ] -.br - -.SH DESCRIPTION -\fBtaler\-exchange\-sepa\fP is used to create the exchange's reply to a /wire/sepa request. It converts the bank details into the appropriate signed response. This needs to be done using the long-term offline master key. - -.SH OPTIONS -.B -.IP "\-b BIC, \-\-bic=BIC" -Specifies the BIC code to use. -.B -.IP "\-i IBAN, \-\-iban=IBAN" -Specifies the IBAN to use. -.B -.IP "\-n NAME, \-\-name=NAME" -Specifies the name of the account holder. -.B -.IP "\-m MASTERKEYFILE, \-\-master=MASTERKEYFILE" -Specifies the name of the file containing the exchange's master key. -.B -.IP "\-o FILENAME, \-\-output=FILENAME" -Where to write the SEPA_RESPONSE_FILE. -.B -.IP "\-h, \-\-help" -Print short help on options. -.B -.IP "\-v, \-\-version" -Print version information. - -.SH BUGS -Report bugs by using Mantis or by sending electronic mail to - -.SH "SEE ALSO" -\fBtaler\-exchange\-httpd\fP(1), \fBtaler.conf\fP(5) diff --git a/doc/taler-exchange-wire.1 b/doc/taler-exchange-wire.1 new file mode 100644 index 000000000..546d8eb74 --- /dev/null +++ b/doc/taler-exchange-wire.1 @@ -0,0 +1,38 @@ +.TH TALER\-EXCHANGE\-WIRE 1 "Apr 2, 2016" "GNU Taler" + +.SH NAME +taler\-exchange\-wire \- Create the master-key signed responses to /wire. + +.SH SYNOPSIS +.B taler\-exchange\-wire +.RI [ options ] +.br + +.SH DESCRIPTION +\fBtaler\-exchange\-wire\fP is used to create the exchange's reply to a /wire request. It converts the bank details into the appropriate signed response. This needs to be done using the long-term offline master key. + +.SH OPTIONS +.B +.IP "\-j JSON, \-\-json=JSON" +Gives JSON with all of the relevant account details in a method-specific format. +.B +.IP "\-t METHOD, \-\-type=METHOD" +Specifies the wire transfer method to use. Common are 'test' and 'sepa'. +.B +.IP "\-m MASTERKEYFILE, \-\-master=MASTERKEYFILE" +Specifies the name of the file containing the exchange's master key. +.B +.IP "\-o FILENAME, \-\-output=FILENAME" +Where to write the SEPA_RESPONSE_FILE. +.B +.IP "\-h, \-\-help" +Print short help on options. +.B +.IP "\-v, \-\-version" +Print version information. + +.SH BUGS +Report bugs by using Mantis or by sending electronic mail to + +.SH "SEE ALSO" +\fBtaler\-exchange\-httpd\fP(1), \fBtaler.conf\fP(5) diff --git a/src/exchange-tools/Makefile.am b/src/exchange-tools/Makefile.am index fda9cefa3..feb3c314f 100644 --- a/src/exchange-tools/Makefile.am +++ b/src/exchange-tools/Makefile.am @@ -11,7 +11,7 @@ bin_PROGRAMS = \ taler-exchange-keyup \ taler-exchange-keycheck \ taler-exchange-reservemod \ - taler-exchange-sepa \ + taler-exchange-wire \ taler-exchange-dbinit taler_exchange_keyup_SOURCES = \ @@ -33,15 +33,15 @@ taler_auditor_sign_LDADD = \ -lgnunetutil $(XLIB) -taler_exchange_sepa_SOURCES = \ - taler-exchange-sepa.c -taler_exchange_sepa_LDADD = \ +taler_exchange_wire_SOURCES = \ + taler-exchange-wire.c +taler_exchange_wire_LDADD = \ $(LIBGCRYPT_LIBS) \ $(top_builddir)/src/util/libtalerutil.la \ -lgnunetjson \ -lgnunetutil \ -ljansson $(XLIB) -taler_exchange_sepa_LDFLAGS = $(POSTGRESQL_LDFLAGS) +taler_exchange_wire_LDFLAGS = $(POSTGRESQL_LDFLAGS) taler_exchange_keycheck_SOURCES = \ taler-exchange-keycheck.c diff --git a/src/exchange-tools/taler-exchange-sepa.c b/src/exchange-tools/taler-exchange-sepa.c deleted file mode 100644 index 1bfb49132..000000000 --- a/src/exchange-tools/taler-exchange-sepa.c +++ /dev/null @@ -1,189 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2015 GNUnet e.V. - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - TALER; see the file COPYING. If not, If not, see -*/ -/** - * @file taler-exchange-sepa.c - * @brief Create signed response for /wire/sepa requests. - * @author Christian Grothoff - */ -#include -#include -#include -#include "taler_crypto_lib.h" -#include "taler_signatures.h" - - -/** - * Filename of the master private key. - */ -static char *masterkeyfile; - -/** - * Account holder name. - */ -static char *sepa_name; - -/** - * Account holder address. - */ -static char *sepa_address; - -/** - * IBAN number. - */ -static char *iban; - -/** - * BIC number. - */ -static char *bic; - -/** - * Where to write the result. - */ -static char *output_filename; - - -/** - * The main function of the taler-exchange-sepa tool. This tool is used - * to sign the SEPA bank account details using the master key. - * - * @param argc number of arguments from the command line - * @param argv command line arguments - * @return 0 ok, 1 on error - */ -int -main (int argc, - char *const *argv) -{ - static const struct GNUNET_GETOPT_CommandLineOption options[] = { - {'a', "address", "ADDRESS", - "account holder address", 1, - &GNUNET_GETOPT_set_string, &sepa_address}, - {'b', "bic", "BICCODE", - "bank BIC code", 1, - &GNUNET_GETOPT_set_string, &bic}, - {'i', "iban", "IBAN", - "IBAN number of the account", 1, - &GNUNET_GETOPT_set_string, &iban}, - {'m', "master-key", "FILE", - "master key file (private key)", 1, - &GNUNET_GETOPT_set_filename, &masterkeyfile}, - {'n', "name", "NAME", - "name of the account holder", 1, - &GNUNET_GETOPT_set_string, &sepa_name}, - {'o', "output", "FILE", - "where to write the result", 1, - &GNUNET_GETOPT_set_filename, &output_filename}, - TALER_GETOPT_OPTION_HELP ("Setup /wire/sepa response"), - GNUNET_GETOPT_OPTION_VERSION (VERSION "-" VCS_VERSION), - GNUNET_GETOPT_OPTION_END - }; - struct GNUNET_CRYPTO_EddsaPrivateKey *eddsa_priv; - struct TALER_MasterWireSepaDetailsPS wsd; - struct TALER_MasterSignatureP sig; - struct GNUNET_HashContext *hc; - json_t *reply; - char *json_str; - struct GNUNET_HashCode salt; - - GNUNET_assert (GNUNET_OK == - GNUNET_log_setup ("taler-exchange-sepa", - "WARNING", - NULL)); - - if (GNUNET_GETOPT_run ("taler-exchange-sepa", - options, - argc, argv) < 0) - return 1; - if (NULL == masterkeyfile) - { - fprintf (stderr, - "Master key file not given\n"); - return 1; - } - eddsa_priv = GNUNET_CRYPTO_eddsa_key_create_from_file (masterkeyfile); - if (NULL == eddsa_priv) - { - fprintf (stderr, - "Failed to initialize master key from file `%s'\n", - masterkeyfile); - return 1; - } - if ( (NULL == sepa_address) || - (NULL == iban) || - (NULL == sepa_name) || - (NULL == bic) ) - { - fprintf (stderr, - "Required arguments missing\n"); - return 1; - } - - /* Compute message to sign */ - GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE, - &salt, - sizeof (salt)); - hc = GNUNET_CRYPTO_hash_context_start (); - GNUNET_CRYPTO_hash_context_read (hc, - sepa_name, - strlen (sepa_name) + 1); - GNUNET_CRYPTO_hash_context_read (hc, - iban, - strlen (iban) + 1); - GNUNET_CRYPTO_hash_context_read (hc, - bic, - strlen (bic) + 1); - wsd.purpose.size = htonl (sizeof (wsd)); - wsd.purpose.purpose = htonl (TALER_SIGNATURE_MASTER_SEPA_DETAILS); - GNUNET_CRYPTO_hash_context_finish (hc, - &wsd.h_sepa_details); - GNUNET_CRYPTO_eddsa_sign (eddsa_priv, - &wsd.purpose, - &sig.eddsa_signature); - GNUNET_free (eddsa_priv); - - /* build JSON message */ - reply = json_pack ("{s:s, s:s, s:s, s:s, s:s, s:o, s:o}", - "type", "sepa", - "address", sepa_address, - "receiver_name", sepa_name, - "iban", iban, - "bic", bic, - "salt", GNUNET_JSON_from_data (&salt, - sizeof (salt)), - "sig", GNUNET_JSON_from_data (&sig, - sizeof (sig))); - GNUNET_assert (NULL != reply); - - /* dump result to stdout */ - json_str = json_dumps (reply, JSON_INDENT(2)); - GNUNET_assert (NULL != json_str); - - if (NULL != output_filename) - { - fclose (stdout); - stdout = fopen (output_filename, - "w+"); - } - fprintf (stdout, - "%s", - json_str); - fflush (stdout); - free (json_str); - return 0; -} - -/* end of taler-exchange-sepa.c */ diff --git a/src/exchange-tools/taler-exchange-wire.c b/src/exchange-tools/taler-exchange-wire.c new file mode 100644 index 000000000..3bea78f67 --- /dev/null +++ b/src/exchange-tools/taler-exchange-wire.c @@ -0,0 +1,201 @@ +/* + This file is part of TALER + Copyright (C) 2015, 2016 Inria + + TALER is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + TALER; see the file COPYING. If not, If not, see +*/ +/** + * @file taler-exchange-wire.c + * @brief Create signed response for /wire requests. + * @author Christian Grothoff + */ +#include +#include +#include +#include "taler_crypto_lib.h" +#include "taler_wire_plugin.h" +#include "taler_signatures.h" + + +/** + * Filename of the master private key. + */ +static char *masterkeyfile; + +/** + * Account holder information in JSON format. + */ +static char *json_in; + +/** + * Which wire method is this for? + */ +static char *method; + +/** + * Where to write the result. + */ +static char *output_filename; + + +/** + * The main function of the taler-exchange-sepa tool. This tool is used + * to sign the SEPA bank account details using the master key. + * + * @param argc number of arguments from the command line + * @param argv command line arguments + * @return 0 ok, 1 on error + */ +int +main (int argc, + char *const *argv) +{ + static const struct GNUNET_GETOPT_CommandLineOption options[] = { + {'j', "json", "JSON", + "account information in JSON format", 1, + &GNUNET_GETOPT_set_string, &json_in}, + {'m', "master-key", "FILE", + "master key file (private key)", 1, + &GNUNET_GETOPT_set_filename, &masterkeyfile}, + {'t', "type", "METHOD", + "which wire transfer method (i.e. 'test' or 'sepa') is this for?", 1, + &GNUNET_GETOPT_set_filename, &method}, + {'o', "output", "FILE", + "where to write the result", 1, + &GNUNET_GETOPT_set_filename, &output_filename}, + TALER_GETOPT_OPTION_HELP ("Setup /wire response"), + GNUNET_GETOPT_OPTION_VERSION (VERSION "-" VCS_VERSION), + GNUNET_GETOPT_OPTION_END + }; + struct GNUNET_CRYPTO_EddsaPrivateKey *eddsa_priv; + struct TALER_MasterPrivateKeyP key; + struct TALER_MasterSignatureP sig; + json_t *j; + json_error_t err; + char *json_out; + struct GNUNET_HashCode salt; + char *lib_name; + struct TALER_WIRE_Plugin *plugin; + + GNUNET_assert (GNUNET_OK == + GNUNET_log_setup ("taler-exchange-wire", + "WARNING", + NULL)); + + if (GNUNET_GETOPT_run ("taler-exchange-wire", + options, + argc, argv) < 0) + return 1; + if (NULL == masterkeyfile) + { + fprintf (stderr, + "Master key file not given\n"); + return 1; + } + eddsa_priv = GNUNET_CRYPTO_eddsa_key_create_from_file (masterkeyfile); + if (NULL == eddsa_priv) + { + fprintf (stderr, + "Failed to initialize master key from file `%s'\n", + masterkeyfile); + return 1; + } + if (NULL == json_in) + { + fprintf (stderr, + "Required -j argument missing\n"); + return 1; + } + if (NULL == method) + { + fprintf (stderr, + "Required -t argument missing\n"); + return 1; + } + j = json_loads (json_in, + JSON_REJECT_DUPLICATES, + &err); + if (NULL == j) + { + fprintf (stderr, + "Failed to parse JSON: %s (at offset %u)\n", + err.text, + (unsigned int) err.position); + return 1; + } + key.eddsa_priv = *eddsa_priv; + GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE, + &salt, + sizeof (salt)); + (void) GNUNET_asprintf (&lib_name, + "libtaler_plugin_wire_%s", + method); + plugin = GNUNET_PLUGIN_load (lib_name, + NULL); + if (NULL == plugin) + { + GNUNET_free (lib_name); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Wire transfer method `%s' not supported\n", + method); + return 1; + } + plugin->library_name = lib_name; + if (GNUNET_OK != + plugin->sign_wire_details (plugin->cls, + j, + &key, + &salt, + &sig)) + { + /* sign function should have logged applicable errors */ + json_decref (j); + GNUNET_PLUGIN_unload (lib_name, + plugin); + GNUNET_free (lib_name); + return 1; + } + GNUNET_PLUGIN_unload (lib_name, + plugin); + GNUNET_free (lib_name); + GNUNET_free (eddsa_priv); + + /* add signature and salt to JSON message */ + json_object_set_new (j, + "salt", + GNUNET_JSON_from_data (&salt, + sizeof (salt))); + json_object_set_new (j, + "sig", + GNUNET_JSON_from_data (&sig, + sizeof (sig))); + + /* dump result to stdout */ + json_out = json_dumps (j, JSON_INDENT(2)); + json_decref (j); + GNUNET_assert (NULL != json_out); + + if (NULL != output_filename) + { + fclose (stdout); + stdout = fopen (output_filename, + "w+"); + } + fprintf (stdout, + "%s", + json_out); + fflush (stdout); + free (json_out); + return 0; +} + +/* end of taler-exchange-wire.c */ diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h index 23bdaa578..587cdcee5 100644 --- a/src/include/taler_signatures.h +++ b/src/include/taler_signatures.h @@ -69,10 +69,16 @@ /** * Signature where the Exchange confirms its SEPA details in - * the /wire/sepa response. + * the /wire response. */ #define TALER_SIGNATURE_MASTER_SEPA_DETAILS 1026 +/** + * Signature where the Exchange confirms its TEST details in + * the /wire response. + */ +#define TALER_SIGNATURE_MASTER_TEST_DETAILS 1027 + /*********************************************/ /* Exchange online signatures (with signing key) */ @@ -762,11 +768,12 @@ struct TALER_RefreshCommitLinkP * @brief Information signed by the exchange's master * key affirming the SEPA details for the exchange. */ -struct TALER_MasterWireSepaDetailsPS +struct TALER_MasterWireDetailsPS { /** - * Purpose is #TALER_SIGNATURE_MASTER_SEPA_DETAILS. + * Purpose is #TALER_SIGNATURE_MASTER_SEPA_DETAILS or + * #TALER_SIGNATURE_MASTER_TEST_DETAILS. */ struct GNUNET_CRYPTO_EccSignaturePurpose purpose; diff --git a/src/include/taler_wire_plugin.h b/src/include/taler_wire_plugin.h index e166558a7..9b2bc8fde 100644 --- a/src/include/taler_wire_plugin.h +++ b/src/include/taler_wire_plugin.h @@ -113,6 +113,24 @@ struct TALER_WIRE_Plugin const char *account_name); + /** + * Sign wire transfer details in the plugin-specific format. + * + * @param cls closure + * @param in wire transfer details in JSON format + * @param key private signing key to use + * @param salt salt to add + * @param[out] sig where to write the signature + * @return #GNUNET_OK on success + */ + int + (*sign_wire_details)(void *cls, + const json_t *in, + const struct TALER_MasterPrivateKeyP *key, + const struct GNUNET_HashCode *salt, + struct TALER_MasterSignatureP *sig); + + /** * Check if the given wire format JSON object is correctly formatted * diff --git a/src/wire/plugin_wire_sepa.c b/src/wire/plugin_wire_sepa.c index 995436725..466e450be 100644 --- a/src/wire/plugin_wire_sepa.c +++ b/src/wire/plugin_wire_sepa.c @@ -351,6 +351,42 @@ validate_iban (const char *iban) } +/** + * Compute purpose for signing. + * + * @param sepa_name name of the account holder + * @param iban bank account number in IBAN format + * @param bic bank identifier + * @param[out] mp purpose to be signed + */ +static void +compute_purpose (const char *sepa_name, + const char *iban, + const char *bic, + struct TALER_MasterWireDetailsPS *wsd) +{ + struct GNUNET_HashContext *hc; + + wsd->purpose.size = htonl (sizeof (struct TALER_MasterWireDetailsPS)); + wsd->purpose.purpose = htonl (TALER_SIGNATURE_MASTER_SEPA_DETAILS); + hc = GNUNET_CRYPTO_hash_context_start (); + GNUNET_CRYPTO_hash_context_read (hc, + "sepa", + strlen ("sepa") + 1); + GNUNET_CRYPTO_hash_context_read (hc, + sepa_name, + strlen (sepa_name) + 1); + GNUNET_CRYPTO_hash_context_read (hc, + iban, + strlen (iban) + 1); + GNUNET_CRYPTO_hash_context_read (hc, + bic, + strlen (bic) + 1); + GNUNET_CRYPTO_hash_context_finish (hc, + &wsd->h_sepa_details); +} + + /** * Verify that the signature in the @a json for /wire/sepa is valid. * @@ -365,14 +401,13 @@ verify_wire_sepa_signature_ok (const json_t *json, const struct TALER_MasterPublicKeyP *master_pub) { struct TALER_MasterSignatureP exchange_sig; - struct TALER_MasterWireSepaDetailsPS mp; - const char *receiver_name; + struct TALER_MasterWireDetailsPS mp; + const char *name; const char *iban; const char *bic; - struct GNUNET_HashContext *hc; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_fixed_auto ("sig", &exchange_sig), - GNUNET_JSON_spec_string ("receiver_name", &receiver_name), + GNUNET_JSON_spec_string ("name", &name), GNUNET_JSON_spec_string ("iban", &iban), GNUNET_JSON_spec_string ("bic", &bic), GNUNET_JSON_spec_end() @@ -391,22 +426,10 @@ verify_wire_sepa_signature_ok (const json_t *json, GNUNET_break_op (0); return GNUNET_SYSERR; } - - mp.purpose.purpose = htonl (TALER_SIGNATURE_MASTER_SEPA_DETAILS); - mp.purpose.size = htonl (sizeof (struct TALER_MasterWireSepaDetailsPS)); - hc = GNUNET_CRYPTO_hash_context_start (); - GNUNET_CRYPTO_hash_context_read (hc, - receiver_name, - strlen (receiver_name) + 1); - GNUNET_CRYPTO_hash_context_read (hc, - iban, - strlen (iban) + 1); - GNUNET_CRYPTO_hash_context_read (hc, - bic, - strlen (bic) + 1); - GNUNET_CRYPTO_hash_context_finish (hc, - &mp.h_sepa_details); - + compute_purpose (name, + iban, + bic, + &mp); if (GNUNET_OK != GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MASTER_SEPA_DETAILS, &mp.purpose, @@ -447,12 +470,12 @@ sepa_wire_validate (void *cls, "{" "s:s," /* type: sepa */ "s:s," /* iban: IBAN */ - "s:s," /* receiver_name: beneficiary name */ + "s:s," /* name: beneficiary name */ "s:s" /* bic: beneficiary bank's BIC */ "}", "type", &type, "iban", &iban, - "receiver_name", &name, + "name", &name, "bic", &bic)) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, @@ -548,6 +571,70 @@ sepa_get_wire_details (void *cls, } +/** + * Sign wire transfer details in the plugin-specific format. + * + * @param cls closure + * @param in wire transfer details in JSON format + * @param key private signing key to use + * @param salt salt to add + * @param[out] sig where to write the signature + * @return #GNUNET_OK on success + */ +static int +sepa_sign_wire_details (void *cls, + const json_t *in, + const struct TALER_MasterPrivateKeyP *key, + const struct GNUNET_HashCode *salt, + struct TALER_MasterSignatureP *sig) +{ + struct TALER_MasterWireDetailsPS wsd; + const char *sepa_name; + const char *iban; + const char *bic; + const char *type; + json_error_t err; + + if (0 != + json_unpack_ex ((json_t *) in, + &err, + 0 /* flags */, + "{s:s, s:s, s:s, s:s}", + "type", &type, + "name", &sepa_name, + "iban", &iban, + "bic", &bic)) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Failed to unpack JSON: %s (at %u)\n", + err.text, + err.position); + return GNUNET_SYSERR; + } + if (0 != strcmp (type, + "sepa")) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "`type' must be `sepa' for SEPA wire details\n"); + return GNUNET_SYSERR; + } + if (1 != validate_iban (iban)) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "IBAN invalid in SEPA wire details\n"); + return GNUNET_SYSERR; + } + compute_purpose (sepa_name, + iban, + bic, + &wsd); + GNUNET_CRYPTO_eddsa_sign (&key->eddsa_priv, + &wsd.purpose, + &sig->eddsa_signature); + return GNUNET_OK; +} + + /** * Prepare for exeuction of a wire transfer. * @@ -662,6 +749,7 @@ libtaler_plugin_wire_sepa_init (void *cls) plugin->cls = sc; plugin->amount_round = &sepa_amount_round; plugin->get_wire_details = &sepa_get_wire_details; + plugin->sign_wire_details = &sepa_sign_wire_details; plugin->wire_validate = &sepa_wire_validate; plugin->prepare_wire_transfer = &sepa_prepare_wire_transfer; plugin->prepare_wire_transfer_cancel = &sepa_prepare_wire_transfer_cancel; diff --git a/src/wire/plugin_wire_template.c b/src/wire/plugin_wire_template.c index fd6fbfbe9..46908c297 100644 --- a/src/wire/plugin_wire_template.c +++ b/src/wire/plugin_wire_template.c @@ -171,6 +171,28 @@ template_execute_wire_transfer (void *cls, } +/** + * Sign wire transfer details in the plugin-specific format. + * + * @param cls closure + * @param in wire transfer details in JSON format + * @param key private signing key to use + * @param salt salt to add + * @param[out] sig where to write the signature + * @return #GNUNET_OK on success + */ +static int +template_sign_wire_details (void *cls, + const json_t *in, + const struct TALER_MasterPrivateKeyP *key, + const struct GNUNET_HashCode *salt, + struct TALER_MasterSignatureP *sig) +{ + GNUNET_break (0); + return GNUNET_SYSERR; +} + + /** * Abort execution of a wire transfer. For example, because we are * shutting down. Note that if an execution is aborted, it may or @@ -236,6 +258,7 @@ libtaler_plugin_wire_template_init (void *cls) plugin->cls = tc; plugin->amount_round = &template_amount_round; plugin->get_wire_details = &template_get_wire_details; + plugin->sign_wire_details = &template_sign_wire_details; plugin->wire_validate = &template_wire_validate; plugin->prepare_wire_transfer = &template_prepare_wire_transfer; plugin->prepare_wire_transfer_cancel = &template_prepare_wire_transfer_cancel; diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c index 304380721..8c03d155e 100644 --- a/src/wire/plugin_wire_test.c +++ b/src/wire/plugin_wire_test.c @@ -22,6 +22,7 @@ #include "platform.h" #include "taler_wire_plugin.h" #include "taler_bank_service.h" +#include "taler_signatures.h" /* only for HTTP status codes */ #include @@ -285,6 +286,38 @@ test_get_wire_details (void *cls, } +/** + * Compute purpose for signing. + * + * @param account number of the account + * @param bank_uri URI of the bank + * @param[out] mp purpose to be signed + */ +static void +compute_purpose (uint64_t account, + const char *bank_uri, + struct TALER_MasterWireDetailsPS *wsd) +{ + struct GNUNET_HashContext *hc; + uint64_t n = GNUNET_htonll (account); + + wsd->purpose.size = htonl (sizeof (struct TALER_MasterWireDetailsPS)); + wsd->purpose.purpose = htonl (TALER_SIGNATURE_MASTER_TEST_DETAILS); + hc = GNUNET_CRYPTO_hash_context_start (); + GNUNET_CRYPTO_hash_context_read (hc, + "test", + strlen ("test") + 1); + GNUNET_CRYPTO_hash_context_read (hc, + &n, + sizeof (n)); + GNUNET_CRYPTO_hash_context_read (hc, + bank_uri, + strlen (bank_uri) + 1); + GNUNET_CRYPTO_hash_context_finish (hc, + &wsd->h_sepa_details); +} + + /** * Check if the given wire format JSON object is correctly formatted. * Right now, the only thing we require is a field @@ -319,6 +352,10 @@ test_wire_validate (void *cls, GNUNET_break (0); return GNUNET_SYSERR; } + /* FIXME: should check signature here in the future! + (note: right now the sig is not properly provided + by the exchange due to the way account data is + specified in the configuration) */ return GNUNET_YES; } @@ -510,6 +547,61 @@ execute_cb (void *cls, } +/** + * Sign wire transfer details in the plugin-specific format. + * + * @param cls closure + * @param in wire transfer details in JSON format + * @param key private signing key to use + * @param salt salt to add + * @param[out] sig where to write the signature + * @return #GNUNET_OK on success + */ +static int +test_sign_wire_details (void *cls, + const json_t *in, + const struct TALER_MasterPrivateKeyP *key, + const struct GNUNET_HashCode *salt, + struct TALER_MasterSignatureP *sig) +{ + struct TALER_MasterWireDetailsPS wsd; + const char *bank_uri; + const char *type; + json_int_t account; + json_error_t err; + + if (0 != + json_unpack_ex ((json_t *) in, + &err, + 0 /* flags */, + "{s:s, s:s, s:I}", + "type", &type, + "bank_uri", &bank_uri, + "account_number", &account)) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Failed to unpack JSON: %s (at %u)\n", + err.text, + err.position); + return GNUNET_SYSERR; + } + if (0 != strcmp (type, + "test")) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "`type' must be `test' for test wire details\n"); + return GNUNET_SYSERR; + } + compute_purpose (account, + bank_uri, + &wsd); + GNUNET_CRYPTO_eddsa_sign (&key->eddsa_priv, + &wsd.purpose, + &sig->eddsa_signature); + return GNUNET_OK; +} + + /** * Execute a wire transfer. * @@ -682,6 +774,7 @@ libtaler_plugin_wire_test_init (void *cls) plugin->cls = tc; plugin->amount_round = &test_amount_round; plugin->get_wire_details = &test_get_wire_details; + plugin->sign_wire_details = &test_sign_wire_details; plugin->wire_validate = &test_wire_validate; plugin->prepare_wire_transfer = &test_prepare_wire_transfer; plugin->prepare_wire_transfer_cancel = &test_prepare_wire_transfer_cancel; From 1dea7998db7e2d8aeb4f60faceb07849f0855979 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 3 Apr 2016 21:08:24 +0200 Subject: [PATCH 49/91] fix json generation, use proper json in test --- src/exchange-lib/test-exchange-home/sepa.json | 10 +++++----- src/exchange-tools/taler-exchange-wire.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/exchange-lib/test-exchange-home/sepa.json b/src/exchange-lib/test-exchange-home/sepa.json index 92ca25566..b435ce86b 100644 --- a/src/exchange-lib/test-exchange-home/sepa.json +++ b/src/exchange-lib/test-exchange-home/sepa.json @@ -1,9 +1,9 @@ { - "type": "sepa", + "name": "Max Musterman", "bic": "COBADEFF370", + "type": "sepa", + "sig": "4EVRC2MCJPXQC8MC00831DNWEXMZAP4JQDDE1A7R6KR3MANG24RC1VQ55AX5A2E35S58VW1VSTENFTPHG5MWG9BSN8B8WXSV21KKW20", "address": "Musterstadt", - "iban": "DE89370400440532013000", - "receiver_name": "Max Musterman", - "salt": "J5AP2BJ8MQAM1WQYQ9YPTAHZVTDXCT3RKHX851S5Q2A42T11K796MNMKJ78VBGDKCFMETMBDPM35D81NCCN77YRW92GDFSQ6P4CZ720", - "sig": "FF4JZ1FPNVEFPM6ZXD3QN1M225T9X912PX1GJDWGGJX6KBSTR2EZHK24E1PYW7P64YGGQG7Q9HJW0XE36HBBYZWXW83PKVZEYNVG038" + "salt": "3KTM1ZRMWGEQPQ254S4R5R4Q8XM0ZYWTCTE01TZ76MVBSQ6RX7A5DR08WXVH1DCHR1R7ACRB7X0EVC2XDW1CBZM9WFSD9TRMZ90BR98", + "iban": "DE89370400440532013000" } \ No newline at end of file diff --git a/src/exchange-tools/taler-exchange-wire.c b/src/exchange-tools/taler-exchange-wire.c index 3bea78f67..22721a424 100644 --- a/src/exchange-tools/taler-exchange-wire.c +++ b/src/exchange-tools/taler-exchange-wire.c @@ -68,7 +68,7 @@ main (int argc, &GNUNET_GETOPT_set_filename, &masterkeyfile}, {'t', "type", "METHOD", "which wire transfer method (i.e. 'test' or 'sepa') is this for?", 1, - &GNUNET_GETOPT_set_filename, &method}, + &GNUNET_GETOPT_set_string, &method}, {'o', "output", "FILE", "where to write the result", 1, &GNUNET_GETOPT_set_filename, &output_filename}, From 08e9c295706048bf5aa502e581c5c54bec48ff5f Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 3 Apr 2016 21:10:10 +0200 Subject: [PATCH 50/91] Fix testcase to match latest spec without receiver_ --- src/wire/test_sepa_wireformat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wire/test_sepa_wireformat.c b/src/wire/test_sepa_wireformat.c index f016cf635..cd31a971c 100644 --- a/src/wire/test_sepa_wireformat.c +++ b/src/wire/test_sepa_wireformat.c @@ -29,7 +29,7 @@ static const char * const valid_wire_str = "{ \"type\":\"SEPA\", \ \"iban\":\"DE67830654080004822650\", \ -\"receiver_name\":\"GNUnet e.V.\", \ +\"name\":\"GNUnet e.V.\", \ \"bic\":\"GENODEF1SLR\", \ \"salt\":\"123456789\", \ \"address\": \"foobar\"}"; @@ -38,7 +38,7 @@ static const char * const valid_wire_str = static const char * const invalid_wire_str = "{ \"type\":\"SEPA\", \ \"iban\":\"XX67830654080004822650\", \ -\"receiver_name\":\"GNUnet e.V.\", \ +\"name\":\"GNUnet e.V.\", \ \"bic\":\"GENODEF1SLR\", \ \"salt\":\"123456789\", \ \"address\": \"foobar\"}"; @@ -47,7 +47,7 @@ static const char * const invalid_wire_str = static const char * const invalid_wire_str2 = "{ \"type\":\"SEPA\", \ \"iban\":\"DE67830654080004822651\", \ -\"receiver_name\":\"GNUnet e.V.\", \ +\"name\":\"GNUnet e.V.\", \ \"bic\":\"GENODEF1SLR\", \ \"salt\":\"123456789\", \ \"address\": \"foobar\"}"; @@ -56,7 +56,7 @@ static const char * const invalid_wire_str2 = static const char * const unsupported_wire_str = "{ \"type\":\"unsupported\", \ \"iban\":\"DE67830654080004822650\", \ -\"receiver_name\":\"GNUnet e.V.\", \ +\"name\":\"GNUnet e.V.\", \ \"bic\":\"GENODEF1SLR\", \ \"salt\":\"123456789\", \ \"address\": \"foobar\"}"; From 9909a04d5bdbe7718dadc022ab27af64e7286e29 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 3 Apr 2016 21:41:26 +0200 Subject: [PATCH 51/91] use new PQ_query_param_string function to fix 0-termination bug, also terminate idle aggregator in test mode --- src/exchange/taler-exchange-aggregator.c | 16 ++++++++++++---- src/exchangedb/plugin_exchangedb_postgres.c | 4 ++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c index e293a23cd..2d5fd71d8 100644 --- a/src/exchange/taler-exchange-aggregator.c +++ b/src/exchange/taler-exchange-aggregator.c @@ -482,10 +482,18 @@ run_aggregation (void *cls, *global_ret = GNUNET_SYSERR; return; } - /* nothing to do, sleep for a minute and try again */ - task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, - &run_aggregation, - global_ret); + if (GNUNET_YES == test_mode) + { + /* in test mode, shutdown if we end up being idle */ + GNUNET_SCHEDULER_shutdown (); + } + else + { + /* nothing to do, sleep for a minute and try again */ + task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, + &run_aggregation, + global_ret); + } return; } /* Now try to find other deposits to aggregate */ diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index bcd6b9a0c..b59acaead 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -4056,7 +4056,7 @@ postgres_wire_prepare_data_insert (void *cls, { PGresult *result; struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_fixed_size (type, strlen (type) + 1), + GNUNET_PQ_query_param_string (type), GNUNET_PQ_query_param_fixed_size (buf, buf_size), GNUNET_PQ_query_param_end }; @@ -4132,7 +4132,7 @@ postgres_wire_prepare_data_get (void *cls, { PGresult *result; struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_fixed_size (type, strlen (type) + 1), + GNUNET_PQ_query_param_string (type), GNUNET_PQ_query_param_end }; From 740143364430986be8d9fe7a9079781975c530d3 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 4 Apr 2016 14:04:44 +0200 Subject: [PATCH 52/91] make use of r36977/78 API improvement in GNUnet --- src/exchange/taler-exchange-httpd.c | 2 +- src/exchange/taler-exchange-httpd_parsing.c | 200 ++------- src/exchange/test_taler_exchange_aggregator.c | 385 ++++++++++++++++-- 3 files changed, 387 insertions(+), 200 deletions(-) diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index 2ef58b0f7..93636b00c 100644 --- a/src/exchange/taler-exchange-httpd.c +++ b/src/exchange/taler-exchange-httpd.c @@ -121,7 +121,7 @@ handle_mhd_completion_callback (void *cls, /** - * Handle a request coming from libmicrohttpd. + * Handle incoming HTTP request. * * @param cls closure for MHD daemon (unused) * @param connection the connection diff --git a/src/exchange/taler-exchange-httpd_parsing.c b/src/exchange/taler-exchange-httpd_parsing.c index f6e367813..beac81a1c 100644 --- a/src/exchange/taler-exchange-httpd_parsing.c +++ b/src/exchange/taler-exchange-httpd_parsing.c @@ -24,122 +24,18 @@ #include "platform.h" #include +#include #include "taler_json_lib.h" #include "taler-exchange-httpd_parsing.h" #include "taler-exchange-httpd_responses.h" -/** - * Initial size for POST request buffer. - */ -#define REQUEST_BUFFER_INITIAL (2*1024) - /** * Maximum POST request size. */ #define REQUEST_BUFFER_MAX (1024*1024) -/** - * Buffer for POST requests. - */ -struct Buffer -{ - /** - * Allocated memory - */ - char *data; - - /** - * Number of valid bytes in buffer. - */ - size_t fill; - - /** - * Number of allocated bytes in buffer. - */ - size_t alloc; -}; - - -/** - * Initialize a buffer. - * - * @param buf the buffer to initialize - * @param data the initial data - * @param data_size size of the initial data - * @param alloc_size size of the buffer - * @param max_size maximum size that the buffer can grow to - * @return a GNUnet result code - */ -static int -buffer_init (struct Buffer *buf, - const void *data, - size_t data_size, - size_t alloc_size, - size_t max_size) -{ - if (data_size > max_size || alloc_size > max_size) - return GNUNET_SYSERR; - if (data_size > alloc_size) - alloc_size = data_size; - buf->data = GNUNET_malloc (alloc_size); - memcpy (buf->data, data, data_size); - return GNUNET_OK; -} - - -/** - * Free the data in a buffer. Does *not* free - * the buffer object itself. - * - * @param buf buffer to de-initialize - */ -static void -buffer_deinit (struct Buffer *buf) -{ - GNUNET_free (buf->data); - buf->data = NULL; -} - - -/** - * Append data to a buffer, growing the buffer if necessary. - * - * @param buf the buffer to append to - * @param data the data to append - * @param data_size the size of @a data - * @param max_size maximum size that the buffer can grow to - * @return #GNUNET_OK on success, - * #GNUNET_NO if the buffer can't accomodate for the new data - */ -static int -buffer_append (struct Buffer *buf, - const void *data, - size_t data_size, - size_t max_size) -{ - if (buf->fill + data_size > max_size) - return GNUNET_NO; - if (data_size + buf->fill > buf->alloc) - { - char *new_buf; - size_t new_size = buf->alloc; - while (new_size < buf->fill + data_size) - new_size += 2; - if (new_size > max_size) - return GNUNET_NO; - new_buf = GNUNET_malloc (new_size); - memcpy (new_buf, buf->data, buf->fill); - GNUNET_free (buf->data); - buf->data = new_buf; - buf->alloc = new_size; - } - memcpy (buf->data + buf->fill, data, data_size); - buf->fill += data_size; - return GNUNET_OK; -} - /** * Process a POST request containing a JSON object. This function @@ -171,75 +67,37 @@ TMH_PARSE_post_json (struct MHD_Connection *connection, size_t *upload_data_size, json_t **json) { - struct Buffer *r = *con_cls; + enum GNUNET_JSON_PostResult pr; - *json = NULL; - if (NULL == *con_cls) + pr = GNUNET_JSON_post_parser (REQUEST_BUFFER_MAX, + con_cls, + upload_data, + upload_data_size, + json); + switch (pr) { - /* We are seeing a fresh POST request. */ - r = GNUNET_new (struct Buffer); - if (GNUNET_OK != - buffer_init (r, - upload_data, - *upload_data_size, - REQUEST_BUFFER_INITIAL, - REQUEST_BUFFER_MAX)) - { - *con_cls = NULL; - buffer_deinit (r); - GNUNET_free (r); - return (MHD_NO == - TMH_RESPONSE_reply_internal_error (connection, - "out of memory")) - ? GNUNET_SYSERR : GNUNET_NO; - } - /* everything OK, wait for more POST data */ - *upload_data_size = 0; - *con_cls = r; + case GNUNET_JSON_PR_OUT_OF_MEMORY: + return (MHD_NO == + TMH_RESPONSE_reply_internal_error (connection, + "out of memory")) + ? GNUNET_SYSERR : GNUNET_NO; + case GNUNET_JSON_PR_CONTINUE: return GNUNET_YES; - } - if (0 != *upload_data_size) - { - /* We are seeing an old request with more data available. */ - - if (GNUNET_OK != - buffer_append (r, - upload_data, - *upload_data_size, - REQUEST_BUFFER_MAX)) - { - /* Request too long */ - *con_cls = NULL; - buffer_deinit (r); - GNUNET_free (r); - return (MHD_NO == - TMH_RESPONSE_reply_request_too_large (connection)) - ? GNUNET_SYSERR : GNUNET_NO; - } - /* everything OK, wait for more POST data */ - *upload_data_size = 0; - return GNUNET_YES; - } - - /* We have seen the whole request. */ - - *json = json_loadb (r->data, - r->fill, - 0, - NULL); - if (NULL == *json) - { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Failed to parse JSON request body\n"); + case GNUNET_JSON_PR_REQUEST_TOO_LARGE: + return (MHD_NO == + TMH_RESPONSE_reply_request_too_large (connection)) + ? GNUNET_SYSERR : GNUNET_NO; + case GNUNET_JSON_PR_JSON_INVALID: return (MHD_YES == TMH_RESPONSE_reply_invalid_json (connection)) ? GNUNET_NO : GNUNET_SYSERR; + case GNUNET_JSON_PR_SUCCESS: + GNUNET_break (NULL != *json); + return GNUNET_YES; } - buffer_deinit (r); - GNUNET_free (r); - *con_cls = NULL; - - return GNUNET_YES; + /* this should never happen */ + GNUNET_break (0); + return GNUNET_SYSERR; } @@ -253,13 +111,7 @@ TMH_PARSE_post_json (struct MHD_Connection *connection, void TMH_PARSE_post_cleanup_callback (void *con_cls) { - struct Buffer *r = con_cls; - - if (NULL != r) - { - buffer_deinit (r); - GNUNET_free (r); - } + GNUNET_JSON_post_parser_cleanup (con_cls); } diff --git a/src/exchange/test_taler_exchange_aggregator.c b/src/exchange/test_taler_exchange_aggregator.c index d4821bbd1..f239461f4 100644 --- a/src/exchange/test_taler_exchange_aggregator.c +++ b/src/exchange/test_taler_exchange_aggregator.c @@ -22,6 +22,71 @@ #include "platform.h" #include "taler_util.h" #include "taler_exchangedb_plugin.h" +#include + +/** + * Commands for the interpreter. + */ +enum OpCode { + + /** + * Terminate testcase with 'skipped' result. + */ + OPCODE_TERMINATE_SKIP, + + /** + * Run taler-exchange-aggregator. + */ + OPCODE_RUN_AGGREGATOR, + + /** + * Finish testcase with success. + */ + OPCODE_TERMINATE_SUCCESS +}; + +/** + * Command state for the interpreter. + */ +struct Command +{ + + enum OpCode opcode; + +}; + + +/** + * State of the interpreter. + */ +struct State +{ + /** + * Array of commands to run. + */ + struct Command* commands; + + /** + * Offset of the next command to be run. + */ + unsigned int ioff; +}; + + +/** + * Pipe used to communicate child death via signal. + */ +static struct GNUNET_DISK_PipeHandle *sigpipe; + +/** + * ID of task called whenever we get a SIGCHILD. + */ +static struct GNUNET_SCHEDULER_Task *child_death_task; + +/** + * ID of task called whenever are shutting down. + */ +static struct GNUNET_SCHEDULER_Task *shutdown_task; /** * Return value from main(). @@ -33,26 +98,257 @@ static int result; */ static char *config_filename; +/** + * Database plugin. + */ +static struct TALER_EXCHANGEDB_Plugin *plugin; /** - * Runs the aggregator process. + * Our session with the database. + */ +static struct TALER_EXCHANGEDB_Session *session; + +/** + * The handle for the aggregator process that we are testing. + */ +static struct GNUNET_OS_Process *aggregator_proc; + +/** + * State of our interpreter while we are running the aggregator + * process. + */ +static struct State *aggregator_state; + +/** + * HTTP server we run to pretend to be the "test" bank. + */ +static struct MHD_Daemon *mhd_bank; + +/** + * Task running HTTP server for the "test" bank. + */ +static struct GNUNET_SCHEDULER_Task *mhd_task; + + +/** + * Interprets the commands from the test program. + * + * @param cls the `struct State` of the interpreter + * @param tc scheduler context */ static void -run_aggregator () -{ - struct GNUNET_OS_Process *proc; +interpreter (void *cls, + const struct GNUNET_SCHEDULER_TaskContext *tc); - proc = GNUNET_OS_start_process (GNUNET_NO, - GNUNET_OS_INHERIT_STD_ALL, - NULL, NULL, NULL, - "taler-exchange-aggregator", - "taler-exchange-aggregator", - /* "-c", config_filename, */ - "-d", "test-exchange-home", - "-t", /* enable temporary tables */ - NULL); - GNUNET_OS_process_wait (proc); - GNUNET_OS_process_destroy (proc); + +/** + * Task triggered whenever we are to shutdown. + * + * @param cls closure, NULL if we need to self-restart + * @param tc context + */ +static void +shutdown_action (void *cls, + const struct GNUNET_SCHEDULER_TaskContext *tc) +{ + shutdown_task = NULL; + if (NULL != mhd_task) + { + GNUNET_SCHEDULER_cancel (mhd_task); + mhd_task = NULL; + } + if (NULL != mhd_bank) + { + MHD_stop_daemon (mhd_bank); + mhd_bank = NULL; + } + if (NULL == aggregator_proc) + { + GNUNET_SCHEDULER_cancel (child_death_task); + child_death_task = NULL; + } + else + { + GNUNET_break (0 == GNUNET_OS_process_kill (aggregator_proc, + SIGKILL)); + } + plugin->drop_temporary (plugin->cls, + session); + TALER_EXCHANGEDB_plugin_unload (plugin); + plugin = NULL; +} + + +/** + * Task triggered whenever we receive a SIGCHLD (child + * process died). + * + * @param cls closure, NULL if we need to self-restart + * @param tc context + */ +static void +maint_child_death (void *cls, + const struct GNUNET_SCHEDULER_TaskContext *tc) +{ + const struct GNUNET_DISK_FileHandle *pr; + char c[16]; + struct State *state; + + child_death_task = NULL; + pr = GNUNET_DISK_pipe_handle (sigpipe, GNUNET_DISK_PIPE_END_READ); + if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) + { + /* shutdown scheduled us, ignore! */ + child_death_task = + GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, + pr, + &maint_child_death, + NULL); + return; + } + GNUNET_break (0 < GNUNET_DISK_file_read (pr, &c, sizeof (c))); + GNUNET_OS_process_wait (aggregator_proc); + GNUNET_OS_process_destroy (aggregator_proc); + aggregator_proc = NULL; + aggregator_state->ioff++; + state = aggregator_state; + aggregator_state = NULL; + interpreter (state, NULL); + if (NULL == shutdown_task) + return; + child_death_task = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, + pr, + &maint_child_death, NULL); + +} + + +/** + * Interprets the commands from the test program. + * + * @param cls the `struct State` of the interpreter + * @param tc scheduler context + */ +static void +interpreter (void *cls, + const struct GNUNET_SCHEDULER_TaskContext *tc) +{ + struct State *state = cls; + struct Command *cmd = &state->commands[state->ioff]; + + switch (cmd->opcode) + { + case OPCODE_TERMINATE_SKIP: + /* return skip: test not finished, but did not fail either */ + result = 77; + GNUNET_SCHEDULER_shutdown (); + return; + case OPCODE_RUN_AGGREGATOR: + GNUNET_assert (NULL == aggregator_state); + aggregator_state = state; + aggregator_proc + = GNUNET_OS_start_process (GNUNET_NO, + GNUNET_OS_INHERIT_STD_ALL, + NULL, NULL, NULL, + "taler-exchange-aggregator", + "taler-exchange-aggregator", + /* "-c", config_filename, */ + "-d", "test-exchange-home", + "-t", /* enable temporary tables */ + NULL); + return; + case OPCODE_TERMINATE_SUCCESS: + result = 0; + GNUNET_SCHEDULER_shutdown (); + return; + } +} + + +/** + * Contains the test program. Here each step of the testcase + * is defined. + */ +static void +run_test () +{ + static struct Command commands[] = { + /* FIXME: prime DB */ + { + .opcode = OPCODE_RUN_AGGREGATOR + }, + { + .opcode = OPCODE_TERMINATE_SKIP + } + }; + static struct State state = { + .commands = commands + }; + + GNUNET_SCHEDULER_add_now (&interpreter, + &state); +} + + +/** + * Function called whenever MHD is done with a request. If the + * request was a POST, we may have stored a `struct Buffer *` in the + * @a con_cls that might still need to be cleaned up. Call the + * respective function to free the memory. + * + * @param cls client-defined closure + * @param connection connection handle + * @param con_cls value as set by the last call to + * the #MHD_AccessHandlerCallback + * @param toe reason for request termination + * @see #MHD_OPTION_NOTIFY_COMPLETED + * @ingroup request + */ +static void +handle_mhd_completion_callback (void *cls, + struct MHD_Connection *connection, + void **con_cls, + enum MHD_RequestTerminationCode toe) +{ + TMH_PARSE_post_cleanup_callback (*con_cls); + *con_cls = NULL; +} + + +/** + * Handle incoming HTTP request. + * + * @param cls closure for MHD daemon (unused) + * @param connection the connection + * @param url the requested url + * @param method the method (POST, GET, ...) + * @param version HTTP version (ignored) + * @param upload_data request data + * @param upload_data_size size of @a upload_data in bytes + * @param con_cls closure for request (a `struct Buffer *`) + * @return MHD result code + */ +static int +handle_mhd_request (void *cls, + struct MHD_Connection *connection, + const char *url, + const char *method, + const char *version, + const char *upload_data, + size_t *upload_data_size, + void **con_cls) +{ + if (0 != strcasecmp (url, + "/admin/add/incoming")) + { + /* Unexpected URI path, just close the connection. */ + /* we're rather impolite here, but it's a testcase. */ + GNUNET_break_op (0); + return MHD_NO; + } + /* FIXME: to be implemented! */ + GNUNET_break (0); + return MHD_NO; } @@ -67,8 +363,6 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { struct GNUNET_CONFIGURATION_Handle *cfg = cls; - struct TALER_EXCHANGEDB_Plugin *plugin; - struct TALER_EXCHANGEDB_Session *session; plugin = TALER_EXCHANGEDB_plugin_load (cfg); if (GNUNET_OK != @@ -81,15 +375,48 @@ run (void *cls, } session = plugin->get_session (plugin->cls, GNUNET_YES); - /* FIXME: prime DB */ - /* FIXME: launch bank on 8082! */ - run_aggregator (); - /* FIXME: check DB and bank */ + GNUNET_assert (NULL != session); + child_death_task = + GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, + GNUNET_DISK_pipe_handle (sigpipe, + GNUNET_DISK_PIPE_END_READ), + &maint_child_death, NULL); + shutdown_task = + GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, + &shutdown_action, + NULL); + result = 1; /* test failed for undefined reason */ + mhd_bank = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + 8082, + NULL, NULL, + &handle_mhd_request, NULL, + MHD_OPTION_NOTIFY_COMPLETED, &handle_mhd_completion_callback, NULL, + MHD_OPTION_END); + if (NULL == mhd_bank) + { + GNUNET_SCHEDULER_shutdown (); + return; + } + mhd_task = FIXME; + run_test (); +} - plugin->drop_temporary (plugin->cls, - session); - TALER_EXCHANGEDB_plugin_unload (plugin); - result = 77; /* skip: not finished */ + +/** + * Signal handler called for SIGCHLD. Triggers the + * respective handler by writing to the trigger pipe. + */ +static void +sighandler_child_death () +{ + static char c; + int old_errno = errno; /* back-up errno */ + + GNUNET_break (1 == + GNUNET_DISK_file_write (GNUNET_DISK_pipe_handle + (sigpipe, GNUNET_DISK_PIPE_END_WRITE), + &c, sizeof (c))); + errno = old_errno; /* restore errno */ } @@ -100,6 +427,7 @@ main (int argc, const char *plugin_name; char *testname; struct GNUNET_CONFIGURATION_Handle *cfg; + struct GNUNET_SIGNAL_Context *shc_chld; result = -1; if (NULL == (plugin_name = strrchr (argv[0], (int) '-'))) @@ -122,7 +450,14 @@ main (int argc, GNUNET_free (testname); return 2; } + sigpipe = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO, GNUNET_NO, GNUNET_NO); + GNUNET_assert (NULL != sigpipe); + shc_chld = + GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, &sighandler_child_death); GNUNET_SCHEDULER_run (&run, cfg); + GNUNET_SIGNAL_handler_uninstall (shc_chld); + shc_chld = NULL; + GNUNET_DISK_pipe_close (sigpipe); GNUNET_CONFIGURATION_destroy (cfg); GNUNET_free (config_filename); GNUNET_free (testname); From c83e22d199c08f6c0369342ad8d38bc4baf76877 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 4 Apr 2016 14:26:24 +0200 Subject: [PATCH 53/91] add MHD skeleton logic --- src/exchange/test_taler_exchange_aggregator.c | 93 ++++++++++++++++++- 1 file changed, 90 insertions(+), 3 deletions(-) diff --git a/src/exchange/test_taler_exchange_aggregator.c b/src/exchange/test_taler_exchange_aggregator.c index f239461f4..6fd078ba5 100644 --- a/src/exchange/test_taler_exchange_aggregator.c +++ b/src/exchange/test_taler_exchange_aggregator.c @@ -21,6 +21,7 @@ */ #include "platform.h" #include "taler_util.h" +#include #include "taler_exchangedb_plugin.h" #include @@ -310,7 +311,7 @@ handle_mhd_completion_callback (void *cls, void **con_cls, enum MHD_RequestTerminationCode toe) { - TMH_PARSE_post_cleanup_callback (*con_cls); + GNUNET_JSON_post_parser_cleanup (*con_cls); *con_cls = NULL; } @@ -352,6 +353,92 @@ handle_mhd_request (void *cls, } +/** + * Task run whenever HTTP server operations are pending. + * + * @param cls NULL + * @param tc scheduler context + */ +static void +run_mhd (void *cls, + const struct GNUNET_SCHEDULER_TaskContext *tc); + + +/** + * Schedule MHD. This function should be called initially when an + * MHD is first getting its client socket, and will then automatically + * always be called later whenever there is work to be done. + */ +static void +schedule_httpd () +{ + fd_set rs; + fd_set ws; + fd_set es; + struct GNUNET_NETWORK_FDSet *wrs; + struct GNUNET_NETWORK_FDSet *wws; + int max; + int haveto; + MHD_UNSIGNED_LONG_LONG timeout; + struct GNUNET_TIME_Relative tv; + + FD_ZERO (&rs); + FD_ZERO (&ws); + FD_ZERO (&es); + max = -1; + if (MHD_YES != MHD_get_fdset (mhd_bank, &rs, &ws, &es, &max)) + { + GNUNET_assert (0); + return; + } + haveto = MHD_get_timeout (mhd_bank, &timeout); + if (MHD_YES == haveto) + tv.rel_value_us = (uint64_t) timeout * 1000LL; + else + tv = GNUNET_TIME_UNIT_FOREVER_REL; + if (-1 != max) + { + wrs = GNUNET_NETWORK_fdset_create (); + wws = GNUNET_NETWORK_fdset_create (); + GNUNET_NETWORK_fdset_copy_native (wrs, &rs, max + 1); + GNUNET_NETWORK_fdset_copy_native (wws, &ws, max + 1); + } + else + { + wrs = NULL; + wws = NULL; + } + if (NULL != mhd_task) + GNUNET_SCHEDULER_cancel (mhd_task); + mhd_task = + GNUNET_SCHEDULER_add_select (GNUNET_SCHEDULER_PRIORITY_DEFAULT, + tv, + wrs, + wws, + &run_mhd, NULL); + if (NULL != wrs) + GNUNET_NETWORK_fdset_destroy (wrs); + if (NULL != wws) + GNUNET_NETWORK_fdset_destroy (wws); +} + + +/** + * Task run whenever HTTP server operations are pending. + * + * @param cls NULL + * @param tc scheduler context + */ +static void +run_mhd (void *cls, + const struct GNUNET_SCHEDULER_TaskContext *tc) +{ + mhd_task = NULL; + MHD_run (mhd_bank); + schedule_httpd (); +} + + /** * Main function that will be run by the scheduler. * @@ -386,7 +473,7 @@ run (void *cls, &shutdown_action, NULL); result = 1; /* test failed for undefined reason */ - mhd_bank = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + mhd_bank = MHD_start_daemon (MHD_USE_DEBUG, 8082, NULL, NULL, &handle_mhd_request, NULL, @@ -397,7 +484,7 @@ run (void *cls, GNUNET_SCHEDULER_shutdown (); return; } - mhd_task = FIXME; + schedule_httpd (); run_test (); } From a72661fd297a6be6fa21ebaa9f0e795c2cb89f8a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 4 Apr 2016 14:43:42 +0200 Subject: [PATCH 54/91] add bank logic to log transactions --- src/exchange/Makefile.am | 1 + src/exchange/test_taler_exchange_aggregator.c | 113 +++++++++++++++++- 2 files changed, 112 insertions(+), 2 deletions(-) diff --git a/src/exchange/Makefile.am b/src/exchange/Makefile.am index 3375a41d5..a7e175929 100644 --- a/src/exchange/Makefile.am +++ b/src/exchange/Makefile.am @@ -64,6 +64,7 @@ test_taler_exchange_aggregator_postgres_SOURCES = \ test_taler_exchange_aggregator_postgres_LDADD = \ $(LIBGCRYPT_LIBS) \ $(top_builddir)/src/exchangedb/libtalerexchangedb.la \ + $(top_builddir)/src/json/libtalerjson.la \ $(top_builddir)/src/util/libtalerutil.la \ -lmicrohttpd \ -lgnunetutil \ diff --git a/src/exchange/test_taler_exchange_aggregator.c b/src/exchange/test_taler_exchange_aggregator.c index 6fd078ba5..8068d26a3 100644 --- a/src/exchange/test_taler_exchange_aggregator.c +++ b/src/exchange/test_taler_exchange_aggregator.c @@ -22,9 +22,54 @@ #include "platform.h" #include "taler_util.h" #include +#include "taler_json_lib.h" #include "taler_exchangedb_plugin.h" #include + +/** + * Maximum POST request size (for /admin/add/incoming) + */ +#define REQUEST_BUFFER_MAX (4*1024) + +/** + * Details about a transcation we (as the simulated bank) received. + */ +struct Transaction +{ + + /** + * We store transactions in a DLL. + */ + struct Transaction *next; + + /** + * We store transactions in a DLL. + */ + struct Transaction *prev; + + /** + * Amount to be transferred. + */ + struct TALER_Amount amount; + + /** + * Account to debit. + */ + uint64_t debit_account; + + /** + * Account to credit. + */ + uint64_t credit_account; + + /** + * Subject of the transfer. + */ + struct TALER_WireTransferIdentifierRawP wtid; +}; + + /** * Commands for the interpreter. */ @@ -130,6 +175,16 @@ static struct MHD_Daemon *mhd_bank; */ static struct GNUNET_SCHEDULER_Task *mhd_task; +/** + * We store transactions in a DLL. + */ +static struct Transaction *transactions_head; + +/** + * We store transactions in a DLL. + */ +static struct Transaction *transactions_tail; + /** * Interprets the commands from the test program. @@ -339,6 +394,12 @@ handle_mhd_request (void *cls, size_t *upload_data_size, void **con_cls) { + enum GNUNET_JSON_PostResult pr; + json_t *json; + struct Transaction *t; + struct MHD_Response *resp; + int ret; + if (0 != strcasecmp (url, "/admin/add/incoming")) { @@ -348,8 +409,56 @@ handle_mhd_request (void *cls, return MHD_NO; } /* FIXME: to be implemented! */ - GNUNET_break (0); - return MHD_NO; + pr = GNUNET_JSON_post_parser (REQUEST_BUFFER_MAX, + con_cls, + upload_data, + upload_data_size, + &json); + switch (pr) + { + case GNUNET_JSON_PR_OUT_OF_MEMORY: + GNUNET_break (0); + return MHD_NO; + case GNUNET_JSON_PR_CONTINUE: + return MHD_YES; + case GNUNET_JSON_PR_REQUEST_TOO_LARGE: + GNUNET_break (0); + return MHD_NO; + case GNUNET_JSON_PR_JSON_INVALID: + GNUNET_break (0); + return MHD_NO; + case GNUNET_JSON_PR_SUCCESS: + break; + } + t = GNUNET_new (struct Transaction); + { + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("wtid", &t->wtid), + GNUNET_JSON_spec_uint64 ("debit_account", &t->debit_account), + GNUNET_JSON_spec_uint64 ("credit_account", &t->credit_account), + TALER_JSON_spec_amount ("amount", &t->amount), + GNUNET_JSON_spec_end () + }; + if (GNUNET_OK != + GNUNET_JSON_parse (json, + spec, + NULL, NULL)) + { + GNUNET_break (0); + json_decref (json); + return MHD_NO; + } + GNUNET_CONTAINER_DLL_insert (transactions_head, + transactions_tail, + t); + } + json_decref (json); + resp = MHD_create_response_from_buffer (0, "", MHD_RESPMEM_PERSISTENT); + ret = MHD_queue_response (connection, + MHD_HTTP_OK, + resp); + MHD_destroy_response (resp); + return ret; } From db44dc3e9597903a29a4add98d99bc7e763b6e65 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 4 Apr 2016 15:07:01 +0200 Subject: [PATCH 55/91] how to run expect_transaction example --- src/exchange/test_taler_exchange_aggregator.c | 161 +++++++++++++++--- 1 file changed, 135 insertions(+), 26 deletions(-) diff --git a/src/exchange/test_taler_exchange_aggregator.c b/src/exchange/test_taler_exchange_aggregator.c index 8068d26a3..b9c610e4c 100644 --- a/src/exchange/test_taler_exchange_aggregator.c +++ b/src/exchange/test_taler_exchange_aggregator.c @@ -85,6 +85,16 @@ enum OpCode { */ OPCODE_RUN_AGGREGATOR, + /** + * Expect that we have exhaustively gone over all transactions. + */ + OPCODE_EXPECT_TRANSACTIONS_EMPTY, + + /** + * Expect that we have received the specified transaction. + */ + OPCODE_EXPECT_TRANSACTION, + /** * Finish testcase with success. */ @@ -97,8 +107,27 @@ enum OpCode { struct Command { + /** + * What instruction should we run? + */ enum OpCode opcode; + /** + * Human-readable label for the command. + */ + const char *label; + + union { + + /** + * If @e opcode is #OPCODE_EXPECT_TRANSACTION, this + * specifies which transaction we expected. Note that + * the WTID will be set, not checked! + */ + struct Transaction expect_transaction; + + } details; + }; @@ -279,6 +308,20 @@ maint_child_death (void *cls, } +/** + * Fail the testcase at the current command. + */ +static void +fail (struct Command *cmd) +{ + fprintf (stderr, + "Testcase failed at command `%s'\n", + cmd->label); + result = 2; + GNUNET_SCHEDULER_shutdown (); +} + + /** * Interprets the commands from the test program. * @@ -290,33 +333,80 @@ interpreter (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { struct State *state = cls; - struct Command *cmd = &state->commands[state->ioff]; - switch (cmd->opcode) + while (1) { - case OPCODE_TERMINATE_SKIP: - /* return skip: test not finished, but did not fail either */ - result = 77; - GNUNET_SCHEDULER_shutdown (); - return; - case OPCODE_RUN_AGGREGATOR: - GNUNET_assert (NULL == aggregator_state); - aggregator_state = state; - aggregator_proc - = GNUNET_OS_start_process (GNUNET_NO, - GNUNET_OS_INHERIT_STD_ALL, - NULL, NULL, NULL, - "taler-exchange-aggregator", - "taler-exchange-aggregator", - /* "-c", config_filename, */ - "-d", "test-exchange-home", - "-t", /* enable temporary tables */ - NULL); - return; - case OPCODE_TERMINATE_SUCCESS: - result = 0; - GNUNET_SCHEDULER_shutdown (); + struct Command *cmd = &state->commands[state->ioff]; + + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Running command %u (%s)\n", + state->ioff, + cmd->label); + switch (cmd->opcode) + { + case OPCODE_TERMINATE_SKIP: + /* return skip: test not finished, but did not fail either */ + result = 77; + GNUNET_SCHEDULER_shutdown (); + return; + case OPCODE_RUN_AGGREGATOR: + GNUNET_assert (NULL == aggregator_state); + aggregator_state = state; + aggregator_proc + = GNUNET_OS_start_process (GNUNET_NO, + GNUNET_OS_INHERIT_STD_ALL, + NULL, NULL, NULL, + "taler-exchange-aggregator", + "taler-exchange-aggregator", + /* "-c", config_filename, */ + "-d", "test-exchange-home", + "-t", /* enable temporary tables */ + NULL); return; + case OPCODE_EXPECT_TRANSACTIONS_EMPTY: + if (NULL != transactions_head) + { + fail (cmd); + return; + } + state->ioff++; + break; + case OPCODE_EXPECT_TRANSACTION: + { + const struct Transaction *want = &cmd->details.expect_transaction; + struct Transaction *t; + int found; + + found = GNUNET_NO; + for (t = transactions_head; NULL != t; t = t->next) + { + if ( (want->debit_account == t->debit_account) && + (want->credit_account == t->credit_account) && + (0 == TALER_amount_cmp (&want->amount, + &t->amount)) ) + { + GNUNET_CONTAINER_DLL_remove (transactions_head, + transactions_tail, + t); + cmd->details.expect_transaction.wtid = t->wtid; + GNUNET_free (t); + found = GNUNET_YES; + break; + } + } + if (GNUNET_NO == found) + { + fail (cmd); + return; + } + state->ioff++; + break; + } + case OPCODE_TERMINATE_SUCCESS: + result = 0; + GNUNET_SCHEDULER_shutdown (); + return; + } } } @@ -331,16 +421,32 @@ run_test () static struct Command commands[] = { /* FIXME: prime DB */ { - .opcode = OPCODE_RUN_AGGREGATOR + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-on-empty-db" }, { - .opcode = OPCODE_TERMINATE_SKIP + .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY, + .label = "expect-empty-transactions-on-start" + }, + { + .opcode = OPCODE_TERMINATE_SKIP, + .label = "testcase-incomplete-terminating-with-skip" + }, + /* note: rest not reached, just sample code */ + { + .opcode = OPCODE_EXPECT_TRANSACTION, + .label = "testing test logic", + .details.expect_transaction.debit_account = 1, + .details.expect_transaction.credit_account = 1, + .details.expect_transaction.amount = { 1, 0, "EUR" } } }; static struct State state = { .commands = commands }; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Launching interpreter\n"); GNUNET_SCHEDULER_add_now (&interpreter, &state); } @@ -636,6 +742,9 @@ main (int argc, "test-taler-exchange-aggregator-%s", plugin_name); (void) GNUNET_asprintf (&config_filename, "%s.conf", testname); + GNUNET_log_setup ("test_taler_exchange_aggregator", + "WARNING", + NULL); cfg = GNUNET_CONFIGURATION_create (); if (GNUNET_OK != GNUNET_CONFIGURATION_parse (cfg, From 6eb2e73ee0ac813cc6ffc7f3e34cbab3fe84a3fd Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 4 Apr 2016 15:47:09 +0200 Subject: [PATCH 56/91] implementing /deposit for test --- src/exchange/test_taler_exchange_aggregator.c | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) diff --git a/src/exchange/test_taler_exchange_aggregator.c b/src/exchange/test_taler_exchange_aggregator.c index b9c610e4c..134e98c10 100644 --- a/src/exchange/test_taler_exchange_aggregator.c +++ b/src/exchange/test_taler_exchange_aggregator.c @@ -90,6 +90,16 @@ enum OpCode { */ OPCODE_EXPECT_TRANSACTIONS_EMPTY, + /** + * Execute deposit operation against database. + */ + OPCODE_DATABASE_DEPOSIT, + + /** + * Wait a certain amount of time. + */ + OPCODE_WAIT, + /** * Expect that we have received the specified transaction. */ @@ -126,6 +136,50 @@ struct Command */ struct Transaction expect_transaction; + /** + * If @e opcode is #OPCODE_DATABASE_DEPOST, this + * specifies which deposit operation we should fake. + */ + struct { + + /** + * Each merchant name is automatically mapped to a unique + * merchant public key. + */ + const char *merchant_name; + + /** + * Merchant account number, is mapped to wire details. + */ + uint64_t merchant_account; + + /** + * Merchant's transaction ID. + */ + uint64_t transaction_id; + + /** + * By when does the merchant request the funds to be wired. + */ + struct GNUNET_TIME_Relative wire_deadline; + + /** + * What is the total amount (including exchange fees). + */ + const char *amount_with_fee; + + /** + * How high are the exchange fees? Must be smaller than @e amount_with_fee. + */ + const char *deposit_fee; + + } deposit; + + /** + * How long should we wait if the opcode is #OPCODE_WAIT. + */ + struct GNUNET_TIME_Relative wait_delay; + } details; }; @@ -308,6 +362,59 @@ maint_child_death (void *cls, } +/** + * Helper function to fake a deposit operation. + * + * @return #GNUNET_OK on success + */ +static int +do_deposit (struct Command *cmd) +{ + struct TALER_EXCHANGEDB_Deposit deposit; + struct TALER_MerchantPrivateKeyP merchant_priv; + int ret; + + memset (&deposit, 0, sizeof (deposit)); + GNUNET_CRYPTO_kdf (&merchant_priv, + sizeof (struct TALER_MerchantPrivateKeyP), + "merchant-priv", + strlen ("merchant-priv"), + cmd->details.deposit.merchant_name, + strlen (cmd->details.deposit.merchant_name), + NULL, 0); + GNUNET_CRYPTO_eddsa_key_get_public (&merchant_priv.eddsa_priv, + &deposit.merchant_pub.eddsa_pub); + GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, + &deposit.h_contract); + if ( (GNUNET_OK != + TALER_string_to_amount (cmd->details.deposit.amount_with_fee, + &deposit.amount_with_fee)) || + (GNUNET_OK != + TALER_string_to_amount (cmd->details.deposit.deposit_fee, + &deposit.deposit_fee)) ) + { + GNUNET_break (0); + return GNUNET_SYSERR; + } + deposit.wire = json_pack ("{s:s, s:s, s:I}", + "type", "test", + "bank_uri", "http://localhost:8082/", + "account_number", (json_int_t) cmd->details.deposit.merchant_account); + GNUNET_assert (GNUNET_OK == + TALER_JSON_hash (deposit.wire, + &deposit.h_wire)); + deposit.transaction_id = cmd->details.deposit.transaction_id; + deposit.timestamp = GNUNET_TIME_absolute_get (); + deposit.wire_deadline = GNUNET_TIME_relative_to_absolute (cmd->details.deposit.wire_deadline); + + ret = plugin->insert_deposit (plugin->cls, + session, + &deposit); + json_decref (deposit.wire); + return ret; +} + + /** * Fail the testcase at the current command. */ @@ -349,6 +456,12 @@ interpreter (void *cls, result = 77; GNUNET_SCHEDULER_shutdown (); return; + case OPCODE_WAIT: + state->ioff++; + GNUNET_SCHEDULER_add_delayed (cmd->details.wait_delay, + &interpreter, + state); + return; case OPCODE_RUN_AGGREGATOR: GNUNET_assert (NULL == aggregator_state); aggregator_state = state; @@ -371,6 +484,15 @@ interpreter (void *cls, } state->ioff++; break; + case OPCODE_DATABASE_DEPOSIT: + if (GNUNET_OK != + do_deposit (cmd)) + { + fail (cmd); + return; + } + state->ioff++; + break; case OPCODE_EXPECT_TRANSACTION: { const struct Transaction *want = &cmd->details.expect_transaction; From 13f1c1c195a47493fa211d27262d1d56346de244 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 4 Apr 2016 15:58:40 +0200 Subject: [PATCH 57/91] implementing /deposit for test --- src/exchange/test_taler_exchange_aggregator.c | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/exchange/test_taler_exchange_aggregator.c b/src/exchange/test_taler_exchange_aggregator.c index 134e98c10..f944092d1 100644 --- a/src/exchange/test_taler_exchange_aggregator.c +++ b/src/exchange/test_taler_exchange_aggregator.c @@ -375,6 +375,9 @@ do_deposit (struct Command *cmd) int ret; memset (&deposit, 0, sizeof (deposit)); + /* we derive the merchant's private key from the + name, to ensure that the same name always + results in the same key pair. */ GNUNET_CRYPTO_kdf (&merchant_priv, sizeof (struct TALER_MerchantPrivateKeyP), "merchant-priv", @@ -384,6 +387,8 @@ do_deposit (struct Command *cmd) NULL, 0); GNUNET_CRYPTO_eddsa_key_get_public (&merchant_priv.eddsa_priv, &deposit.merchant_pub.eddsa_pub); + /* contract is just picked at random; + note: we may want to write this back to 'cmd' in the future. */ GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, &deposit.h_contract); if ( (GNUNET_OK != @@ -396,6 +401,9 @@ do_deposit (struct Command *cmd) GNUNET_break (0); return GNUNET_SYSERR; } + /* Build JSON for wire details; + note that this simple method may fail in the future if we implement + and enforce signature checking on test-wire account details */ deposit.wire = json_pack ("{s:s, s:s, s:I}", "type", "test", "bank_uri", "http://localhost:8082/", @@ -407,9 +415,20 @@ do_deposit (struct Command *cmd) deposit.timestamp = GNUNET_TIME_absolute_get (); deposit.wire_deadline = GNUNET_TIME_relative_to_absolute (cmd->details.deposit.wire_deadline); - ret = plugin->insert_deposit (plugin->cls, + /* finally, actually perform the DB operation */ + if ( (GNUNET_OK != + plugin->start (plugin->cls, + session)) || + (GNUNET_OK != + plugin->insert_deposit (plugin->cls, session, - &deposit); + &deposit)) || + (GNUNET_OK != + plugin->commit (plugin->cls, + session)) ) + ret = GNUNET_SYSERR; + else + ret = GNUNET_OK; json_decref (deposit.wire); return ret; } From bd6fb59e4ba0afd537563f356e6f1abf7b980666 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 4 Apr 2016 16:06:30 +0200 Subject: [PATCH 58/91] skeletons for other commands --- src/exchange/test_taler_exchange_aggregator.c | 57 +++++++++++++++++-- 1 file changed, 51 insertions(+), 6 deletions(-) diff --git a/src/exchange/test_taler_exchange_aggregator.c b/src/exchange/test_taler_exchange_aggregator.c index f944092d1..b27c10d1f 100644 --- a/src/exchange/test_taler_exchange_aggregator.c +++ b/src/exchange/test_taler_exchange_aggregator.c @@ -134,7 +134,29 @@ struct Command * specifies which transaction we expected. Note that * the WTID will be set, not checked! */ - struct Transaction expect_transaction; + struct { + + /** + * Amount to be transferred. + */ + const char *amount; + + /** + * Account to debit. + */ + uint64_t debit_account; + + /** + * Account to credit. + */ + uint64_t credit_account; + + /** + * Subject of the transfer, set by the command. + */ + struct TALER_WireTransferIdentifierRawP wtid; + + } expect_transaction; /** * If @e opcode is #OPCODE_DATABASE_DEPOST, this @@ -514,16 +536,24 @@ interpreter (void *cls, break; case OPCODE_EXPECT_TRANSACTION: { - const struct Transaction *want = &cmd->details.expect_transaction; + struct TALER_Amount want_amount; struct Transaction *t; int found; + if (GNUNET_OK != + TALER_string_to_amount (cmd->details.expect_transaction.amount, + &want_amount)) + { + GNUNET_break (0); + fail (cmd); + return; + } found = GNUNET_NO; for (t = transactions_head; NULL != t; t = t->next) { - if ( (want->debit_account == t->debit_account) && - (want->credit_account == t->credit_account) && - (0 == TALER_amount_cmp (&want->amount, + if ( (cmd->details.expect_transaction.debit_account == t->debit_account) && + (cmd->details.expect_transaction.credit_account == t->credit_account) && + (0 == TALER_amount_cmp (&want_amount, &t->amount)) ) { GNUNET_CONTAINER_DLL_remove (transactions_head, @@ -579,7 +609,22 @@ run_test () .label = "testing test logic", .details.expect_transaction.debit_account = 1, .details.expect_transaction.credit_account = 1, - .details.expect_transaction.amount = { 1, 0, "EUR" } + .details.expect_transaction.amount = "EUR:1" + }, + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "deposit", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 5 }, /* 5s */ + .details.deposit.amount_with_fee = "EUR:1", + .details.deposit.deposit_fee = "EUR:0" + }, + { + .opcode = OPCODE_WAIT, + .label = "wait (5s)", + .details.wait_delay = { 1000LL * 1000 * 5 } /* 5s */ } }; static struct State state = { From 0ff76b5abbf09aa273b7998f4d16bb0c0e4d90bb Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 4 Apr 2016 16:47:11 +0200 Subject: [PATCH 59/91] fix test to ensure DB invariants are met --- src/exchange/test_taler_exchange_aggregator.c | 134 +++++++++++++++++- src/include/taler_amount_lib.h | 13 ++ src/util/amount.c | 24 ++++ 3 files changed, 170 insertions(+), 1 deletion(-) diff --git a/src/exchange/test_taler_exchange_aggregator.c b/src/exchange/test_taler_exchange_aggregator.c index b27c10d1f..22bc8e277 100644 --- a/src/exchange/test_taler_exchange_aggregator.c +++ b/src/exchange/test_taler_exchange_aggregator.c @@ -290,6 +290,16 @@ static struct Transaction *transactions_head; */ static struct Transaction *transactions_tail; +/** + * Private key we use for fake coins. + */ +static struct GNUNET_CRYPTO_RsaPrivateKey *coin_pk; + +/** + * Public key we use for fake coins. + */ +static struct GNUNET_CRYPTO_RsaPublicKey *coin_pub; + /** * Interprets the commands from the test program. @@ -383,6 +393,47 @@ maint_child_death (void *cls, } +/** + * Setup (fake) information about a coin used in deposit. + * + * @param[out] issue information to initialize with "valid" data + */ +static void +fake_issue (struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue) +{ + memset (issue, 0, sizeof (struct TALER_EXCHANGEDB_DenominationKeyInformationP)); + GNUNET_assert (GNUNET_OK == + TALER_string_to_amount_nbo ("EUR:1", + &issue->properties.value)); + GNUNET_assert (GNUNET_OK == + TALER_string_to_amount_nbo ("EUR:0.1", + &issue->properties.fee_withdraw)); + GNUNET_assert (GNUNET_OK == + TALER_string_to_amount_nbo ("EUR:0.1", + &issue->properties.fee_deposit)); + GNUNET_assert (GNUNET_OK == + TALER_string_to_amount_nbo ("EUR:0.1", + &issue->properties.fee_refresh)); +} + + +/** + * Setup (fake) information about a coin used in deposit. + * + * @param[out] coin information to initialize with "valid" data + */ +static void +fake_coin (struct TALER_CoinPublicInfo *coin) +{ + struct GNUNET_HashCode hc; + + coin->denom_pub.rsa_public_key = coin_pub; + GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, + &hc); + coin->denom_sig.rsa_signature = GNUNET_CRYPTO_rsa_sign_fdh (coin_pk, + &hc); +} + /** * Helper function to fake a deposit operation. @@ -423,6 +474,7 @@ do_deposit (struct Command *cmd) GNUNET_break (0); return GNUNET_SYSERR; } + fake_coin (&deposit.coin); /* Build JSON for wire details; note that this simple method may fail in the future if we implement and enforce signature checking on test-wire account details */ @@ -451,6 +503,7 @@ do_deposit (struct Command *cmd) ret = GNUNET_SYSERR; else ret = GNUNET_OK; + GNUNET_CRYPTO_rsa_signature_free (deposit.coin.denom_sig.rsa_signature); json_decref (deposit.wire); return ret; } @@ -590,7 +643,7 @@ static void run_test () { static struct Command commands[] = { - /* FIXME: prime DB */ + /* test running with empty DB */ { .opcode = OPCODE_RUN_AGGREGATOR, .label = "run-aggregator-on-empty-db" @@ -599,6 +652,57 @@ run_test () .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY, .label = "expect-empty-transactions-on-start" }, + /* test simple deposit */ + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 5s */ + .details.deposit.amount_with_fee = "EUR:1", + .details.deposit.deposit_fee = "EUR:0" + }, + { + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-1" + }, + + /* The above step is already known to fail (with an error message) + right now, so we skip the rest of the test. */ + { + .opcode = OPCODE_TERMINATE_SKIP, + .label = "testcase-incomplete-terminating-with-skip" + }, + + + { + .opcode = OPCODE_EXPECT_TRANSACTION, + .label = "expect-deposit-1", + .details.expect_transaction.debit_account = 1, + .details.expect_transaction.credit_account = 4, + .details.expect_transaction.amount = "EUR:1" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY, + .label = "expect-empty-transactions-on-start" + }, + /* test idempotency: run again on transactions already done */ + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 5s */ + .details.deposit.amount_with_fee = "EUR:1", + .details.deposit.deposit_fee = "EUR:0" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY, + .label = "expect-empty-transactions-on-start" + }, + { .opcode = OPCODE_TERMINATE_SKIP, .label = "testcase-incomplete-terminating-with-skip" @@ -851,19 +955,43 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { struct GNUNET_CONFIGURATION_Handle *cfg = cls; + struct TALER_EXCHANGEDB_DenominationKeyInformationP issue; + struct TALER_DenominationPublicKey dpk; plugin = TALER_EXCHANGEDB_plugin_load (cfg); if (GNUNET_OK != plugin->create_tables (plugin->cls, GNUNET_YES)) { + GNUNET_break (0); TALER_EXCHANGEDB_plugin_unload (plugin); + plugin = NULL; result = 77; return; } session = plugin->get_session (plugin->cls, GNUNET_YES); GNUNET_assert (NULL != session); + fake_issue (&issue); + dpk.rsa_public_key = coin_pub; + if ( (GNUNET_OK != + plugin->start (plugin->cls, + session)) || + (GNUNET_OK != + plugin->insert_denomination_info (plugin->cls, + session, + &dpk, + &issue)) || + (GNUNET_OK != + plugin->commit (plugin->cls, + session)) ) + { + GNUNET_break (0); + TALER_EXCHANGEDB_plugin_unload (plugin); + plugin = NULL; + result = 77; + return; + } child_death_task = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_DISK_pipe_handle (sigpipe, @@ -945,7 +1073,11 @@ main (int argc, GNUNET_assert (NULL != sigpipe); shc_chld = GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, &sighandler_child_death); + coin_pk = GNUNET_CRYPTO_rsa_private_key_create (1024); + coin_pub = GNUNET_CRYPTO_rsa_private_key_get_public (coin_pk); GNUNET_SCHEDULER_run (&run, cfg); + GNUNET_CRYPTO_rsa_private_key_free (coin_pk); + GNUNET_CRYPTO_rsa_public_key_free (coin_pub); GNUNET_SIGNAL_handler_uninstall (shc_chld); shc_chld = NULL; GNUNET_DISK_pipe_close (sigpipe); diff --git a/src/include/taler_amount_lib.h b/src/include/taler_amount_lib.h index 094b96f7f..2fd547196 100644 --- a/src/include/taler_amount_lib.h +++ b/src/include/taler_amount_lib.h @@ -127,6 +127,19 @@ TALER_string_to_amount (const char *str, struct TALER_Amount *denom); +/** + * Parse denomination description, in the format "T:V.F". + * + * @param str denomination description + * @param denom denomination to write the result to, in NBO + * @return #GNUNET_OK if the string is a valid denomination specification, + * #GNUNET_SYSERR if it is invalid. + */ +int +TALER_string_to_amount_nbo (const char *str, + struct TALER_AmountNBO *denom); + + /** * Get the value of "zero" in a particular currency. * diff --git a/src/util/amount.c b/src/util/amount.c index dc2d2e400..4ac7d30ab 100644 --- a/src/util/amount.c +++ b/src/util/amount.c @@ -150,6 +150,30 @@ TALER_string_to_amount (const char *str, } +/** + * Parse denomination description, in the format "T:V.F". + * + * @param str denomination description + * @param denom denomination to write the result to, in NBO + * @return #GNUNET_OK if the string is a valid denomination specification, + * #GNUNET_SYSERR if it is invalid. + */ +int +TALER_string_to_amount_nbo (const char *str, + struct TALER_AmountNBO *denom) +{ + struct TALER_Amount amount; + + if (GNUNET_OK != + TALER_string_to_amount (str, + &amount)) + return GNUNET_SYSERR; + TALER_amount_hton (denom, + &amount); + return GNUNET_OK; +} + + /** * Convert amount from host to network representation. * From afb1ab2a116bb0b33b5d23d043222965892e8edf Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 4 Apr 2016 17:40:51 +0200 Subject: [PATCH 60/91] -fix mem leaks --- src/exchange/taler-exchange-aggregator.c | 12 +++++++++++ src/exchangedb/plugin_exchangedb_postgres.c | 9 ++++---- src/wire/plugin_wire_sepa.c | 24 ++++++++++----------- src/wire/plugin_wire_test.c | 1 + 4 files changed, 30 insertions(+), 16 deletions(-) diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c index 2d5fd71d8..a6b7de211 100644 --- a/src/exchange/taler-exchange-aggregator.c +++ b/src/exchange/taler-exchange-aggregator.c @@ -472,6 +472,8 @@ run_aggregation (void *cls, au); if (GNUNET_OK != ret) { + if (NULL != au->wire) + json_decref (au->wire); GNUNET_free (au); db_plugin->rollback (db_plugin->cls, session); @@ -510,6 +512,8 @@ run_aggregation (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to execute deposit iteration!\n"); GNUNET_free_non_null (au->additional_rows); + if (NULL != au->wire) + json_decref (au->wire); GNUNET_free (au); db_plugin->rollback (db_plugin->cls, session); @@ -538,6 +542,8 @@ run_aggregation (void *cls, "Failed to start database transaction!\n"); *global_ret = GNUNET_SYSERR; GNUNET_free_non_null (au->additional_rows); + if (NULL != au->wire) + json_decref (au->wire); GNUNET_free (au); return; } @@ -564,6 +570,8 @@ run_aggregation (void *cls, "Failed to commit database transaction!\n"); } GNUNET_free_non_null (au->additional_rows); + if (NULL != au->wire) + json_decref (au->wire); GNUNET_free (au); /* start again */ task = GNUNET_SCHEDULER_add_now (&run_aggregation, @@ -586,6 +594,8 @@ run_aggregation (void *cls, db_plugin->rollback (db_plugin->cls, session); GNUNET_free_non_null (au->additional_rows); + if (NULL != au->wire) + json_decref (au->wire); GNUNET_free (au); /* start again */ task = GNUNET_SCHEDULER_add_now (&run_aggregation, @@ -625,6 +635,8 @@ prepare_cb (void *cls, struct TALER_EXCHANGEDB_Session *session = au->session; GNUNET_free_non_null (au->additional_rows); + if (NULL != au->wire) + json_decref (au->wire); GNUNET_free (au); if (NULL == buf) { diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index b59acaead..6807e7563 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -1480,8 +1480,8 @@ postgres_get_denomination_info (void *cls, EXITIF (GNUNET_OK != GNUNET_PQ_extract_result (result, - rs, - 0)); + rs, + 0)); } PQclear (result); return GNUNET_OK; @@ -1954,7 +1954,7 @@ postgres_get_reserve_history (void *cls, &bt->wire), GNUNET_PQ_result_spec_end }; - if (GNUNET_YES != + if (GNUNET_OK != GNUNET_PQ_extract_result (result, rs, --rows)) { GNUNET_break (0); @@ -2019,7 +2019,7 @@ postgres_get_reserve_history (void *cls, &cbc->withdraw_fee), GNUNET_PQ_result_spec_end }; - if (GNUNET_YES != + if (GNUNET_OK != GNUNET_PQ_extract_result (result, rs, --rows)) { GNUNET_break (0); @@ -2285,6 +2285,7 @@ postgres_get_ready_deposit (void *cls, &wire), GNUNET_PQ_result_spec_end }; + if (GNUNET_OK != GNUNET_PQ_extract_result (result, rs, 0)) { diff --git a/src/wire/plugin_wire_sepa.c b/src/wire/plugin_wire_sepa.c index 466e450be..e0a3426c2 100644 --- a/src/wire/plugin_wire_sepa.c +++ b/src/wire/plugin_wire_sepa.c @@ -731,20 +731,20 @@ libtaler_plugin_wire_sepa_init (void *cls) sc = GNUNET_new (struct SepaClosure); if (NULL != cfg) + { + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (cfg, + "exchange", + "CURRENCY", + &sc->currency)) { - if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_string (cfg, - "exchange", - "CURRENCY", - &sc->currency)) - { - GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "exchange", - "CURRENCY"); - GNUNET_free (sc); - return NULL; - } + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + "exchange", + "CURRENCY"); + GNUNET_free (sc); + return NULL; } + } plugin = GNUNET_new (struct TALER_WIRE_Plugin); plugin->cls = sc; plugin->amount_round = &sepa_amount_round; diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c index 8c03d155e..357449af6 100644 --- a/src/wire/plugin_wire_test.c +++ b/src/wire/plugin_wire_test.c @@ -762,6 +762,7 @@ libtaler_plugin_wire_test_init (void *cls) return NULL; } tc->bank = TALER_BANK_init (uri); + GNUNET_free (uri); if (NULL == tc->bank) { GNUNET_break (0); From f3819ae60d5055a5560deff835d8a9c8bd6e2324 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 5 Apr 2016 23:45:05 +0200 Subject: [PATCH 61/91] undef dead symbol --- src/include/taler_util.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/include/taler_util.h b/src/include/taler_util.h index f0da795a4..797b6691b 100644 --- a/src/include/taler_util.h +++ b/src/include/taler_util.h @@ -121,18 +121,6 @@ TALER_config_get_denom (struct GNUNET_CONFIGURATION_Handle *cfg, struct TALER_Amount *denom); -/** - * Get the path to a specific Taler installation directory or, with - * #GNUNET_OS_IPK_SELF_PREFIX, the current running apps installation - * directory. - * - * @param dirkind what kind of directory is desired? - * @return a pointer to the dir path (to be freed by the caller) - */ -char * -TALER_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind); - - /** * Print out details on command line options (implements --help). * From ad8351c912995a9ef0524822f0fdeef55e9d27a9 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 6 Apr 2016 10:22:09 +0200 Subject: [PATCH 62/91] fix iterate_matching_deposits(), LIMIT does not work with variables in Postgres (#4360) --- src/exchange/taler-exchange-aggregator.c | 5 +- src/exchangedb/Makefile.am | 1 + src/exchangedb/plugin_exchangedb_postgres.c | 26 +++---- src/exchangedb/test_exchangedb.c | 81 ++++++++++++++++++++- src/include/taler_exchangedb_plugin.h | 15 +++- src/include/taler_json_lib.h | 2 +- 6 files changed, 110 insertions(+), 20 deletions(-) diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c index a6b7de211..cfc11a5f9 100644 --- a/src/exchange/taler-exchange-aggregator.c +++ b/src/exchange/taler-exchange-aggregator.c @@ -78,9 +78,10 @@ static int test_mode; * of the smallest possible unit are aggregated, they do surpass the * "tiny" threshold beyond which we never trigger a wire transaction! * - * TODO: make configurable (via config file or command line option) + * Note: do not change here, Postgres requires us to hard-code the + * LIMIT in the prepared statement. */ -static unsigned int aggregation_limit = 10000; +static unsigned int aggregation_limit = TALER_EXCHANGEDB_MATCHING_DEPOSITS_LIMIT; /** diff --git a/src/exchangedb/Makefile.am b/src/exchangedb/Makefile.am index 416d5688f..0a7b0447c 100644 --- a/src/exchangedb/Makefile.am +++ b/src/exchangedb/Makefile.am @@ -80,6 +80,7 @@ test_exchangedb_postgres_SOURCES = \ test_exchangedb.c test_exchangedb_postgres_LDADD = \ libtalerexchangedb.la \ + $(top_builddir)/src/json/libtalerjson.la \ $(top_srcdir)/src/util/libtalerutil.la \ $(top_srcdir)/src/pq/libtalerpq.la \ -lgnunetutil -ljansson diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index 6807e7563..c38c0827f 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -952,7 +952,7 @@ postgres_prepare (PGconn *db_conn) " tiny=false AND" " done=false" " ORDER BY wire_deadline ASC" - " LIMIT 1;", + " LIMIT 1", 0, NULL); /* Used in #postgres_iterate_matching_deposits() */ @@ -975,8 +975,8 @@ postgres_prepare (PGconn *db_conn) " h_wire=$2 AND" " done=false" " ORDER BY wire_deadline ASC" - " LIMIT $3", - 3, NULL); + " LIMIT " TALER_EXCHANGEDB_MATCHING_DEPOSITS_LIMIT_STR, + 2, NULL); /* Used in #postgres_mark_deposit_tiny() */ PREPARE ("mark_deposit_tiny", @@ -2336,7 +2336,6 @@ postgres_iterate_matching_deposits (void *cls, struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_auto_from_type (merchant_pub), GNUNET_PQ_query_param_auto_from_type (h_wire), - GNUNET_PQ_query_param_uint32 (&limit), GNUNET_PQ_query_param_end }; PGresult *result; @@ -2344,8 +2343,8 @@ postgres_iterate_matching_deposits (void *cls, unsigned int n; result = GNUNET_PQ_exec_prepared (session->conn, - "deposits_iterate_matching", - params); + "deposits_iterate_matching", + params); if (PGRES_TUPLES_OK != PQresultStatus (result)) { @@ -2366,28 +2365,25 @@ postgres_iterate_matching_deposits (void *cls, struct TALER_Amount deposit_fee; struct GNUNET_TIME_Absolute wire_deadline; struct GNUNET_HashCode h_contract; - struct TALER_MerchantPublicKeyP merchant_pub; struct TALER_CoinSpendPublicKeyP coin_pub; uint64_t transaction_id; uint64_t serial_id; int ret; struct GNUNET_PQ_ResultSpec rs[] = { GNUNET_PQ_result_spec_uint64 ("serial_id", - &serial_id), + &serial_id), GNUNET_PQ_result_spec_uint64 ("transaction_id", - &transaction_id), + &transaction_id), TALER_PQ_result_spec_amount ("amount_with_fee", &amount_with_fee), TALER_PQ_result_spec_amount ("deposit_fee", &deposit_fee), GNUNET_PQ_result_spec_absolute_time ("wire_deadline", - &wire_deadline), + &wire_deadline), GNUNET_PQ_result_spec_auto_from_type ("h_contract", - &h_contract), - GNUNET_PQ_result_spec_auto_from_type ("merchant_pub", - &merchant_pub), + &h_contract), GNUNET_PQ_result_spec_auto_from_type ("coin_pub", - &coin_pub), + &coin_pub), GNUNET_PQ_result_spec_end }; if (GNUNET_OK != @@ -2399,7 +2395,7 @@ postgres_iterate_matching_deposits (void *cls, } ret = deposit_cb (deposit_cb_cls, serial_id, - &merchant_pub, + merchant_pub, &coin_pub, &amount_with_fee, &deposit_fee, diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c index f33bb18c3..8d06c0072 100644 --- a/src/exchangedb/test_exchangedb.c +++ b/src/exchangedb/test_exchangedb.c @@ -20,6 +20,7 @@ */ #include "platform.h" #include "taler_exchangedb_lib.h" +#include "taler_json_lib.h" #include "taler_exchangedb_plugin.h" static int result; @@ -546,6 +547,70 @@ cb_wtid_check (void *cls, } +/** + * Function called with details about deposits that + * have been made. Called in the test on the + * deposit given in @a cls. + * + * @param cls closure a `struct TALER_EXCHANGEDB_Deposit *` + * @param rowid unique ID for the deposit in our DB, used for marking + * it as 'tiny' or 'done' + * @param merchant_pub public key of the merchant + * @param coin_pub public key of the coin + * @param amount_with_fee amount that was deposited including fee + * @param deposit_fee amount the exchange gets to keep as transaction fees + * @param transaction_id unique transaction ID chosen by the merchant + * @param h_contract hash of the contract between merchant and customer + * @param wire_deadline by which the merchant adviced that he would like the + * wire transfer to be executed + * @param wire wire details for the merchant, NULL from iterate_matching_deposits() + * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR if deposit does + * not match our expectations + */ +static int +deposit_cb (void *cls, + unsigned long long rowid, + const struct TALER_MerchantPublicKeyP *merchant_pub, + const struct TALER_CoinSpendPublicKeyP *coin_pub, + const struct TALER_Amount *amount_with_fee, + const struct TALER_Amount *deposit_fee, + uint64_t transaction_id, + const struct GNUNET_HashCode *h_contract, + struct GNUNET_TIME_Absolute wire_deadline, + const json_t *wire) +{ + struct TALER_EXCHANGEDB_Deposit *deposit = cls; + struct GNUNET_HashCode h_wire; + + if (NULL != wire) + TALER_JSON_hash (wire, &h_wire); + if ( (0 != memcmp (merchant_pub, + &deposit->merchant_pub, + sizeof (struct TALER_MerchantPublicKeyP))) || + (0 != TALER_amount_cmp (amount_with_fee, + &deposit->amount_with_fee)) || + (0 != TALER_amount_cmp (deposit_fee, + &deposit->deposit_fee)) || + (0 != memcmp (h_contract, + &deposit->h_contract, + sizeof (struct GNUNET_HashCode))) || + (0 != memcmp (coin_pub, + &deposit->coin.coin_pub, + sizeof (struct TALER_CoinSpendPublicKeyP))) || + (transaction_id != deposit->transaction_id) || + ( (NULL != wire) && + (0 != memcmp (&h_wire, + &deposit->h_wire, + sizeof (struct GNUNET_HashCode))) ) ) + { + GNUNET_break (0); + return GNUNET_SYSERR; + } + + return GNUNET_OK; +} + + /** * Main function that will be run by the scheduler. * @@ -739,14 +804,16 @@ run (void *cls, RND_BLK (&deposit.csig); RND_BLK (&deposit.merchant_pub); RND_BLK (&deposit.h_contract); - RND_BLK (&deposit.h_wire); wire = json_loads (json_wire_str, 0, NULL); + TALER_JSON_hash (wire, + &deposit.h_wire); deposit.wire = wire; deposit.transaction_id = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX); deposit.amount_with_fee = value; GNUNET_assert (GNUNET_OK == TALER_amount_get_zero (CURRENCY, &deposit.deposit_fee)); + result = 8; FAILIF (GNUNET_OK != plugin->insert_deposit (plugin->cls, session, &deposit)); @@ -754,6 +821,15 @@ run (void *cls, plugin->have_deposit (plugin->cls, session, &deposit)); + result = 9; + FAILIF (1 != + plugin->iterate_matching_deposits (plugin->cls, + session, + &deposit.h_wire, + &deposit.merchant_pub, + &deposit_cb, &deposit, + 2)); + result = 10; deposit2 = deposit; deposit2.transaction_id++; /* should fail if transaction id is different */ FAILIF (GNUNET_NO != @@ -880,6 +956,9 @@ main (int argc, GNUNET_break (0); return -1; } + GNUNET_log_setup (argv[0], + "WARNING", + NULL); plugin_name++; (void) GNUNET_asprintf (&testname, "test-exchange-db-%s", plugin_name); diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index cb1dcb344..3646981cd 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -947,6 +947,17 @@ struct TALER_EXCHANGEDB_Plugin void *deposit_cb_cls); +/** + * Maximum number of results we return from iterate_matching_deposits(). + * + * Limit on the number of transactions we aggregate at once. Note + * that the limit must be big enough to ensure that when transactions + * of the smallest possible unit are aggregated, they do surpass the + * "tiny" threshold beyond which we never trigger a wire transaction! + */ +#define TALER_EXCHANGEDB_MATCHING_DEPOSITS_LIMIT 10000 +#define TALER_EXCHANGEDB_MATCHING_DEPOSITS_LIMIT_STR "10000" + /** * Obtain information about other pending deposits for the same * destination. Those deposits must not already be "done". @@ -957,7 +968,9 @@ struct TALER_EXCHANGEDB_Plugin * @param merchant_pub public key of the merchant * @param deposit_cb function to call for each deposit * @param deposit_cb_cls closure for @a deposit_cb - * @param limit maximum number of matching deposits to return + * @param limit maximum number of matching deposits to return; should + * be #TALER_EXCHANGEDB_MATCHING_DEPOSITS_LIMIT, larger values + * are not supported, smaller values would be inefficient. * @return number of rows processed, 0 if none exist, * #GNUNET_SYSERR on error */ diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h index 3dd661a91..79589dba7 100644 --- a/src/include/taler_json_lib.h +++ b/src/include/taler_json_lib.h @@ -89,7 +89,7 @@ TALER_JSON_spec_denomination_signature (const char *field, * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ int -TALER_JSON_hash (json_t *json, +TALER_JSON_hash (const json_t *json, struct GNUNET_HashCode *hc); #endif /* TALER_JSON_LIB_H_ */ From 4977a3eb8fe403eca5d30ce7ec397213f4a4eadd Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 6 Apr 2016 10:34:42 +0200 Subject: [PATCH 63/91] address 'global_ret' simplification TODO --- src/exchange/taler-exchange-aggregator.c | 116 ++++++++++++++--------- 1 file changed, 69 insertions(+), 47 deletions(-) diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c index cfc11a5f9..96922eff2 100644 --- a/src/exchange/taler-exchange-aggregator.c +++ b/src/exchange/taler-exchange-aggregator.c @@ -20,7 +20,6 @@ * @author Christian Grothoff * * TODO: - * - simplify global_ret: make it a global! * - handle shutdown more nicely (call 'cancel' method on wire transfers) */ #include "platform.h" @@ -67,6 +66,12 @@ static struct TALER_WIRE_Plugin *wire_plugin; */ static struct GNUNET_SCHEDULER_Task *task; +/** + * Value to return from main(). #GNUNET_OK on success, #GNUNET_SYSERR + * on serious errors. + */ +static int global_ret; + /** * #GNUNET_YES if we are in test mode and are using temporary tables. */ @@ -84,6 +89,25 @@ static int test_mode; static unsigned int aggregation_limit = TALER_EXCHANGEDB_MATCHING_DEPOSITS_LIMIT; +/** + * We're being aborted with CTRL-C (or SIGTERM). Shut down. + * + * @param cls closure + * @param tc scheduler context + */ +static void +shutdown_task (void *cls, + const struct GNUNET_SCHEDULER_TaskContext *tc) +{ + if (NULL != task) + { + GNUNET_SCHEDULER_cancel (task); + task = NULL; + } + /* FIXME: other shutdown stuff here! */ +} + + /** * Load configuration parameters for the exchange * server into the corresponding global variables. @@ -216,11 +240,6 @@ struct AggregationUnit */ unsigned long long *additional_rows; - /** - * Pointer to global return value. Closure for #run(). - */ - int *global_ret; - /** * Offset specifying how many #additional_rows are in use. */ @@ -314,7 +333,6 @@ deposit_cb (void *cls, } - /** * Function called with details about another deposit we * can aggregate into an existing aggregation unit. @@ -433,14 +451,13 @@ prepare_cb (void *cls, * Main work function that queries the DB and aggregates transactions * into larger wire transfers. * - * @param cls pointer to an `int` which we will return from main() + * @param cls NULL * @param tc scheduler context */ static void run_aggregation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { - int *global_ret = cls; struct TALER_EXCHANGEDB_Session *session; struct AggregationUnit *au; unsigned int i; @@ -453,7 +470,7 @@ run_aggregation (void *cls, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to obtain database session!\n"); - *global_ret = GNUNET_SYSERR; + global_ret = GNUNET_SYSERR; return; } if (GNUNET_OK != @@ -462,7 +479,7 @@ run_aggregation (void *cls, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to start database transaction!\n"); - *global_ret = GNUNET_SYSERR; + global_ret = GNUNET_SYSERR; return; } au = GNUNET_new (struct AggregationUnit); @@ -482,7 +499,7 @@ run_aggregation (void *cls, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to execute deposit iteration!\n"); - *global_ret = GNUNET_SYSERR; + global_ret = GNUNET_SYSERR; return; } if (GNUNET_YES == test_mode) @@ -495,7 +512,7 @@ run_aggregation (void *cls, /* nothing to do, sleep for a minute and try again */ task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, &run_aggregation, - global_ret); + NULL); } return; } @@ -518,7 +535,7 @@ run_aggregation (void *cls, GNUNET_free (au); db_plugin->rollback (db_plugin->cls, session); - *global_ret = GNUNET_SYSERR; + global_ret = GNUNET_SYSERR; return; } /* Round to the unit supported by the wire transfer method */ @@ -541,7 +558,7 @@ run_aggregation (void *cls, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to start database transaction!\n"); - *global_ret = GNUNET_SYSERR; + global_ret = GNUNET_SYSERR; GNUNET_free_non_null (au->additional_rows); if (NULL != au->wire) json_decref (au->wire); @@ -576,10 +593,9 @@ run_aggregation (void *cls, GNUNET_free (au); /* start again */ task = GNUNET_SCHEDULER_add_now (&run_aggregation, - global_ret); + NULL); return; } - au->global_ret = global_ret; au->ph = wire_plugin->prepare_wire_transfer (wire_plugin->cls, au->wire, &au->total_amount, @@ -600,7 +616,7 @@ run_aggregation (void *cls, GNUNET_free (au); /* start again */ task = GNUNET_SCHEDULER_add_now (&run_aggregation, - global_ret); + NULL); return; } /* otherwise we continue with #prepare_cb(), see below */ @@ -632,7 +648,6 @@ prepare_cb (void *cls, size_t buf_size) { struct AggregationUnit *au = cls; - int *global_ret = au->global_ret; struct TALER_EXCHANGEDB_Session *session = au->session; GNUNET_free_non_null (au->additional_rows); @@ -646,7 +661,7 @@ prepare_cb (void *cls, session); /* start again */ task = GNUNET_SCHEDULER_add_now (&run_aggregation, - global_ret); + NULL); return; } @@ -663,7 +678,7 @@ prepare_cb (void *cls, session); /* start again */ task = GNUNET_SCHEDULER_add_now (&run_aggregation, - global_ret); + NULL); return; } @@ -677,13 +692,13 @@ prepare_cb (void *cls, "Failed to commit database transaction!\n"); /* try again */ task = GNUNET_SCHEDULER_add_now (&run_aggregation, - global_ret); + NULL); return; } /* run alternative task: actually do wire transfer! */ task = GNUNET_SCHEDULER_add_now (&run_transfers, - &global_ret); + NULL); } @@ -703,12 +718,6 @@ struct WirePrepareData */ struct TALER_WIRE_ExecuteHandle *eh; - /** - * Pointer to global return value. Closure for #run(). - */ - int *global_ret; - - /** * Row ID of the transfer. */ @@ -730,7 +739,6 @@ wire_confirm_cb (void *cls, const char *emsg) { struct WirePrepareData *wpd = cls; - int *global_ret = wpd->global_ret; struct TALER_EXCHANGEDB_Session *session = wpd->session; wpd->eh = NULL; @@ -741,7 +749,7 @@ wire_confirm_cb (void *cls, emsg); db_plugin->rollback (db_plugin->cls, session); - *global_ret = GNUNET_SYSERR; + global_ret = GNUNET_SYSERR; GNUNET_free (wpd); return; } @@ -753,7 +761,7 @@ wire_confirm_cb (void *cls, GNUNET_break (0); /* why!? */ db_plugin->rollback (db_plugin->cls, session); - *global_ret = GNUNET_SYSERR; + global_ret = GNUNET_SYSERR; GNUNET_free (wpd); return; } @@ -766,13 +774,13 @@ wire_confirm_cb (void *cls, "Failed to commit database transaction!\n"); /* try again */ task = GNUNET_SCHEDULER_add_now (&run_aggregation, - global_ret); + NULL); return; } /* continue with #run_transfers(), just to guard against the unlikely case that there are more. */ task = GNUNET_SCHEDULER_add_now (&run_transfers, - &global_ret); + NULL); } @@ -792,7 +800,6 @@ wire_prepare_cb (void *cls, size_t buf_size) { struct WirePrepareData *wpd = cls; - int *global_ret = wpd->global_ret; wpd->row_id = rowid; wpd->eh = wire_plugin->execute_wire_transfer (wire_plugin->cls, @@ -808,7 +815,7 @@ wire_prepare_cb (void *cls, GNUNET_break (0); /* why? how to best recover? */ db_plugin->rollback (db_plugin->cls, wpd->session); - *global_ret = GNUNET_SYSERR; + global_ret = GNUNET_SYSERR; GNUNET_free (wpd); return; } @@ -819,14 +826,13 @@ wire_prepare_cb (void *cls, * Execute the wire transfers that we have committed to * do. * - * @param cls pointer to an `int` which we will return from main() + * @param cls NULL * @param tc scheduler context */ static void run_transfers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { - int *global_ret = cls; int ret; struct WirePrepareData *wpd; struct TALER_EXCHANGEDB_Session *session; @@ -838,7 +844,7 @@ run_transfers (void *cls, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to obtain database session!\n"); - *global_ret = GNUNET_SYSERR; + global_ret = GNUNET_SYSERR; return; } if (GNUNET_OK != @@ -847,12 +853,11 @@ run_transfers (void *cls, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to start database transaction!\n"); - *global_ret = GNUNET_SYSERR; + global_ret = GNUNET_SYSERR; return; } wpd = GNUNET_new (struct WirePrepareData); wpd->session = session; - wpd->global_ret = global_ret; ret = db_plugin->wire_prepare_data_get (db_plugin->cls, session, exchange_wireformat, @@ -863,7 +868,7 @@ run_transfers (void *cls, GNUNET_break (0); /* why? how to best recover? */ db_plugin->rollback (db_plugin->cls, session); - *global_ret = GNUNET_SYSERR; + global_ret = GNUNET_SYSERR; GNUNET_free (wpd); return; } @@ -873,7 +878,7 @@ run_transfers (void *cls, db_plugin->rollback (db_plugin->cls, session); task = GNUNET_SCHEDULER_add_now (&run_aggregation, - global_ret); + NULL); GNUNET_free (wpd); return; } @@ -881,6 +886,24 @@ run_transfers (void *cls, } +/** + * First task. + * + * @param cls closure, NULL + * @param tc scheduler context + */ +static void +run (void *cls, + const struct GNUNET_SCHEDULER_TaskContext *tc) +{ + task = GNUNET_SCHEDULER_add_now (&run_transfers, + cls); + GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, + &shutdown_task, + cls); +} + + /** * The main function of the taler-exchange-httpd server ("the exchange"). * @@ -907,7 +930,6 @@ main (int argc, GNUNET_GETOPT_OPTION_VERSION (VERSION "-" VCS_VERSION), GNUNET_GETOPT_OPTION_END }; - int ret = GNUNET_OK; GNUNET_assert (GNUNET_OK == GNUNET_log_setup ("taler-exchange-aggregator", @@ -929,12 +951,12 @@ main (int argc, { return 1; } - - GNUNET_SCHEDULER_run (&run_transfers, &ret); + global_ret = GNUNET_OK; + GNUNET_SCHEDULER_run (&run, NULL); TALER_EXCHANGEDB_plugin_unload (db_plugin); TALER_WIRE_plugin_unload (wire_plugin); - return (GNUNET_SYSERR == ret) ? 1 : 0; + return (GNUNET_SYSERR == global_ret) ? 1 : 0; } /* end of taler-exchange-aggregator.c */ From 07541d319c16e8dd78e813989223a654cb306c87 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 6 Apr 2016 11:24:33 +0200 Subject: [PATCH 64/91] address 'shutdown' TODO in taler-exchange-aggregator --- src/exchange/taler-exchange-aggregator.c | 279 +++++++++++++---------- 1 file changed, 158 insertions(+), 121 deletions(-) diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c index 96922eff2..3726d32fa 100644 --- a/src/exchange/taler-exchange-aggregator.c +++ b/src/exchange/taler-exchange-aggregator.c @@ -18,9 +18,6 @@ * @file taler-exchange-aggregator.c * @brief Process that aggregates outgoing transactions and executes them * @author Christian Grothoff - * - * TODO: - * - handle shutdown more nicely (call 'cancel' method on wire transfers) */ #include "platform.h" #include @@ -31,6 +28,102 @@ #include "taler_json_lib.h" #include "taler_wire_lib.h" + +/** + * Data we keep to #run_transfers(). There is at most + * one of these around at any given point in time. + */ +struct WirePrepareData +{ + + /** + * Database session for all of our transactions. + */ + struct TALER_EXCHANGEDB_Session *session; + + /** + * Wire execution handle. + */ + struct TALER_WIRE_ExecuteHandle *eh; + + /** + * Row ID of the transfer. + */ + unsigned long long row_id; + +}; + + +/** + * Information about one aggregation process to be executed. There is + * at most one of these around at any given point in time. + */ +struct AggregationUnit +{ + /** + * Public key of the merchant. + */ + struct TALER_MerchantPublicKeyP merchant_pub; + + /** + * Total amount to be transferred. + */ + struct TALER_Amount total_amount; + + /** + * Hash of @e wire. + */ + struct GNUNET_HashCode h_wire; + + /** + * Wire transfer identifier we use. + */ + struct TALER_WireTransferIdentifierRawP wtid; + + /** + * Row ID of the transaction that started it all. + */ + unsigned long long row_id; + + /** + * The current time. + */ + struct GNUNET_TIME_Absolute execution_time; + + /** + * Wire details of the merchant. + */ + json_t *wire; + + /** + * Database session for all of our transactions. + */ + struct TALER_EXCHANGEDB_Session *session; + + /** + * Wire preparation handle. + */ + struct TALER_WIRE_PrepareHandle *ph; + + /** + * Array of #aggregation_limit row_ids from the + * aggregation. + */ + unsigned long long *additional_rows; + + /** + * Offset specifying how many #additional_rows are in use. + */ + unsigned int rows_offset; + + /** + * Set to #GNUNET_YES if we have to abort due to failure. + */ + int failed; + +}; + + /** * Which currency is used by this exchange? */ @@ -62,10 +155,22 @@ static struct TALER_EXCHANGEDB_Plugin *db_plugin; static struct TALER_WIRE_Plugin *wire_plugin; /** - * Task for the main #run() function. + * Next task to run, if any. */ static struct GNUNET_SCHEDULER_Task *task; +/** + * If we are currently executing a transfer, information about + * the active transfer is here. Otherwise, this variable is NULL. + */ +static struct WirePrepareData *wpd; + +/** + * If we are currently aggregating transactions, information about the + * active aggregation is here. Otherwise, this variable is NULL. + */ +static struct AggregationUnit *au; + /** * Value to return from main(). #GNUNET_OK on success, #GNUNET_SYSERR * on serious errors. @@ -104,7 +209,36 @@ shutdown_task (void *cls, GNUNET_SCHEDULER_cancel (task); task = NULL; } - /* FIXME: other shutdown stuff here! */ + if (NULL != wpd) + { + if (NULL != wpd->eh) + { + wire_plugin->execute_wire_transfer_cancel (wire_plugin->cls, + wpd->eh); + wpd->eh = NULL; + } + db_plugin->rollback (db_plugin->cls, + wpd->session); + GNUNET_free (wpd); + wpd = NULL; + } + if (NULL != au) + { + if (NULL != au->ph) + { + wire_plugin->prepare_wire_transfer_cancel (wire_plugin->cls, + au->ph); + au->ph = NULL; + } + db_plugin->rollback (db_plugin->cls, + au->session); + GNUNET_free_non_null (au->additional_rows); + if (NULL != au->wire) + json_decref (au->wire); + au = NULL; + GNUNET_free (au); + + } } @@ -183,81 +317,11 @@ exchange_serve_process_config (const char *exchange_directory) } -/** - * Information about one aggregation process to - * be executed. - */ -struct AggregationUnit -{ - /** - * Public key of the merchant. - */ - struct TALER_MerchantPublicKeyP merchant_pub; - - /** - * Total amount to be transferred. - */ - struct TALER_Amount total_amount; - - /** - * Hash of @e wire. - */ - struct GNUNET_HashCode h_wire; - - /** - * Wire transfer identifier we use. - */ - struct TALER_WireTransferIdentifierRawP wtid; - - /** - * Row ID of the transaction that started it all. - */ - unsigned long long row_id; - - /** - * The current time. - */ - struct GNUNET_TIME_Absolute execution_time; - - /** - * Wire details of the merchant. - */ - json_t *wire; - - /** - * Database session for all of our transactions. - */ - struct TALER_EXCHANGEDB_Session *session; - - /** - * Wire preparation handle. - */ - struct TALER_WIRE_PrepareHandle *ph; - - /** - * Array of #aggregation_limit row_ids from the - * aggregation. - */ - unsigned long long *additional_rows; - - /** - * Offset specifying how many #additional_rows are in use. - */ - unsigned int rows_offset; - - /** - * Set to #GNUNET_YES if we have to abort due to failure. - */ - int failed; - -}; - - /** * Function called with details about deposits that have been made, * with the goal of executing the corresponding wire transaction. * - * @param cls closure with the `struct AggregationUnit` + * @param cls NULL * @param row_id identifies database entry * @param merchant_pub public key of the merchant * @param coin_pub public key of the coin @@ -282,8 +346,6 @@ deposit_cb (void *cls, struct GNUNET_TIME_Absolute wire_deadline, const json_t *wire) { - struct AggregationUnit *au = cls; - au->merchant_pub = *merchant_pub; if (GNUNET_OK != TALER_amount_subtract (&au->total_amount, @@ -337,7 +399,7 @@ deposit_cb (void *cls, * Function called with details about another deposit we * can aggregate into an existing aggregation unit. * - * @param cls closure with the `struct AggregationUnit` + * @param cls NULL * @param row_id identifies database entry * @param merchant_pub public key of the merchant * @param coin_pub public key of the coin @@ -362,7 +424,6 @@ aggregate_cb (void *cls, struct GNUNET_TIME_Absolute wire_deadline, const json_t *wire) { - struct AggregationUnit *au = cls; struct TALER_Amount delta; GNUNET_break (0 == @@ -459,7 +520,6 @@ run_aggregation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { struct TALER_EXCHANGEDB_Session *session; - struct AggregationUnit *au; unsigned int i; int ret; @@ -493,6 +553,7 @@ run_aggregation (void *cls, if (NULL != au->wire) json_decref (au->wire); GNUNET_free (au); + au = NULL; db_plugin->rollback (db_plugin->cls, session); if (0 != ret) @@ -533,6 +594,7 @@ run_aggregation (void *cls, if (NULL != au->wire) json_decref (au->wire); GNUNET_free (au); + au = NULL; db_plugin->rollback (db_plugin->cls, session); global_ret = GNUNET_SYSERR; @@ -563,6 +625,7 @@ run_aggregation (void *cls, if (NULL != au->wire) json_decref (au->wire); GNUNET_free (au); + au = NULL; return; } /* Mark transactions by row_id as minor */ @@ -591,6 +654,7 @@ run_aggregation (void *cls, if (NULL != au->wire) json_decref (au->wire); GNUNET_free (au); + au = NULL; /* start again */ task = GNUNET_SCHEDULER_add_now (&run_aggregation, NULL); @@ -602,9 +666,6 @@ run_aggregation (void *cls, &au->wtid, &prepare_cb, au); - /* FIXME: currently we have no clean-up plan on - shutdown to call prepare_wire_transfer_cancel! - Maybe make 'au' global? */ if (NULL == au->ph) { GNUNET_break (0); /* why? how to best recover? */ @@ -613,6 +674,7 @@ run_aggregation (void *cls, GNUNET_free_non_null (au->additional_rows); if (NULL != au->wire) json_decref (au->wire); + au = NULL; GNUNET_free (au); /* start again */ task = GNUNET_SCHEDULER_add_now (&run_aggregation, @@ -638,7 +700,7 @@ run_transfers (void *cls, /** * Function to be called with the prepared transfer data. * - * @param cls closure with the `struct AggregationUnit` + * @param cls NULL * @param buf transaction data to persist, NULL on error * @param buf_size number of bytes in @a buf, 0 on error */ @@ -647,13 +709,13 @@ prepare_cb (void *cls, const char *buf, size_t buf_size) { - struct AggregationUnit *au = cls; struct TALER_EXCHANGEDB_Session *session = au->session; GNUNET_free_non_null (au->additional_rows); if (NULL != au->wire) json_decref (au->wire); GNUNET_free (au); + au = NULL; if (NULL == buf) { GNUNET_break (0); /* why? how to best recover? */ @@ -702,34 +764,10 @@ prepare_cb (void *cls, } -/** - * Data we keep to #run_transfers(). - */ -struct WirePrepareData -{ - - /** - * Database session for all of our transactions. - */ - struct TALER_EXCHANGEDB_Session *session; - - /** - * Wire execution handle. - */ - struct TALER_WIRE_ExecuteHandle *eh; - - /** - * Row ID of the transfer. - */ - unsigned long long row_id; - -}; - - /** * Function called with the result from the execute step. * - * @param cls closure with the `struct WirePrepareData` + * @param cls NULL * @param success #GNUNET_OK on success, #GNUNET_SYSERR on failure * @param emsg NULL on success, otherwise an error message */ @@ -738,7 +776,6 @@ wire_confirm_cb (void *cls, int success, const char *emsg) { - struct WirePrepareData *wpd = cls; struct TALER_EXCHANGEDB_Session *session = wpd->session; wpd->eh = NULL; @@ -751,6 +788,7 @@ wire_confirm_cb (void *cls, session); global_ret = GNUNET_SYSERR; GNUNET_free (wpd); + wpd = NULL; return; } if (GNUNET_OK != @@ -763,9 +801,11 @@ wire_confirm_cb (void *cls, session); global_ret = GNUNET_SYSERR; GNUNET_free (wpd); + wpd = NULL; return; } GNUNET_free (wpd); + wpd = NULL; if (GNUNET_OK != db_plugin->commit (db_plugin->cls, session)) @@ -788,7 +828,7 @@ wire_confirm_cb (void *cls, /** * Callback with data about a prepared transaction. * - * @param cls closure with the `struct WirePrepareData` + * @param cls NULL * @param rowid row identifier used to mark prepared transaction as done * @param buf transaction data that was persisted, NULL on error * @param buf_size number of bytes in @a buf, 0 on error @@ -799,17 +839,12 @@ wire_prepare_cb (void *cls, const char *buf, size_t buf_size) { - struct WirePrepareData *wpd = cls; - wpd->row_id = rowid; wpd->eh = wire_plugin->execute_wire_transfer (wire_plugin->cls, buf, buf_size, &wire_confirm_cb, - wpd); - /* FIXME: currently we have no clean-up plan on - shutdown to call execute_wire_transfer_cancel! - Maybe make 'wpd' global? */ + NULL); if (NULL == wpd->eh) { GNUNET_break (0); /* why? how to best recover? */ @@ -817,6 +852,7 @@ wire_prepare_cb (void *cls, wpd->session); global_ret = GNUNET_SYSERR; GNUNET_free (wpd); + wpd = NULL; return; } } @@ -834,7 +870,6 @@ run_transfers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { int ret; - struct WirePrepareData *wpd; struct TALER_EXCHANGEDB_Session *session; if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) @@ -862,7 +897,7 @@ run_transfers (void *cls, session, exchange_wireformat, &wire_prepare_cb, - wpd); + NULL); if (GNUNET_SYSERR == ret) { GNUNET_break (0); /* why? how to best recover? */ @@ -870,6 +905,7 @@ run_transfers (void *cls, session); global_ret = GNUNET_SYSERR; GNUNET_free (wpd); + wpd = NULL; return; } if (GNUNET_NO == ret) @@ -880,6 +916,7 @@ run_transfers (void *cls, task = GNUNET_SCHEDULER_add_now (&run_aggregation, NULL); GNUNET_free (wpd); + wpd = NULL; return; } /* otherwise, continues in #wire_prepare_cb() */ From aee021aa3701213471dff9f378c58a0a0599f9b6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 6 Apr 2016 11:27:51 +0200 Subject: [PATCH 65/91] update ignore file, fix compiler warning --- .gitignore | 2 +- src/json/json.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 81be5b2f5..ce73b4d26 100644 --- a/.gitignore +++ b/.gitignore @@ -38,7 +38,7 @@ src/exchange-tools/taler-exchange-dbinit src/exchange-tools/taler-exchange-keycheck src/exchange-tools/taler-exchange-keyup src/exchange-tools/taler-exchange-reservemod -src/exchange-tools/taler-exchange-sepa +src/exchange-tools/taler-exchange-wire src/exchangedb/perf-exchangedb src/json/test_json src/wire/test_sepa_wireformat diff --git a/src/json/json.c b/src/json/json.c index 1fbc59a73..da9e8b9f8 100644 --- a/src/json/json.c +++ b/src/json/json.c @@ -32,7 +32,7 @@ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ int -TALER_JSON_hash (json_t *json, +TALER_JSON_hash (const json_t *json, struct GNUNET_HashCode *hc) { char *wire_enc; From a96c7177aae60c37041406ff0879992e58ef2f50 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 6 Apr 2016 12:04:51 +0200 Subject: [PATCH 66/91] get simple aggregation test to pass --- src/exchange/taler-exchange-aggregator.c | 42 ++++++++++++++++--- src/exchange/test_taler_exchange_aggregator.c | 22 +++++----- src/wire/plugin_wire_test.c | 2 +- 3 files changed, 50 insertions(+), 16 deletions(-) diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c index 3726d32fa..def6d0be4 100644 --- a/src/exchange/taler-exchange-aggregator.c +++ b/src/exchange/taler-exchange-aggregator.c @@ -237,8 +237,9 @@ shutdown_task (void *cls, json_decref (au->wire); au = NULL; GNUNET_free (au); - } + TALER_EXCHANGEDB_plugin_unload (db_plugin); + TALER_WIRE_plugin_unload (wire_plugin); } @@ -366,6 +367,9 @@ deposit_cb (void *cls, GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE, &au->wtid, sizeof (au->wtid)); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Starting aggregation under WTID %s\n", + TALER_B2S (&au->wtid)); if (GNUNET_OK != db_plugin->insert_aggregation_tracking (db_plugin->cls, au->session, @@ -523,8 +527,11 @@ run_aggregation (void *cls, unsigned int i; int ret; + task = NULL; if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) return; + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Checking for ready deposits to aggregate\n"); if (NULL == (session = db_plugin->get_session (db_plugin->cls, test_mode))) { @@ -563,6 +570,8 @@ run_aggregation (void *cls, global_ret = GNUNET_SYSERR; return; } + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "No more ready deposits, going to sleep\n"); if (GNUNET_YES == test_mode) { /* in test mode, shutdown if we end up being idle */ @@ -578,6 +587,9 @@ run_aggregation (void *cls, return; } /* Now try to find other deposits to aggregate */ + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Found ready deposit for %s, aggregating\n", + TALER_B2S (&au->merchant_pub)); ret = db_plugin->iterate_matching_deposits (db_plugin->cls, session, &au->h_wire, @@ -608,6 +620,8 @@ run_aggregation (void *cls, if ( (0 == au->total_amount.value) && (0 == au->total_amount.fraction) ) { + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Aggregate value too low for transfer\n"); /* Rollback ongoing transaction, as we will not use the respective WTID and thus need to remove the tracking data */ db_plugin->rollback (db_plugin->cls, @@ -660,6 +674,15 @@ run_aggregation (void *cls, NULL); return; } + { + char *amount_s; + + amount_s = TALER_amount_to_string (&au->total_amount); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Preparing wire transfer of %s to %s\n", + amount_s, + TALER_B2S (&au->merchant_pub)); + } au->ph = wire_plugin->prepare_wire_transfer (wire_plugin->cls, au->wire, &au->total_amount, @@ -757,7 +780,8 @@ prepare_cb (void *cls, NULL); return; } - + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Preparation complete, switching to transfer mode\n"); /* run alternative task: actually do wire transfer! */ task = GNUNET_SCHEDULER_add_now (&run_transfers, NULL); @@ -817,6 +841,8 @@ wire_confirm_cb (void *cls, NULL); return; } + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Wire transfer complete\n"); /* continue with #run_transfers(), just to guard against the unlikely case that there are more. */ task = GNUNET_SCHEDULER_add_now (&run_transfers, @@ -840,6 +866,9 @@ wire_prepare_cb (void *cls, size_t buf_size) { wpd->row_id = rowid; + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Starting wire transfer %llu\n", + rowid); wpd->eh = wire_plugin->execute_wire_transfer (wire_plugin->cls, buf, buf_size, @@ -872,6 +901,9 @@ run_transfers (void *cls, int ret; struct TALER_EXCHANGEDB_Session *session; + task = NULL; + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Checking for pending wire transfers\n"); if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) return; if (NULL == (session = db_plugin->get_session (db_plugin->cls, @@ -911,6 +943,8 @@ run_transfers (void *cls, if (GNUNET_NO == ret) { /* no more prepared wire transfers, go back to aggregation! */ + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "No more pending wire transfers, starting aggregation\n"); db_plugin->rollback (db_plugin->cls, session); task = GNUNET_SCHEDULER_add_now (&run_aggregation, @@ -934,7 +968,7 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { task = GNUNET_SCHEDULER_add_now (&run_transfers, - cls); + NULL); GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task, cls); @@ -991,8 +1025,6 @@ main (int argc, global_ret = GNUNET_OK; GNUNET_SCHEDULER_run (&run, NULL); - TALER_EXCHANGEDB_plugin_unload (db_plugin); - TALER_WIRE_plugin_unload (wire_plugin); return (GNUNET_SYSERR == global_ret) ? 1 : 0; } diff --git a/src/exchange/test_taler_exchange_aggregator.c b/src/exchange/test_taler_exchange_aggregator.c index 22bc8e277..f34dea837 100644 --- a/src/exchange/test_taler_exchange_aggregator.c +++ b/src/exchange/test_taler_exchange_aggregator.c @@ -668,25 +668,19 @@ run_test () .label = "run-aggregator-deposit-1" }, - /* The above step is already known to fail (with an error message) - right now, so we skip the rest of the test. */ - { - .opcode = OPCODE_TERMINATE_SKIP, - .label = "testcase-incomplete-terminating-with-skip" - }, - - { .opcode = OPCODE_EXPECT_TRANSACTION, .label = "expect-deposit-1", - .details.expect_transaction.debit_account = 1, + .details.expect_transaction.debit_account = 3, .details.expect_transaction.credit_account = 4, .details.expect_transaction.amount = "EUR:1" }, + { .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY, .label = "expect-empty-transactions-on-start" }, + /* test idempotency: run again on transactions already done */ { .opcode = OPCODE_DATABASE_DEPOSIT, @@ -703,6 +697,11 @@ run_test () .label = "expect-empty-transactions-on-start" }, + { + .opcode = OPCODE_TERMINATE_SUCCESS, + .label = "testcase-incomplete-terminating-with-skip" + }, + { .opcode = OPCODE_TERMINATE_SKIP, .label = "testcase-incomplete-terminating-with-skip" @@ -804,7 +803,6 @@ handle_mhd_request (void *cls, GNUNET_break_op (0); return MHD_NO; } - /* FIXME: to be implemented! */ pr = GNUNET_JSON_post_parser (REQUEST_BUFFER_MAX, con_cls, upload_data, @@ -848,6 +846,10 @@ handle_mhd_request (void *cls, transactions_tail, t); } + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Receiving incoming wire transfer: %llu->%llu\n", + (unsigned long long) t->debit_account, + (unsigned long long) t->credit_account); json_decref (json); resp = MHD_create_response_from_buffer (0, "", MHD_RESPMEM_PERSISTENT); ret = MHD_queue_response (connection, diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c index 357449af6..9d0667680 100644 --- a/src/wire/plugin_wire_test.c +++ b/src/wire/plugin_wire_test.c @@ -178,7 +178,7 @@ context_task (void *cls, rs, ws, &context_task, - cls); + tc); GNUNET_NETWORK_fdset_destroy (rs); GNUNET_NETWORK_fdset_destroy (ws); } From d28d1e82f3192cae9219ca038f9f0f29aaaaffb2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 7 Apr 2016 09:27:55 +0200 Subject: [PATCH 67/91] install configuration template file in share/taler/config.d/ --- src/exchange/Makefile.am | 5 +++++ src/exchange/exchange.conf | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 src/exchange/exchange.conf diff --git a/src/exchange/Makefile.am b/src/exchange/Makefile.am index a7e175929..68689da22 100644 --- a/src/exchange/Makefile.am +++ b/src/exchange/Makefile.am @@ -6,6 +6,11 @@ if USE_COVERAGE XLIB = -lgcov endif +pkgcfgdir= $(pkgdatadir)/config.d/ + +pkgcfg_DATA = \ + exchange.conf + bin_PROGRAMS = \ taler-exchange-aggregator \ taler-exchange-httpd diff --git a/src/exchange/exchange.conf b/src/exchange/exchange.conf new file mode 100644 index 000000000..6a4f03ac1 --- /dev/null +++ b/src/exchange/exchange.conf @@ -0,0 +1,38 @@ +[exchange] +# Currency supported by the exchange (can only be one) +# CURRENCY = EUR + +# Wire format supported by the exchange We use 'test' for testing of +# the actual coin operations. +WIREFORMAT = test + +# HTTP port the exchange listens to +PORT = 8081 + +# Master public key used to sign the exchange's various keys +# MASTER_PUBLIC_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG + +# How to access our database +DB = postgres + +# Is this is a testcase, use transient DB actions? +# TESTRUN = YES + +[exchangedb-postgres] +DB_CONN_STR = "postgres:///taler" + + +[wire-incoming-test] +# What is the main website of the bank? +BANK_URI = "http://localhost:8082/" +# Into which account at the 'bank' should incoming +# wire transfers be made? +BANK_ACCOUNT_NUMBER = 2 + +[wire-outgoing-test] +# What is the main website of the bank? +BANK_URI = "http://localhost:8082/" + +# From which account at the 'bank' should outgoing +# wire transfers be made? +BANK_ACCOUNT_NUMBER = 3 From 8df75214f459fd39ce43540dc604733c1a47515e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 7 Apr 2016 09:30:58 +0200 Subject: [PATCH 68/91] install data and plugins in taler-exchange, not taler --- src/exchangedb/Makefile.am | 2 +- src/util/os_installation.c | 2 +- src/wire/Makefile.am | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/exchangedb/Makefile.am b/src/exchangedb/Makefile.am index 416d5688f..b3637346b 100644 --- a/src/exchangedb/Makefile.am +++ b/src/exchangedb/Makefile.am @@ -6,7 +6,7 @@ if USE_COVERAGE XLIB = -lgcov endif -plugindir = $(libdir)/taler +plugindir = $(libdir)/taler-exchange if HAVE_POSTGRESQL plugin_LTLIBRARIES = \ diff --git a/src/util/os_installation.c b/src/util/os_installation.c index 4fce72ee9..22e0133cd 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c @@ -33,7 +33,7 @@ */ static const struct GNUNET_OS_ProjectData taler_pd = { .libname = "libtalerutil", - .project_dirname = "taler", + .project_dirname = "taler-exchange", .binary_name = "taler-exchange-httpd", .env_varname = "TALER_PREFIX" }; diff --git a/src/wire/Makefile.am b/src/wire/Makefile.am index fd59c8eb7..16ef1ded0 100644 --- a/src/wire/Makefile.am +++ b/src/wire/Makefile.am @@ -6,7 +6,7 @@ if USE_COVERAGE XLIB = -lgcov endif -plugindir = $(libdir)/taler +plugindir = $(libdir)/taler-exchange plugin_LTLIBRARIES = \ libtaler_plugin_wire_sepa.la \ From d986269dae21c52321341e1980a464494a3fe87b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 7 Apr 2016 11:09:30 +0200 Subject: [PATCH 69/91] for #4374 --- src/exchange/Makefile.am | 2 +- src/exchangedb/Makefile.am | 2 +- src/util/os_installation.c | 2 +- src/wire/Makefile.am | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/exchange/Makefile.am b/src/exchange/Makefile.am index 68689da22..df939d3ee 100644 --- a/src/exchange/Makefile.am +++ b/src/exchange/Makefile.am @@ -6,7 +6,7 @@ if USE_COVERAGE XLIB = -lgcov endif -pkgcfgdir= $(pkgdatadir)/config.d/ +pkgcfgdir = $(prefix)/share/taler/config.d/ pkgcfg_DATA = \ exchange.conf diff --git a/src/exchangedb/Makefile.am b/src/exchangedb/Makefile.am index 914153f6f..0a7b0447c 100644 --- a/src/exchangedb/Makefile.am +++ b/src/exchangedb/Makefile.am @@ -6,7 +6,7 @@ if USE_COVERAGE XLIB = -lgcov endif -plugindir = $(libdir)/taler-exchange +plugindir = $(libdir)/taler if HAVE_POSTGRESQL plugin_LTLIBRARIES = \ diff --git a/src/util/os_installation.c b/src/util/os_installation.c index 22e0133cd..4fce72ee9 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c @@ -33,7 +33,7 @@ */ static const struct GNUNET_OS_ProjectData taler_pd = { .libname = "libtalerutil", - .project_dirname = "taler-exchange", + .project_dirname = "taler", .binary_name = "taler-exchange-httpd", .env_varname = "TALER_PREFIX" }; diff --git a/src/wire/Makefile.am b/src/wire/Makefile.am index 16ef1ded0..fd59c8eb7 100644 --- a/src/wire/Makefile.am +++ b/src/wire/Makefile.am @@ -6,7 +6,7 @@ if USE_COVERAGE XLIB = -lgcov endif -plugindir = $(libdir)/taler-exchange +plugindir = $(libdir)/taler plugin_LTLIBRARIES = \ libtaler_plugin_wire_sepa.la \ From e00370d4f528bcb38836153c2c1d3bc38a0eae4e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 7 Apr 2016 22:52:23 +0200 Subject: [PATCH 70/91] removing duplication of --help logic --- src/exchange-tools/taler-auditor-sign.c | 3 +- src/exchange-tools/taler-exchange-keyup.c | 2 +- .../taler-exchange-reservemod.c | 2 +- src/exchange-tools/taler-exchange-wire.c | 2 +- src/exchange/taler-exchange-aggregator.c | 3 +- src/exchange/taler-exchange-httpd.c | 2 +- src/include/taler_util.h | 24 ---- src/util/os_installation.c | 6 +- src/util/util.c | 108 ------------------ 9 files changed, 10 insertions(+), 142 deletions(-) diff --git a/src/exchange-tools/taler-auditor-sign.c b/src/exchange-tools/taler-auditor-sign.c index bde34b2a3..870f889ea 100644 --- a/src/exchange-tools/taler-auditor-sign.c +++ b/src/exchange-tools/taler-auditor-sign.c @@ -135,14 +135,13 @@ main (int argc, {'a', "auditor-key", "FILE", "file containing the private key of the auditor", 1, &GNUNET_GETOPT_set_filename, &auditor_key_file}, - TALER_GETOPT_OPTION_HELP ("Private key of the auditor to use for signing"), + GNUNET_GETOPT_OPTION_HELP ("Private key of the auditor to use for signing"), {'m', "exchange-key", "KEY", "public key of the exchange (Crockford base32 encoded)", 1, &GNUNET_GETOPT_set_filename, &exchange_public_key}, {'u', "auditor-url", "URL", "URL of the auditor (informative link for the user)", 1, &GNUNET_GETOPT_set_string, &auditor_url}, - TALER_GETOPT_OPTION_HELP ("Private key of the auditor to use for signing"), {'r', "exchange-request", "FILE", "set of keys the exchange requested the auditor to sign", 1, &GNUNET_GETOPT_set_string, &exchange_request_file}, diff --git a/src/exchange-tools/taler-exchange-keyup.c b/src/exchange-tools/taler-exchange-keyup.c index 861a9a7c8..3413dfb42 100644 --- a/src/exchange-tools/taler-exchange-keyup.c +++ b/src/exchange-tools/taler-exchange-keyup.c @@ -880,7 +880,7 @@ main (int argc, {'d', "exchange-dir", "DIR", "exchange directory with keys to update", 1, &GNUNET_GETOPT_set_filename, &exchange_directory}, - TALER_GETOPT_OPTION_HELP ("Setup signing and denomination keys for a Taler exchange"), + GNUNET_GETOPT_OPTION_HELP ("Setup signing and denomination keys for a Taler exchange"), {'m', "master-key", "FILE", "master key file (private key)", 1, &GNUNET_GETOPT_set_filename, &masterkeyfile}, diff --git a/src/exchange-tools/taler-exchange-reservemod.c b/src/exchange-tools/taler-exchange-reservemod.c index 984b7f8ee..03a0d17d5 100644 --- a/src/exchange-tools/taler-exchange-reservemod.c +++ b/src/exchange-tools/taler-exchange-reservemod.c @@ -69,7 +69,7 @@ main (int argc, char *const *argv) {'D', "details", "JSON", "details about the bank transaction which justify why we add this amount", 1, &GNUNET_GETOPT_set_string, &details}, - TALER_GETOPT_OPTION_HELP ("Deposit funds into a Taler reserve"), + GNUNET_GETOPT_OPTION_HELP ("Deposit funds into a Taler reserve"), {'R', "reserve", "KEY", "reserve (public key) to modify", 1, &GNUNET_GETOPT_set_string, &reserve_pub_str}, diff --git a/src/exchange-tools/taler-exchange-wire.c b/src/exchange-tools/taler-exchange-wire.c index 22721a424..5bb4835de 100644 --- a/src/exchange-tools/taler-exchange-wire.c +++ b/src/exchange-tools/taler-exchange-wire.c @@ -72,7 +72,7 @@ main (int argc, {'o', "output", "FILE", "where to write the result", 1, &GNUNET_GETOPT_set_filename, &output_filename}, - TALER_GETOPT_OPTION_HELP ("Setup /wire response"), + GNUNET_GETOPT_OPTION_HELP ("Setup /wire response"), GNUNET_GETOPT_OPTION_VERSION (VERSION "-" VCS_VERSION), GNUNET_GETOPT_OPTION_END }; diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c index def6d0be4..80d1bbb9f 100644 --- a/src/exchange/taler-exchange-aggregator.c +++ b/src/exchange/taler-exchange-aggregator.c @@ -993,11 +993,10 @@ main (int argc, {'f', "format", "WIREFORMAT", "wireformat to use, overrides WIREFORMAT option in [exchange] section", 1, &GNUNET_GETOPT_set_filename, &exchange_wireformat}, - TALER_GETOPT_OPTION_HELP ("background process that aggregates and executes wire transfers to merchants"), + GNUNET_GETOPT_OPTION_HELP ("background process that aggregates and executes wire transfers to merchants"), {'t', "test", NULL, "run in test mode with temporary tables", 0, &GNUNET_GETOPT_set_one, &test_mode}, - TALER_GETOPT_OPTION_HELP ("background process that aggregates and executes wire transfers to merchants"), GNUNET_GETOPT_OPTION_VERSION (VERSION "-" VCS_VERSION), GNUNET_GETOPT_OPTION_END }; diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index 93636b00c..3061443b5 100644 --- a/src/exchange/taler-exchange-httpd.c +++ b/src/exchange/taler-exchange-httpd.c @@ -630,7 +630,7 @@ main (int argc, "run in test-mode using FILENAME as the HTTP request to process", 1, &GNUNET_GETOPT_set_filename, &input_filename}, #endif - TALER_GETOPT_OPTION_HELP ("HTTP server providing a RESTful API to access a Taler exchange"), + GNUNET_GETOPT_OPTION_HELP ("HTTP server providing a RESTful API to access a Taler exchange"), GNUNET_GETOPT_OPTION_VERSION (VERSION "-" VCS_VERSION), GNUNET_GETOPT_OPTION_END }; diff --git a/src/include/taler_util.h b/src/include/taler_util.h index 797b6691b..425304152 100644 --- a/src/include/taler_util.h +++ b/src/include/taler_util.h @@ -121,28 +121,4 @@ TALER_config_get_denom (struct GNUNET_CONFIGURATION_Handle *cfg, struct TALER_Amount *denom); -/** - * Print out details on command line options (implements --help). - * - * @param ctx command line processing context - * @param scls additional closure (points to about text) - * @param option name of the option - * @param value not used (NULL) - * @return #GNUNET_NO (do not continue, not an error) - */ -int -TALER_GETOPT_format_help_ (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, - void *scls, - const char *option, - const char *value); - -/** - * Macro defining the option to print the command line - * help text (-h option). - * - * @param about string with brief description of the application - */ -#define TALER_GETOPT_OPTION_HELP(about) \ - { 'h', "help", (const char *) NULL, gettext_noop("print this help"), 0, &TALER_GETOPT_format_help_, (void *) about } - #endif diff --git a/src/util/os_installation.c b/src/util/os_installation.c index 4fce72ee9..5aa34f1b9 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c @@ -35,12 +35,14 @@ static const struct GNUNET_OS_ProjectData taler_pd = { .libname = "libtalerutil", .project_dirname = "taler", .binary_name = "taler-exchange-httpd", - .env_varname = "TALER_PREFIX" + .env_varname = "TALER_PREFIX", + .bug_email = "taler@gnu.org", + .homepage = "http://www.gnu.org/s/taler/", }; /** - * Return default project data used by gnunet-gtk. + * Return default project data used by Taler. */ const struct GNUNET_OS_ProjectData * TALER_project_data_default (void) diff --git a/src/util/util.c b/src/util/util.c index 6dcd0dc29..434ce8a9d 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -116,112 +116,4 @@ TALER_config_load (const char *base_dir) } - -/** - * At what offset does the help text start? - */ -#define BORDER 29 - -/** - * Print out details on command line options (implements --help). - * - * @param ctx command line processing context - * @param scls additional closure (points to about text) - * @param option name of the option - * @param value not used (NULL) - * @return #GNUNET_NO (do not continue, not an error) - */ -int -TALER_GETOPT_format_help_ (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, - void *scls, - const char *option, - const char *value) -{ - const char *about = scls; - size_t slen; - unsigned int i; - int j; - size_t ml; - size_t p; - char *scp; - const char *trans; - const struct GNUNET_GETOPT_CommandLineOption *opt; - - if (NULL != about) - { - printf ("%s\n%s\n", - ctx->binaryOptions, - gettext (about)); - printf (_("Arguments mandatory for long options are also mandatory for short options.\n")); - } - opt = ctx->allOptions; - for (i=0;NULL != opt[i].description;i++) - { - if (opt[i].shortName == '\0') - printf (" "); - else - printf (" -%c, ", opt[i].shortName); - printf ("--%s", opt[i].name); - slen = 8 + strlen (opt[i].name); - if (opt[i].argumentHelp != NULL) - { - printf ("=%s", opt[i].argumentHelp); - slen += 1 + strlen (opt[i].argumentHelp); - } - if (slen > BORDER) - { - printf ("\n%*s", BORDER, ""); - slen = BORDER; - } - if (slen < BORDER) - { - printf ("%*s", (int) (BORDER - slen), ""); - slen = BORDER; - } - if (0 < strlen (opt[i].description)) - trans = gettext (opt[i].description); - else - trans = ""; - ml = strlen (trans); - p = 0; -OUTER: - while (ml - p > 78 - slen) - { - for (j = p + 78 - slen; j > p; j--) - { - if (isspace ((unsigned char) trans[j])) - { - scp = GNUNET_malloc (j - p + 1); - memcpy (scp, &trans[p], j - p); - scp[j - p] = '\0'; - printf ("%s\n%*s", scp, BORDER + 2, ""); - GNUNET_free (scp); - p = j + 1; - slen = BORDER + 2; - goto OUTER; - } - } - /* could not find space to break line */ - scp = GNUNET_malloc (78 - slen + 1); - memcpy (scp, &trans[p], 78 - slen); - scp[78 - slen] = '\0'; - printf ("%s\n%*s", scp, BORDER + 2, ""); - GNUNET_free (scp); - slen = BORDER + 2; - p = p + 78 - slen; - } - /* print rest */ - if (p < ml) - printf ("%s\n", &trans[p]); - if (strlen (trans) == 0) - printf ("\n"); - } - printf ("Report bugs to taler@gnu.org.\n" - "Taler home page: http://www.gnu.org/software/taler/\n" - "General help using GNU software: http://www.gnu.org/gethelp/\n"); - return GNUNET_NO; -} - - - /* end of util.c */ From 43e9ac94719de85de232fc976420e7f18e073d93 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 7 Apr 2016 23:06:05 +0200 Subject: [PATCH 71/91] recent changes to GNUNET_OS-IPK logic make plugin.c obsolete --- src/util/Makefile.am | 3 +- src/util/plugin.c | 88 -------------------------------------------- 2 files changed, 1 insertion(+), 90 deletions(-) delete mode 100644 src/util/plugin.c diff --git a/src/util/Makefile.am b/src/util/Makefile.am index e4352852c..54f0f0e38 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -31,8 +31,7 @@ libtalerutil_la_SOURCES = \ amount.c \ crypto.c \ util.c \ - os_installation.c \ - plugin.c + os_installation.c libtalerutil_la_LIBADD = \ -lgnunetutil \ diff --git a/src/util/plugin.c b/src/util/plugin.c deleted file mode 100644 index 65c28fa2b..000000000 --- a/src/util/plugin.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2015 GNUnet e.V. - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - TALER; see the file COPYING. If not, If not, see -*/ -/** - * @file util/plugin.c - * @brief Setup paths so that we can load Taler plugins - * @author Christian Grothoff - * @author Sree Harsha Totakura - */ -#include "platform.h" -#include "taler_util.h" -#include - -/** - * Libtool search path before we started. - */ -static char *old_dlsearchpath; - - -/** - * Setup libtool paths. - */ -void __attribute__ ((constructor)) -plugin_init () -{ - int err; - const char *opath; - char *path; - char *cpath; - - err = lt_dlinit (); - if (err > 0) - { - FPRINTF (stderr, - _("Initialization of plugin mechanism failed: %s!\n"), - lt_dlerror ()); - return; - } - opath = lt_dlgetsearchpath (); - if (NULL != opath) - old_dlsearchpath = GNUNET_strdup (opath); - path = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_LIBDIR); - if (NULL != path) - { - if (NULL != opath) - { - GNUNET_asprintf (&cpath, "%s:%s", opath, path); - lt_dlsetsearchpath (cpath); - GNUNET_free (path); - GNUNET_free (cpath); - } - else - { - lt_dlsetsearchpath (path); - GNUNET_free (path); - } - } -} - - -/** - * Shutdown libtool. - */ -void __attribute__ ((destructor)) -plugin_fini () -{ - lt_dlsetsearchpath (old_dlsearchpath); - if (NULL != old_dlsearchpath) - { - GNUNET_free (old_dlsearchpath); - old_dlsearchpath = NULL; - } - lt_dlexit (); -} - -/* end of plugin.c */ From df893df505683aef0d2f484944e417ec1bcdf4aa Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 9 Apr 2016 01:56:24 +0200 Subject: [PATCH 72/91] fix make dist rules --- src/exchange/Makefile.am | 3 ++- src/exchangedb/Makefile.am | 8 ++++---- src/include/Makefile.am | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/exchange/Makefile.am b/src/exchange/Makefile.am index df939d3ee..e815d911b 100644 --- a/src/exchange/Makefile.am +++ b/src/exchange/Makefile.am @@ -88,4 +88,5 @@ TESTS = \ EXTRA_DIST = \ - test-taler-exchange-aggregator-postgres.conf + test-taler-exchange-aggregator-postgres.conf \ + exchange.conf diff --git a/src/exchangedb/Makefile.am b/src/exchangedb/Makefile.am index 0a7b0447c..fff112994 100644 --- a/src/exchangedb/Makefile.am +++ b/src/exchangedb/Makefile.am @@ -87,8 +87,8 @@ test_exchangedb_postgres_LDADD = \ test_perf_taler_exchangedb_SOURCES = \ test_perf_taler_exchangedb.c \ - perf_taler_exchangedb_init.c \ - perf_taler_exchangedb_interpreter.c + perf_taler_exchangedb_init.c perf_taler_exchangedb_init.h \ + perf_taler_exchangedb_interpreter.c perf_taler_exchangedb_interpreter.h test_perf_taler_exchangedb_LDADD = \ libtalerexchangedb.la \ $(top_srcdir)/src/util/libtalerutil.la \ @@ -98,8 +98,8 @@ test_perf_taler_exchangedb_LDADD = \ perf_exchangedb_SOURCES = \ perf_taler_exchangedb.c \ - perf_taler_exchangedb_init.c \ - perf_taler_exchangedb_interpreter.c + perf_taler_exchangedb_init.c perf_taler_exchangedb_init.h \ + perf_taler_exchangedb_interpreter.c perf_taler_exchangedb_interpreter.h perf_exchangedb_LDADD = \ libtalerexchangedb.la \ $(top_srcdir)/src/util/libtalerutil.la \ diff --git a/src/include/Makefile.am b/src/include/Makefile.am index 6f7f53acb..310263f0b 100644 --- a/src/include/Makefile.am +++ b/src/include/Makefile.am @@ -13,6 +13,7 @@ else talerinclude_HEADERS = \ platform.h \ taler_amount_lib.h \ + taler_bank_service.h \ taler_crypto_lib.h \ taler_json_lib.h \ taler_util.h \ From 0dee91e014a51a5b66cd1b0a9a7517ac75813eb6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 10 Apr 2016 00:57:20 +0200 Subject: [PATCH 73/91] changing code to meet latest change in GNUNET_SCHEDULER API --- src/bank-lib/test_bank_api.c | 28 +++++----------- src/exchange-lib/test_exchange_api.c | 28 +++++----------- src/exchange/taler-exchange-aggregator.c | 23 ++++++------- src/exchange/test_taler_exchange_aggregator.c | 32 ++++++------------- src/exchangedb/test_exchangedb.c | 4 +-- src/wire/plugin_wire_test.c | 8 ++--- 6 files changed, 38 insertions(+), 85 deletions(-) diff --git a/src/bank-lib/test_bank_api.c b/src/bank-lib/test_bank_api.c index 66f3557b9..cc1086e73 100644 --- a/src/bank-lib/test_bank_api.c +++ b/src/bank-lib/test_bank_api.c @@ -163,11 +163,9 @@ struct InterpreterState * Task that runs the context's event loop with the GNUnet scheduler. * * @param cls unused - * @param tc scheduler context (unused) */ static void -context_task (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc); +context_task (void *cls); /** @@ -233,11 +231,9 @@ find_command (const struct InterpreterState *is, * Run the main interpreter loop that performs bank operations. * * @param cls contains the `struct InterpreterState` - * @param tc scheduler context */ static void -interpreter_run (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc); +interpreter_run (void *cls); /** @@ -281,17 +277,17 @@ add_incoming_cb (void *cls, * Run the main interpreter loop that performs bank operations. * * @param cls contains the `struct InterpreterState` - * @param tc scheduler context */ static void -interpreter_run (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc) +interpreter_run (void *cls) { struct InterpreterState *is = cls; struct Command *cmd = &is->commands[is->ip]; struct TALER_Amount amount; + const struct GNUNET_SCHEDULER_TaskContext *tc; is->task = NULL; + tc = GNUNET_SCHEDULER_get_task_context (); if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) { fprintf (stderr, @@ -354,11 +350,9 @@ interpreter_run (void *cls, * Cleans up our state. * * @param cls the interpreter state. - * @param tc unused */ static void -do_shutdown (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc) +do_shutdown (void *cls) { struct InterpreterState *is = cls; struct Command *cmd; @@ -415,11 +409,9 @@ do_shutdown (void *cls, * Task that runs the context's event loop with the GNUnet scheduler. * * @param cls unused - * @param tc scheduler context (unused) */ static void -context_task (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc) +context_task (void *cls) { long timeout; int max_fd; @@ -471,13 +463,9 @@ context_task (void *cls, * Main function that will be run by the scheduler. * * @param cls closure - * @param args remaining command-line arguments - * @param cfgfile name of the configuration file used (for saving, can be NULL!) - * @param config configuration */ static void -run (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc) +run (void *cls) { struct InterpreterState *is; static struct Command commands[] = diff --git a/src/exchange-lib/test_exchange_api.c b/src/exchange-lib/test_exchange_api.c index bfe54d507..c7eb9e314 100644 --- a/src/exchange-lib/test_exchange_api.c +++ b/src/exchange-lib/test_exchange_api.c @@ -573,11 +573,9 @@ struct InterpreterState * Task that runs the context's event loop with the GNUnet scheduler. * * @param cls unused - * @param tc scheduler context (unused) */ static void -context_task (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc); +context_task (void *cls); /** @@ -641,11 +639,9 @@ find_command (const struct InterpreterState *is, * Run the main interpreter loop that performs exchange operations. * * @param cls contains the `struct InterpreterState` - * @param tc scheduler context */ static void -interpreter_run (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc); +interpreter_run (void *cls); /** @@ -1414,11 +1410,9 @@ deposit_wtid_cb (void *cls, * Run the main interpreter loop that performs exchange operations. * * @param cls contains the `struct InterpreterState` - * @param tc scheduler context */ static void -interpreter_run (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc) +interpreter_run (void *cls) { struct InterpreterState *is = cls; struct Command *cmd = &is->commands[is->ip]; @@ -1428,8 +1422,10 @@ interpreter_run (void *cls, struct TALER_Amount amount; struct GNUNET_TIME_Absolute execution_date; json_t *wire; + const struct GNUNET_SCHEDULER_TaskContext *tc; is->task = NULL; + tc = GNUNET_SCHEDULER_get_task_context (); if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) { fprintf (stderr, @@ -1993,11 +1989,9 @@ interpreter_run (void *cls, * Cleans up our state. * * @param cls the interpreter state. - * @param tc unused */ static void -do_shutdown (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc) +do_shutdown (void *cls) { struct InterpreterState *is = cls; struct Command *cmd; @@ -2218,11 +2212,9 @@ cert_cb (void *cls, * Task that runs the context's event loop with the GNUnet scheduler. * * @param cls unused - * @param tc scheduler context (unused) */ static void -context_task (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc) +context_task (void *cls) { long timeout; int max_fd; @@ -2274,13 +2266,9 @@ context_task (void *cls, * Main function that will be run by the scheduler. * * @param cls closure - * @param args remaining command-line arguments - * @param cfgfile name of the configuration file used (for saving, can be NULL!) - * @param config configuration */ static void -run (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc) +run (void *cls) { struct InterpreterState *is; static struct MeltDetails melt_coins_1[] = { diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c index 80d1bbb9f..2ff3c2ca8 100644 --- a/src/exchange/taler-exchange-aggregator.c +++ b/src/exchange/taler-exchange-aggregator.c @@ -198,11 +198,9 @@ static unsigned int aggregation_limit = TALER_EXCHANGEDB_MATCHING_DEPOSITS_LIMIT * We're being aborted with CTRL-C (or SIGTERM). Shut down. * * @param cls closure - * @param tc scheduler context */ static void -shutdown_task (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc) +shutdown_task (void *cls) { if (NULL != task) { @@ -517,17 +515,17 @@ prepare_cb (void *cls, * into larger wire transfers. * * @param cls NULL - * @param tc scheduler context */ static void -run_aggregation (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc) +run_aggregation (void *cls) { struct TALER_EXCHANGEDB_Session *session; unsigned int i; int ret; + const struct GNUNET_SCHEDULER_TaskContext *tc; task = NULL; + tc = GNUNET_SCHEDULER_get_task_context (); if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) return; GNUNET_log (GNUNET_ERROR_TYPE_INFO, @@ -713,11 +711,9 @@ run_aggregation (void *cls, * do. * * @param cls pointer to an `int` which we will return from main() - * @param tc scheduler context */ static void -run_transfers (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc); +run_transfers (void *cls); /** @@ -895,15 +891,16 @@ wire_prepare_cb (void *cls, * @param tc scheduler context */ static void -run_transfers (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc) +run_transfers (void *cls) { int ret; struct TALER_EXCHANGEDB_Session *session; + const struct GNUNET_SCHEDULER_TaskContext *tc; task = NULL; GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Checking for pending wire transfers\n"); + tc = GNUNET_SCHEDULER_get_task_context (); if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) return; if (NULL == (session = db_plugin->get_session (db_plugin->cls, @@ -961,11 +958,9 @@ run_transfers (void *cls, * First task. * * @param cls closure, NULL - * @param tc scheduler context */ static void -run (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc) +run (void *cls) { task = GNUNET_SCHEDULER_add_now (&run_transfers, NULL); diff --git a/src/exchange/test_taler_exchange_aggregator.c b/src/exchange/test_taler_exchange_aggregator.c index f34dea837..3720ce829 100644 --- a/src/exchange/test_taler_exchange_aggregator.c +++ b/src/exchange/test_taler_exchange_aggregator.c @@ -305,22 +305,18 @@ static struct GNUNET_CRYPTO_RsaPublicKey *coin_pub; * Interprets the commands from the test program. * * @param cls the `struct State` of the interpreter - * @param tc scheduler context */ static void -interpreter (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc); +interpreter (void *cls); /** * Task triggered whenever we are to shutdown. * * @param cls closure, NULL if we need to self-restart - * @param tc context */ static void -shutdown_action (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc) +shutdown_action (void *cls) { shutdown_task = NULL; if (NULL != mhd_task) @@ -355,18 +351,18 @@ shutdown_action (void *cls, * process died). * * @param cls closure, NULL if we need to self-restart - * @param tc context */ static void -maint_child_death (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc) +maint_child_death (void *cls) { const struct GNUNET_DISK_FileHandle *pr; char c[16]; struct State *state; + const struct GNUNET_SCHEDULER_TaskContext *tc; child_death_task = NULL; pr = GNUNET_DISK_pipe_handle (sigpipe, GNUNET_DISK_PIPE_END_READ); + tc = GNUNET_SCHEDULER_get_task_context (); if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) { /* shutdown scheduled us, ignore! */ @@ -384,7 +380,7 @@ maint_child_death (void *cls, aggregator_state->ioff++; state = aggregator_state; aggregator_state = NULL; - interpreter (state, NULL); + interpreter (state); if (NULL == shutdown_task) return; child_death_task = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, @@ -527,11 +523,9 @@ fail (struct Command *cmd) * Interprets the commands from the test program. * * @param cls the `struct State` of the interpreter - * @param tc scheduler context */ static void -interpreter (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc) +interpreter (void *cls) { struct State *state = cls; @@ -864,11 +858,9 @@ handle_mhd_request (void *cls, * Task run whenever HTTP server operations are pending. * * @param cls NULL - * @param tc scheduler context */ static void -run_mhd (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc); +run_mhd (void *cls); /** @@ -934,11 +926,9 @@ schedule_httpd () * Task run whenever HTTP server operations are pending. * * @param cls NULL - * @param tc scheduler context */ static void -run_mhd (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc) +run_mhd (void *cls) { mhd_task = NULL; MHD_run (mhd_bank); @@ -950,11 +940,9 @@ run_mhd (void *cls, * Main function that will be run by the scheduler. * * @param cls closure with configuration - * @param tc unused */ static void -run (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc) +run (void *cls) { struct GNUNET_CONFIGURATION_Handle *cfg = cls; struct TALER_EXCHANGEDB_DenominationKeyInformationP issue; diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c index 8d06c0072..f2c473fd9 100644 --- a/src/exchangedb/test_exchangedb.c +++ b/src/exchangedb/test_exchangedb.c @@ -615,11 +615,9 @@ deposit_cb (void *cls, * Main function that will be run by the scheduler. * * @param cls closure with config - * @param tc unused */ static void -run (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *tc) +run (void *cls) { struct GNUNET_CONFIGURATION_Handle *cfg = cls; struct TALER_EXCHANGEDB_Session *session; diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c index 9d0667680..bde3c4442 100644 --- a/src/wire/plugin_wire_test.c +++ b/src/wire/plugin_wire_test.c @@ -131,11 +131,9 @@ struct TALER_WIRE_ExecuteHandle * scheduler. * * @param cls our `struct TestClosure` - * @param tc scheduler context (unused) */ static void -context_task (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *sct) +context_task (void *cls) { struct TestClosure *tc = cls; long timeout; @@ -388,11 +386,9 @@ GNUNET_NETWORK_STRUCT_END * callback with the serialized state. * * @param cls the `struct TALER_WIRE_PrepareHandle` - * @param sct unused */ static void -do_prepare (void *cls, - const struct GNUNET_SCHEDULER_TaskContext *sct) +do_prepare (void *cls) { struct TALER_WIRE_PrepareHandle *pth = cls; char *wire_enc; From bf92166be3af89313f2e59ca64ecb716c0ca760d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 10 Apr 2016 02:14:07 +0200 Subject: [PATCH 74/91] do not clear result until end of iteration over results --- src/exchangedb/plugin_exchangedb_postgres.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index c38c0827f..de8a3f247 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -2404,10 +2404,10 @@ postgres_iterate_matching_deposits (void *cls, wire_deadline, NULL); GNUNET_PQ_cleanup_result (rs); - PQclear (result); if (GNUNET_OK != ret) break; } + PQclear (result); return i; } From 6e90ef9f4a8ab5352a948fd7fd4de9150a778ce5 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 10 Apr 2016 02:43:09 +0200 Subject: [PATCH 75/91] implement selection by wire_deadline as documented --- src/exchangedb/plugin_exchangedb_postgres.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index de8a3f247..092aebc48 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -950,10 +950,11 @@ postgres_prepare (PGconn *db_conn) " FROM deposits" " WHERE" " tiny=false AND" - " done=false" + " done=false AND" + " wire_deadline<$1" " ORDER BY wire_deadline ASC" " LIMIT 1", - 0, NULL); + 1, NULL); /* Used in #postgres_iterate_matching_deposits() */ PREPARE ("deposits_iterate_matching", @@ -2231,7 +2232,9 @@ postgres_get_ready_deposit (void *cls, TALER_EXCHANGEDB_DepositIterator deposit_cb, void *deposit_cb_cls) { + struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get (); struct GNUNET_PQ_QueryParam params[] = { + GNUNET_PQ_query_param_absolute_time (&now), GNUNET_PQ_query_param_end }; PGresult *result; From 71107a7b3d5ba0367aad3b6ae926e54c08cb0963 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 10 Apr 2016 02:52:46 +0200 Subject: [PATCH 76/91] expanding aggregator testcase --- src/exchange/test_taler_exchange_aggregator.c | 349 ++++++++++++++++-- src/util/test_amount.c | 13 + 2 files changed, 335 insertions(+), 27 deletions(-) diff --git a/src/exchange/test_taler_exchange_aggregator.c b/src/exchange/test_taler_exchange_aggregator.c index 3720ce829..d109e4cd1 100644 --- a/src/exchange/test_taler_exchange_aggregator.c +++ b/src/exchange/test_taler_exchange_aggregator.c @@ -280,6 +280,11 @@ static struct MHD_Daemon *mhd_bank; */ static struct GNUNET_SCHEDULER_Task *mhd_task; +/** + * Task running the interpreter(). + */ +static struct GNUNET_SCHEDULER_Task *int_task; + /** * We store transactions in a DLL. */ @@ -324,6 +329,11 @@ shutdown_action (void *cls) GNUNET_SCHEDULER_cancel (mhd_task); mhd_task = NULL; } + if (NULL != int_task) + { + GNUNET_SCHEDULER_cancel (int_task); + int_task = NULL; + } if (NULL != mhd_bank) { MHD_stop_daemon (mhd_bank); @@ -529,6 +539,7 @@ interpreter (void *cls) { struct State *state = cls; + int_task = NULL; while (1) { struct Command *cmd = &state->commands[state->ioff]; @@ -546,9 +557,9 @@ interpreter (void *cls) return; case OPCODE_WAIT: state->ioff++; - GNUNET_SCHEDULER_add_delayed (cmd->details.wait_delay, - &interpreter, - state); + int_task = GNUNET_SCHEDULER_add_delayed (cmd->details.wait_delay, + &interpreter, + state); return; case OPCODE_RUN_AGGREGATOR: GNUNET_assert (NULL == aggregator_state); @@ -567,6 +578,22 @@ interpreter (void *cls) case OPCODE_EXPECT_TRANSACTIONS_EMPTY: if (NULL != transactions_head) { + struct Transaction *t; + + fprintf (stderr, + "Expected empty transaction set, but I have:\n"); + for (t = transactions_head; NULL != t; t = t->next) + { + char *s; + + s = TALER_amount_to_string (&t->amount); + fprintf (stderr, + "%llu -> %llu (%s)\n", + (unsigned long long) t->debit_account, + (unsigned long long) t->credit_account, + s); + GNUNET_free (s); + } fail (cmd); return; } @@ -614,6 +641,20 @@ interpreter (void *cls) } if (GNUNET_NO == found) { + fprintf (stderr, + "Did not find matching transaction!\nI have:\n"); + for (t = transactions_head; NULL != t; t = t->next) + { + char *s; + + s = TALER_amount_to_string (&t->amount); + fprintf (stderr, + "%llu -> %llu (%s)\n", + (unsigned long long) t->debit_account, + (unsigned long long) t->credit_account, + s); + GNUNET_free (s); + } fail (cmd); return; } @@ -646,14 +687,15 @@ run_test () .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY, .label = "expect-empty-transactions-on-start" }, + /* test simple deposit */ { .opcode = OPCODE_DATABASE_DEPOSIT, - .label = "do-deposit-", + .label = "do-deposit-1", .details.deposit.merchant_name = "bob", .details.deposit.merchant_account = 4, .details.deposit.transaction_id = 1, - .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 5s */ + .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */ .details.deposit.amount_with_fee = "EUR:1", .details.deposit.deposit_fee = "EUR:0" }, @@ -676,52 +718,305 @@ run_test () }, /* test idempotency: run again on transactions already done */ + { + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-1" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY, + .label = "expect-empty-transactions-after-1" + }, + + /* test combining deposits */ { .opcode = OPCODE_DATABASE_DEPOSIT, - .label = "do-deposit-", + .label = "do-deposit-2a", .details.deposit.merchant_name = "bob", .details.deposit.merchant_account = 4, .details.deposit.transaction_id = 1, - .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 5s */ + .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */ .details.deposit.amount_with_fee = "EUR:1", .details.deposit.deposit_fee = "EUR:0" }, { - .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY, - .label = "expect-empty-transactions-on-start" + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-2b", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */ + .details.deposit.amount_with_fee = "EUR:1", + .details.deposit.deposit_fee = "EUR:0" }, - { - .opcode = OPCODE_TERMINATE_SUCCESS, - .label = "testcase-incomplete-terminating-with-skip" + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-2" }, - - { - .opcode = OPCODE_TERMINATE_SKIP, - .label = "testcase-incomplete-terminating-with-skip" - }, - /* note: rest not reached, just sample code */ { .opcode = OPCODE_EXPECT_TRANSACTION, - .label = "testing test logic", - .details.expect_transaction.debit_account = 1, - .details.expect_transaction.credit_account = 1, - .details.expect_transaction.amount = "EUR:1" + .label = "expect-deposit-2", + .details.expect_transaction.debit_account = 3, + .details.expect_transaction.credit_account = 4, + .details.expect_transaction.amount = "EUR:2" + }, + + { + .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY, + .label = "expect-empty-transactions-after-2" + }, + + /* test NOT combining deposits of different accounts or keys */ + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-3a", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */ + .details.deposit.amount_with_fee = "EUR:1", + .details.deposit.deposit_fee = "EUR:0" }, { .opcode = OPCODE_DATABASE_DEPOSIT, - .label = "deposit", + .label = "do-deposit-3b", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 5, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */ + .details.deposit.amount_with_fee = "EUR:1", + .details.deposit.deposit_fee = "EUR:0" + }, + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-3c", + .details.deposit.merchant_name = "alice", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */ + .details.deposit.amount_with_fee = "EUR:1", + .details.deposit.deposit_fee = "EUR:0" + }, + { + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-3" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTION, + .label = "expect-deposit-3a", + .details.expect_transaction.debit_account = 3, + .details.expect_transaction.credit_account = 4, + .details.expect_transaction.amount = "EUR:1" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTION, + .label = "expect-deposit-3b", + .details.expect_transaction.debit_account = 3, + .details.expect_transaction.credit_account = 4, + .details.expect_transaction.amount = "EUR:1" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTION, + .label = "expect-deposit-3c", + .details.expect_transaction.debit_account = 3, + .details.expect_transaction.credit_account = 5, + .details.expect_transaction.amount = "EUR:1" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY, + .label = "expect-empty-transactions-after-3" + }, + + /* test NOT running deposits instantly, but after delay */ + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-4a", .details.deposit.merchant_name = "bob", .details.deposit.merchant_account = 4, .details.deposit.transaction_id = 1, .details.deposit.wire_deadline = { 1000LL * 1000 * 5 }, /* 5s */ - .details.deposit.amount_with_fee = "EUR:1", + .details.deposit.amount_with_fee = "EUR:0.01", .details.deposit.deposit_fee = "EUR:0" }, + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-4b", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 5 }, /* 5s */ + .details.deposit.amount_with_fee = "EUR:0.01", + .details.deposit.deposit_fee = "EUR:0" + }, + { + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-4-early" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY, + .label = "expect-empty-transactions-after-4-fast" + }, { .opcode = OPCODE_WAIT, .label = "wait (5s)", - .details.wait_delay = { 1000LL * 1000 * 5 } /* 5s */ + .details.wait_delay = { 1000LL * 1000 * 6 } /* 6s */ + }, + { + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-4-delayed" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTION, + .label = "expect-deposit-4", + .details.expect_transaction.debit_account = 3, + .details.expect_transaction.credit_account = 4, + .details.expect_transaction.amount = "EUR:0.02" + }, + + /* test picking all deposits at earliest deadline */ + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-5a", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 10 }, /* 10s */ + .details.deposit.amount_with_fee = "EUR:0.01", + .details.deposit.deposit_fee = "EUR:0" + }, + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-5b", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 5 }, /* 5s */ + .details.deposit.amount_with_fee = "EUR:0.01", + .details.deposit.deposit_fee = "EUR:0" + }, + { + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-5-early" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY, + .label = "expect-empty-transactions-after-5-early" + }, + { + .opcode = OPCODE_WAIT, + .label = "wait (5s)", + .details.wait_delay = { 1000LL * 1000 * 6 } /* 6s */ + }, + { + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-5-delayed" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTION, + .label = "expect-deposit-5", + .details.expect_transaction.debit_account = 3, + .details.expect_transaction.credit_account = 4, + .details.expect_transaction.amount = "EUR:0.02" + }, + + /* Test NEVER running 'tiny' unless they make up minimum unit */ + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-6a", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */ + .details.deposit.amount_with_fee = "EUR:0.002", + .details.deposit.deposit_fee = "EUR:0" + }, + { + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-6a-tiny" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY, + .label = "expect-empty-transactions-after-6a-tiny" + }, + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-6b", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */ + .details.deposit.amount_with_fee = "EUR:0.002", + .details.deposit.deposit_fee = "EUR:0" + }, + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-6c", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */ + .details.deposit.amount_with_fee = "EUR:0.002", + .details.deposit.deposit_fee = "EUR:0" + }, + { + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-6c-tiny" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY, + .label = "expect-empty-transactions-after-6c-tiny" + }, + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-6d", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */ + .details.deposit.amount_with_fee = "EUR:0.002", + .details.deposit.deposit_fee = "EUR:0" + }, + { + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-6d-tiny" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY, + .label = "expect-empty-transactions-after-6d-tiny" + }, + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-6e", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */ + .details.deposit.amount_with_fee = "EUR:0.002", + .details.deposit.deposit_fee = "EUR:0" + }, + { + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-6e" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTION, + .label = "expect-deposit-6", + .details.expect_transaction.debit_account = 3, + .details.expect_transaction.credit_account = 4, + .details.expect_transaction.amount = "EUR:0.01" + }, + + /* TODO: might want to test "profiteering" from + rounding down... */ + + /* Everything tested, terminate with success */ + { + .opcode = OPCODE_TERMINATE_SUCCESS, + .label = "testcase-complete-terminating-with-success" + }, + /* note: rest not reached, this is just sample code */ + { + .opcode = OPCODE_TERMINATE_SKIP, + .label = "testcase-incomplete-terminating-with-skip" } }; static struct State state = { @@ -730,8 +1025,8 @@ run_test () GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Launching interpreter\n"); - GNUNET_SCHEDULER_add_now (&interpreter, - &state); + int_task = GNUNET_SCHEDULER_add_now (&interpreter, + &state); } diff --git a/src/util/test_amount.c b/src/util/test_amount.c index 3f33334bc..640477156 100644 --- a/src/util/test_amount.c +++ b/src/util/test_amount.c @@ -73,6 +73,19 @@ main(int argc, GNUNET_assert (4 == a1.value); GNUNET_assert (0 == a1.fraction); + /* test conversion with leading zero in fraction */ + GNUNET_assert (GNUNET_OK == + TALER_string_to_amount ("eur:0.02", + &a2)); + GNUNET_assert (0 == strcasecmp ("eur", + a2.currency)); + GNUNET_assert (0 == a2.value); + GNUNET_assert (TALER_AMOUNT_FRAC_BASE / 100 * 2 == a2.fraction); + c = TALER_amount_to_string (&a2); + GNUNET_assert (0 == strcmp ("eur:0.02", + c)); + GNUNET_free (c); + /* test conversion with leading space and with fraction */ GNUNET_assert (GNUNET_OK == TALER_string_to_amount (" eur:4.12", From 5fb65f59b2de184f4fcb1417923711bd64fe781a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 10 Apr 2016 14:28:54 +0200 Subject: [PATCH 77/91] add testcase for profiteering from rounding, also passes, this concludes #4141 --- src/exchange/taler-exchange-aggregator.c | 2 +- src/exchange/test_taler_exchange_aggregator.c | 188 +++++++++++++++++- 2 files changed, 186 insertions(+), 4 deletions(-) diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c index 2ff3c2ca8..25ddcf3f6 100644 --- a/src/exchange/taler-exchange-aggregator.c +++ b/src/exchange/taler-exchange-aggregator.c @@ -352,7 +352,7 @@ deposit_cb (void *cls, deposit_fee)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Fatally malformed record at %llu\n", + "Fatally malformed record at row %llu\n", row_id); return GNUNET_SYSERR; } diff --git a/src/exchange/test_taler_exchange_aggregator.c b/src/exchange/test_taler_exchange_aggregator.c index d109e4cd1..80c14ed67 100644 --- a/src/exchange/test_taler_exchange_aggregator.c +++ b/src/exchange/test_taler_exchange_aggregator.c @@ -1,6 +1,6 @@ /* This file is part of TALER - (C) 2016 GNUnet e.V. + (C) 2016 Inria and GNUnet e.V. TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -1005,8 +1005,190 @@ run_test () .details.expect_transaction.amount = "EUR:0.01" }, - /* TODO: might want to test "profiteering" from - rounding down... */ + /* Test profiteering if wire deadline is short */ + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-7a", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */ + .details.deposit.amount_with_fee = "EUR:0.009", + .details.deposit.deposit_fee = "EUR:0" + }, + { + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-7a-tiny" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY, + .label = "expect-empty-transactions-after-7a-tiny" + }, + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-7b", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */ + .details.deposit.amount_with_fee = "EUR:0.009", + .details.deposit.deposit_fee = "EUR:0" + }, + { + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-7-profit" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTION, + .label = "expect-deposit-7", + .details.expect_transaction.debit_account = 3, + .details.expect_transaction.credit_account = 4, + .details.expect_transaction.amount = "EUR:0.01" + }, + /* Now check profit was actually taken */ + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-7c", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */ + .details.deposit.amount_with_fee = "EUR:0.022", + .details.deposit.deposit_fee = "EUR:0" + }, + { + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-7c-loss" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTION, + .label = "expect-deposit-7", + .details.expect_transaction.debit_account = 3, + .details.expect_transaction.credit_account = 4, + .details.expect_transaction.amount = "EUR:0.02" + }, + + /* Test that aggregation would happen fully if wire deadline is long */ + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-8a", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 5 }, /* 5s */ + .details.deposit.amount_with_fee = "EUR:0.009", + .details.deposit.deposit_fee = "EUR:0" + }, + { + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-8a-tiny" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY, + .label = "expect-empty-transactions-after-8a-tiny" + }, + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-8b", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 5 }, /* 5s */ + .details.deposit.amount_with_fee = "EUR:0.009", + .details.deposit.deposit_fee = "EUR:0" + }, + { + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-8b-tiny" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY, + .label = "expect-empty-transactions-after-8b-tiny" + }, + /* now trigger aggregate with large transaction and short deadline */ + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-8c", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */ + .details.deposit.amount_with_fee = "EUR:0.022", + .details.deposit.deposit_fee = "EUR:0" + }, + { + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-8" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTION, + .label = "expect-deposit-8", + .details.expect_transaction.debit_account = 3, + .details.expect_transaction.credit_account = 4, + .details.expect_transaction.amount = "EUR:0.04" + }, + + + /* Test aggregation with fees and rounding profits */ + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-9a", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 5 }, /* 5s */ + .details.deposit.amount_with_fee = "EUR:0.009", + .details.deposit.deposit_fee = "EUR:0.001" + }, + { + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-9a-tiny" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY, + .label = "expect-empty-transactions-after-9a-tiny" + }, + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-9b", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 5 }, /* 5s */ + .details.deposit.amount_with_fee = "EUR:0.009", + .details.deposit.deposit_fee = "EUR:0.002" + }, + { + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-9b-tiny" + }, + { + .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY, + .label = "expect-empty-transactions-after-9b-tiny" + }, + /* now trigger aggregate with large transaction and short deadline */ + { + .opcode = OPCODE_DATABASE_DEPOSIT, + .label = "do-deposit-9c", + .details.deposit.merchant_name = "bob", + .details.deposit.merchant_account = 4, + .details.deposit.transaction_id = 1, + .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */ + .details.deposit.amount_with_fee = "EUR:0.022", + .details.deposit.deposit_fee = "EUR:0.008" + }, + { + .opcode = OPCODE_RUN_AGGREGATOR, + .label = "run-aggregator-deposit-9" + }, + /* 0.009 + 0.009 + 0.022 - 0.001 - 0.002 - 0.008 = 0.029 => 0.02 */ + { + .opcode = OPCODE_EXPECT_TRANSACTION, + .label = "expect-deposit-9", + .details.expect_transaction.debit_account = 3, + .details.expect_transaction.credit_account = 4, + .details.expect_transaction.amount = "EUR:0.02" + }, /* Everything tested, terminate with success */ { From 30d66bcebc27a1cdcbad39ddbeeaf047da6cc1dd Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 10 Apr 2016 17:10:20 +0200 Subject: [PATCH 78/91] fixing #4386: use more sane configuration and data file structure --- .gitignore | 2 + doc/taler.conf.5 | 6 +- src/exchange-lib/Makefile.am | 5 +- .../config/exchange-common.conf | 41 ----------- src/exchange-lib/test_exchange_api.c | 8 +- ...ange-keyup.conf => test_exchange_api.conf} | 62 +++++++++------- .../.config/taler}/sepa.json | 0 .../taler/exchange/offline-keys}/master.priv | 0 src/exchange-tools/Makefile.am | 12 +++ src/exchange-tools/auditor.conf | 12 +++ src/exchange-tools/coins.conf | 25 +++++++ src/exchange-tools/exchange-signkeys.conf | 16 ++++ src/exchange-tools/taler-auditor-sign.c | 49 ++++++++++--- src/exchange-tools/taler-exchange-dbinit.c | 46 ++++-------- src/exchange-tools/taler-exchange-keycheck.c | 46 +++++++----- src/exchange-tools/taler-exchange-keyup.c | 42 +++++++---- .../taler-exchange-reservemod.c | 42 ++++++----- src/exchange-tools/taler-exchange-wire.c | 29 +++++++- src/exchange/Makefile.am | 2 + src/exchange/exchange.conf | 33 +++------ src/exchange/taler-exchange-aggregator.c | 73 ++++++++----------- src/exchange/taler-exchange-httpd.c | 34 +++++---- src/exchange/taler-exchange-httpd_keystate.c | 6 +- src/exchange/test_taler_exchange_aggregator.c | 6 +- ...on.conf => test_taler_exchange_httpd.conf} | 43 +++++++++++ src/exchange/test_taler_exchange_httpd.sh | 14 ++-- .../taler/exchange/offline-keys}/master.priv | 0 src/exchangedb/Makefile.am | 11 +++ src/exchangedb/exchangedb-postgres.conf | 2 + src/exchangedb/exchangedb.conf | 7 ++ src/exchangedb/exchangedb_keyio.c | 21 +++--- src/include/taler_exchangedb_lib.h | 12 +-- src/include/taler_util.h | 11 --- src/util/Makefile.am | 9 +++ src/util/paths.conf | 29 ++++++++ src/util/util.c | 27 ------- src/wire/Makefile.am | 11 +++ src/wire/wire-sepa.conf | 7 ++ src/wire/wire-test.conf | 14 ++++ 39 files changed, 499 insertions(+), 316 deletions(-) delete mode 100644 src/exchange-lib/test-exchange-home/config/exchange-common.conf rename src/exchange-lib/{test-exchange-home/config/exchange-keyup.conf => test_exchange_api.conf} (50%) rename src/exchange-lib/{test-exchange-home => test_exchange_api_home/.config/taler}/sepa.json (100%) rename src/exchange-lib/{test-exchange-home => test_exchange_api_home/.local/share/taler/exchange/offline-keys}/master.priv (100%) create mode 100644 src/exchange-tools/auditor.conf create mode 100644 src/exchange-tools/coins.conf create mode 100644 src/exchange-tools/exchange-signkeys.conf rename src/exchange/{test-exchange-home/config/exchange-common.conf => test_taler_exchange_httpd.conf} (54%) rename src/exchange/{test-exchange-home => test_taler_exchange_httpd_home/.local/share/taler/exchange/offline-keys}/master.priv (100%) create mode 100644 src/exchangedb/exchangedb-postgres.conf create mode 100644 src/exchangedb/exchangedb.conf create mode 100644 src/util/paths.conf create mode 100644 src/wire/wire-sepa.conf create mode 100644 src/wire/wire-test.conf diff --git a/.gitignore b/.gitignore index ce73b4d26..fc31e919e 100644 --- a/.gitignore +++ b/.gitignore @@ -31,8 +31,10 @@ src/lib/test_exchange_api doc/doxygen/doxygen_sqlite3.db src/bank-lib/test_bank_api src/exchange-lib/test_exchange_api +src/exchange-lib/test_exchange_api_home/.local/share/taler/exchange/live-keys/ src/exchange/taler-exchange-aggregator src/exchange/test_taler_exchange_aggregator-postgres +src/exchange/test_taler_exchange_httpd_home/.local/share/taler/exchange/live-keys/ src/exchange-tools/taler-auditor-sign src/exchange-tools/taler-exchange-dbinit src/exchange-tools/taler-exchange-keycheck diff --git a/doc/taler.conf.5 b/doc/taler.conf.5 index e4c7083d6..1d03927ea 100644 --- a/doc/taler.conf.5 +++ b/doc/taler.conf.5 @@ -1,14 +1,14 @@ -.TH TALER.CONF 5 "Aug 11, 2015" "GNU Taler" +.TH TALER.CONF 5 "Apr 11, 2016" "GNU Taler" .SH NAME taler.conf \- Taler configuration file. .SH SYNOPSIS -.B DIRNAME/taler.conf +.B taler.conf .SH DESCRIPTION -The basic structure of the configuration file is the following. The file is split into sections. Every section begins with "[SECTIONNAME]" and contains a number of options of the form "OPTION=VALUE". Empty lines and lines beginning with a "#" are treated as comments. +The basic structure of the configuration file is the following. The file is split into sections. Every section begins with "[SECTIONNAME]" and contains a number of options of the form "OPTION=VALUE". Empty lines and lines beginning with a "#" are treated as comments. Files containing default values for many of the options described below are installed under \$TALER\_PREFIX/share/taler/config.d/. The configuration file given with \-c to Taler binaries overrides these defaults. .SH EXCHANGE OPTIONS diff --git a/src/exchange-lib/Makefile.am b/src/exchange-lib/Makefile.am index 49cb234a1..58a903342 100644 --- a/src/exchange-lib/Makefile.am +++ b/src/exchange-lib/Makefile.am @@ -61,5 +61,6 @@ test_exchange_api_LDADD = \ -ljansson EXTRA_DIST = \ - test-exchange-home/config/exchange-common.conf \ - test-exchange-home/master.priv + test_taler_exchange_api_home/.local/share/taler/exchange/offline-keys/master.priv \ + test_taler_exchange_api_home/.config/taler/sepa.json \ + test_taler_exchange_api.conf diff --git a/src/exchange-lib/test-exchange-home/config/exchange-common.conf b/src/exchange-lib/test-exchange-home/config/exchange-common.conf deleted file mode 100644 index 97947f111..000000000 --- a/src/exchange-lib/test-exchange-home/config/exchange-common.conf +++ /dev/null @@ -1,41 +0,0 @@ -[exchange] -# Currency supported by the exchange (can only be one) -CURRENCY = EUR - -# Wire format supported by the exchange -# We use 'test' for testing of the actual -# coin operations, and 'sepa' to test SEPA-specific routines. -WIREFORMAT = test sepa - -# HTTP port the exchange listens to -PORT = 8081 - -# Master public key used to sign the exchange's various keys -MASTER_PUBLIC_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG - -# How to access our database -DB = postgres - -# Is this is a testcase, use transient DB actions? -TESTRUN = YES - -[exchangedb-postgres] -DB_CONN_STR = "postgres:///talercheck" - -[wire-incoming-sepa] -SEPA_RESPONSE_FILE = "test-exchange-home/sepa.json" - -[wire-incoming-sepa] -SEPA_RESPONSE_FILE = "test-exchange-home/sepa.json" - -[wire-incoming-test] -# What is the main website of the bank? -BANK_URI = "http://localhost/" -# Into which account at the 'bank' should (incoming) wire transfers be made? -BANK_ACCOUNT_NUMBER = 2 - -[wire-outgoing-test] -# What is the main website of the bank? -BANK_URI = "http://localhost/" -# Into which account at the 'bank' should (incoming) wire transfers be made? -BANK_ACCOUNT_NUMBER = 2 diff --git a/src/exchange-lib/test_exchange_api.c b/src/exchange-lib/test_exchange_api.c index c7eb9e314..68f4852be 100644 --- a/src/exchange-lib/test_exchange_api.c +++ b/src/exchange-lib/test_exchange_api.c @@ -2539,13 +2539,15 @@ main (int argc, GNUNET_log_setup ("test-exchange-api", "WARNING", NULL); + /* These might get in the way... */ + unsetenv ("XDG_DATA_HOME"); + unsetenv ("XDG_CONFIG_HOME"); proc = GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_ALL, NULL, NULL, NULL, "taler-exchange-keyup", "taler-exchange-keyup", - "-d", "test-exchange-home", - "-m", "test-exchange-home/master.priv", + "-c", "test_exchange_api.conf", NULL); GNUNET_OS_process_wait (proc); GNUNET_OS_process_destroy (proc); @@ -2554,7 +2556,7 @@ main (int argc, NULL, NULL, NULL, "taler-exchange-httpd", "taler-exchange-httpd", - "-d", "test-exchange-home", + "-c", "test_exchange_api.conf", NULL); /* give child time to start and bind against the socket */ fprintf (stderr, "Waiting for taler-exchange-httpd to be ready"); diff --git a/src/exchange-lib/test-exchange-home/config/exchange-keyup.conf b/src/exchange-lib/test_exchange_api.conf similarity index 50% rename from src/exchange-lib/test-exchange-home/config/exchange-keyup.conf rename to src/exchange-lib/test_exchange_api.conf index 4a80da7e9..e1e916bd2 100644 --- a/src/exchange-lib/test-exchange-home/config/exchange-keyup.conf +++ b/src/exchange-lib/test_exchange_api.conf @@ -1,24 +1,45 @@ -[exchange_keys] +# This file is in the public domain. +# +[PATHS] +# Persistant data storage for the testcase +TALER_TEST_HOME = test_exchange_api_home/ -# how long is one signkey valid? -signkey_duration = 4 weeks +[exchange] +# Currency supported by the exchange (can only be one) +CURRENCY = EUR -# how long are the signatures with the signkey valid? -legal_duration = 2 years +# Wire format supported by the exchange +# We use 'test' for testing of the actual +# coin operations, and 'sepa' to test SEPA-specific routines. +WIREFORMAT = test sepa -# how long do we generate denomination and signing keys -# ahead of time? -lookahead_sign = 32 weeks 1 day +# HTTP port the exchange listens to +PORT = 8081 -# how long do we provide to clients denomination and signing keys -# ahead of time? -lookahead_provide = 4 weeks 1 day +# Master public key used to sign the exchange's various keys +MASTER_PUBLIC_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG +# How to access our database +DB = postgres + +# Is this is a testcase, use transient DB actions? +TESTRUN = YES + +[exchangedb-postgres] +DB_CONN_STR = "postgres:///talercheck" + +[wire-incoming-test] +# What is the main website of the bank? +BANK_URI = "http://localhost/" +# Into which account at the 'bank' should (incoming) wire transfers be made? +BANK_ACCOUNT_NUMBER = 2 + +[wire-outgoing-test] +# What is the main website of the bank? +BANK_URI = "http://localhost/" +# Into which account at the 'bank' should (incoming) wire transfers be made? +BANK_ACCOUNT_NUMBER = 2 -# Coin definitions are detected because the section -# name begins with "coin_". The rest of the -# name is free, but of course following the convention -# of "coin_$CURRENCY[_$SUBUNIT]_$VALUE" make sense. [coin_eur_ct_1] value = EUR:0.01 duration_overlap = 5 minutes @@ -73,14 +94,3 @@ fee_withdraw = EUR:0.01 fee_deposit = EUR:0.01 fee_refresh = EUR:0.03 rsa_keysize = 1024 - -[coin_eur_1000] -value = EUR:1000 -duration_overlap = 5 minutes -duration_withdraw = 7 days -duration_spend = 2 years -duration_legal = 3 years -fee_withdraw = EUR:0.01 -fee_deposit = EUR:0.01 -fee_refresh = EUR:0.03 -rsa_keysize = 2048 diff --git a/src/exchange-lib/test-exchange-home/sepa.json b/src/exchange-lib/test_exchange_api_home/.config/taler/sepa.json similarity index 100% rename from src/exchange-lib/test-exchange-home/sepa.json rename to src/exchange-lib/test_exchange_api_home/.config/taler/sepa.json diff --git a/src/exchange-lib/test-exchange-home/master.priv b/src/exchange-lib/test_exchange_api_home/.local/share/taler/exchange/offline-keys/master.priv similarity index 100% rename from src/exchange-lib/test-exchange-home/master.priv rename to src/exchange-lib/test_exchange_api_home/.local/share/taler/exchange/offline-keys/master.priv diff --git a/src/exchange-tools/Makefile.am b/src/exchange-tools/Makefile.am index feb3c314f..d283979c8 100644 --- a/src/exchange-tools/Makefile.am +++ b/src/exchange-tools/Makefile.am @@ -1,6 +1,14 @@ # This Makefile.am is in the public domain AM_CPPFLAGS = -I$(top_srcdir)/src/include +pkgcfgdir = $(prefix)/share/taler/config.d/ + +pkgcfg_DATA = \ + auditor.conf \ + exchange-signkeys.conf \ + coins.conf + + if USE_COVERAGE AM_CFLAGS = --coverage -O0 XLIB = -lgcov @@ -81,3 +89,7 @@ taler_exchange_dbinit_CPPFLAGS = \ -I$(top_srcdir)/src/include \ -I$(top_srcdir)/src/pq/ \ $(POSTGRESQL_CPPFLAGS) + + +EXTRA_DIST = \ + auditor.conf diff --git a/src/exchange-tools/auditor.conf b/src/exchange-tools/auditor.conf new file mode 100644 index 000000000..7eb5f8ae9 --- /dev/null +++ b/src/exchange-tools/auditor.conf @@ -0,0 +1,12 @@ +# This configuration file is in the public domain +# +# It cointains options for the auditor. + +[auditor] + +# Where do we store the auditor's private key? +AUDITOR_PRIV_FILE = ${TALER_DATA_HOME}/auditor/offline-keys/auditor.priv + +# What is the Web site of the auditor (i.e. to file complaints about +# a misbehaving exchange)? +# AUDITOR_URL = https://auditor.taler.net/ diff --git a/src/exchange-tools/coins.conf b/src/exchange-tools/coins.conf new file mode 100644 index 000000000..90bf7064c --- /dev/null +++ b/src/exchange-tools/coins.conf @@ -0,0 +1,25 @@ +# This configuration file is in the public domain +# +# This is a template file for coin definitions. There are no +# reasonable defaults, as legal and business concerns influence each +# value given. +# +# Note that while we only give one section here, you can define +# any number of coins by providing many "coin_" sections. +# +# Coin definitions are detected because the section name begins with +# "coin_". The rest of the name is free, but of course following the +# convention of "coin_$CURRENCY[_$SUBUNIT]_$VALUE" make sense. +# +# [coin_eur_ct_1] + +# All options are mandatory! +# value = EUR:0.01 +# duration_overlap = 60 minutes +# duration_withdraw = 7 days +# duration_spend = 2 years +# duration_legal = 3 years +# fee_withdraw = EUR:0.00 +# fee_deposit = EUR:0.00 +# fee_refresh = EUR:0.01 +# rsa_keysize = 1024 diff --git a/src/exchange-tools/exchange-signkeys.conf b/src/exchange-tools/exchange-signkeys.conf new file mode 100644 index 000000000..3146f09b2 --- /dev/null +++ b/src/exchange-tools/exchange-signkeys.conf @@ -0,0 +1,16 @@ +# General data for signing keys. +[exchange_keys] + +# how long is one signkey valid? +signkey_duration = 4 weeks + +# how long are the signatures with the signkey valid? +legal_duration = 2 years + +# how long do we generate denomination and signing keys +# ahead of time? +lookahead_sign = 32 weeks 1 day + +# how long do we provide to clients denomination and signing keys +# ahead of time? +lookahead_provide = 4 weeks 1 day diff --git a/src/exchange-tools/taler-auditor-sign.c b/src/exchange-tools/taler-auditor-sign.c index 870f889ea..d5a3a9403 100644 --- a/src/exchange-tools/taler-auditor-sign.c +++ b/src/exchange-tools/taler-auditor-sign.c @@ -59,6 +59,11 @@ static char *auditor_url; */ static struct TALER_MasterPublicKeyP master_public_key; +/** + * Our configuration. + */ +static struct GNUNET_CONFIGURATION_Handle *cfg; + /** * Print denomination key details for diagnostics. @@ -131,10 +136,12 @@ int main (int argc, char *const *argv) { - static const struct GNUNET_GETOPT_CommandLineOption options[] = { - {'a', "auditor-key", "FILE", + char *cfgfile = NULL; + const struct GNUNET_GETOPT_CommandLineOption options[] = { + {'a', "auditor-key", "FILENAME", "file containing the private key of the auditor", 1, &GNUNET_GETOPT_set_filename, &auditor_key_file}, + GNUNET_GETOPT_OPTION_CFG_FILE (&cfgfile), GNUNET_GETOPT_OPTION_HELP ("Private key of the auditor to use for signing"), {'m', "exchange-key", "KEY", "public key of the exchange (Crockford base32 encoded)", 1, @@ -142,10 +149,10 @@ main (int argc, {'u', "auditor-url", "URL", "URL of the auditor (informative link for the user)", 1, &GNUNET_GETOPT_set_string, &auditor_url}, - {'r', "exchange-request", "FILE", + {'r', "exchange-request", "FILENAME", "set of keys the exchange requested the auditor to sign", 1, &GNUNET_GETOPT_set_string, &exchange_request_file}, - {'o', "output", "FILE", + {'o', "output", "FILENAME", "where to write our signature", 1, &GNUNET_GETOPT_set_string, &output_file}, GNUNET_GETOPT_OPTION_VERSION (VERSION "-" VCS_VERSION), @@ -163,20 +170,41 @@ main (int argc, unsigned int i; GNUNET_assert (GNUNET_OK == - GNUNET_log_setup ("taler-exchange-keyup", + GNUNET_log_setup ("taler-auditor-sign", "WARNING", NULL)); - if (GNUNET_GETOPT_run ("taler-exchange-keyup", + if (GNUNET_GETOPT_run ("taler-auditor-sign", options, argc, argv) < 0) return 1; - if (NULL == auditor_key_file) + cfg = GNUNET_CONFIGURATION_create (); + if (GNUNET_SYSERR == GNUNET_CONFIGURATION_load (cfg, + cfgfile)) { - fprintf (stderr, - "Auditor key file not given\n"); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + _("Malformed configuration file `%s', exit ...\n"), + cfgfile); + GNUNET_free_non_null (cfgfile); return 1; } - if (NULL == auditor_url) + GNUNET_free_non_null (cfgfile); + if ( (NULL == auditor_key_file) && + (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_filename (cfg, + "auditor", + "AUDITOR_PRIV_FILE", + &auditor_key_file)) ) + { + fprintf (stderr, + "Auditor key file not given in neither configuration nor command-line\n"); + return 1; + } + if ( (NULL == auditor_url) && + (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (cfg, + "auditor", + "AUDITOR_URL", + &auditor_url)) ) { fprintf (stderr, "Auditor URL not given\n"); @@ -328,6 +356,7 @@ main (int argc, GNUNET_free (dks); return 1; } + GNUNET_free (sigs); GNUNET_free (dks); GNUNET_free (eddsa_priv); diff --git a/src/exchange-tools/taler-exchange-dbinit.c b/src/exchange-tools/taler-exchange-dbinit.c index 43a070228..9f301854f 100644 --- a/src/exchange-tools/taler-exchange-dbinit.c +++ b/src/exchange-tools/taler-exchange-dbinit.c @@ -20,24 +20,8 @@ */ #include "platform.h" #include -#include #include "taler_exchangedb_plugin.h" -/** - * Exchange directory with the keys. - */ -static char *exchange_base_dir; - -/** - * Our configuration. - */ -static struct GNUNET_CONFIGURATION_Handle *cfg; - -/** - * Our DB plugin. - */ -static struct TALER_EXCHANGEDB_Plugin *plugin; - /** * The main function of the database initialization tool. @@ -51,14 +35,15 @@ int main (int argc, char *const *argv) { - static const struct GNUNET_GETOPT_CommandLineOption options[] = { - {'d', "exchange-dir", "DIR", - "exchange directory", 1, - &GNUNET_GETOPT_set_filename, &exchange_base_dir}, + char *cfgfile = NULL; + const struct GNUNET_GETOPT_CommandLineOption options[] = { + GNUNET_GETOPT_OPTION_CFG_FILE (&cfgfile), GNUNET_GETOPT_OPTION_HELP ("Initialize Taler Exchange database"), GNUNET_GETOPT_OPTION_VERSION (VERSION "-" VCS_VERSION), GNUNET_GETOPT_OPTION_END }; + struct GNUNET_CONFIGURATION_Handle *cfg; + struct TALER_EXCHANGEDB_Plugin *plugin; if (GNUNET_GETOPT_run ("taler-exchange-dbinit", options, @@ -69,24 +54,23 @@ main (int argc, GNUNET_log_setup ("taler-exchange-dbinit", "INFO", NULL)); - if (NULL == exchange_base_dir) + cfg = GNUNET_CONFIGURATION_create (); + if (GNUNET_SYSERR == GNUNET_CONFIGURATION_load (cfg, + cfgfile)) { - fprintf (stderr, - "Exchange base directory not given.\n"); - return 1; - } - cfg = TALER_config_load (exchange_base_dir); - if (NULL == cfg) - { - fprintf (stderr, - "Failed to load exchange configuration.\n"); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + _("Malformed configuration file `%s', exit ...\n"), + cfgfile); + GNUNET_free_non_null (cfgfile); return 1; } + GNUNET_free_non_null (cfgfile); if (NULL == (plugin = TALER_EXCHANGEDB_plugin_load (cfg))) { fprintf (stderr, "Failed to initialize database plugin.\n"); + GNUNET_CONFIGURATION_destroy (cfg); return 1; } if (GNUNET_OK != @@ -96,9 +80,11 @@ main (int argc, fprintf (stderr, "Failed to initialize database.\n"); TALER_EXCHANGEDB_plugin_unload (plugin); + GNUNET_CONFIGURATION_destroy (cfg); return 1; } TALER_EXCHANGEDB_plugin_unload (plugin); + GNUNET_CONFIGURATION_destroy (cfg); return 0; } diff --git a/src/exchange-tools/taler-exchange-keycheck.c b/src/exchange-tools/taler-exchange-keycheck.c index d6566cd03..064f2249e 100644 --- a/src/exchange-tools/taler-exchange-keycheck.c +++ b/src/exchange-tools/taler-exchange-keycheck.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014, 2015 GNUnet e.V. + Copyright (C) 2014, 2015, 2016 GNUnet e.V. TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -104,8 +104,8 @@ static int exchange_signkeys_check () { if (0 > TALER_EXCHANGEDB_signing_keys_iterate (exchange_directory, - &signkeys_iter, - NULL)) + &signkeys_iter, + NULL)) return GNUNET_NO; return GNUNET_OK; } @@ -186,8 +186,8 @@ static int exchange_denomkeys_check () { if (0 > TALER_EXCHANGEDB_denomination_keys_iterate (exchange_directory, - &denomkeys_iter, - NULL)) + &denomkeys_iter, + NULL)) return GNUNET_NO; return GNUNET_OK; } @@ -203,11 +203,10 @@ exchange_denomkeys_check () int main (int argc, char *const *argv) { - static const struct GNUNET_GETOPT_CommandLineOption options[] = { + char *cfgfile; + const struct GNUNET_GETOPT_CommandLineOption options[] = { + GNUNET_GETOPT_OPTION_CFG_FILE (&cfgfile), GNUNET_GETOPT_OPTION_HELP ("gnunet-exchange-keycheck OPTIONS"), - {'d', "directory", "DIRECTORY", - "exchange directory with keys to check", 1, - &GNUNET_GETOPT_set_filename, &exchange_directory}, GNUNET_GETOPT_OPTION_END }; @@ -220,20 +219,29 @@ main (int argc, char *const *argv) options, argc, argv) < 0) return 1; - if (NULL == exchange_directory) + kcfg = GNUNET_CONFIGURATION_create (); + if (GNUNET_SYSERR == GNUNET_CONFIGURATION_load (kcfg, + cfgfile)) { - fprintf (stderr, - "Exchange directory not given\n"); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + _("Malformed configuration file `%s', exit ...\n"), + cfgfile); + GNUNET_free_non_null (cfgfile); + return 1; + } + GNUNET_free_non_null (cfgfile); + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_filename (kcfg, + "exchange", + "KEYDIR", + &exchange_directory)) + { + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + "exchange", + "KEYDIR"); return 1; } - kcfg = TALER_config_load (exchange_directory); - if (NULL == kcfg) - { - fprintf (stderr, - "Failed to load exchange configuration\n"); - return 1; - } if ( (GNUNET_OK != exchange_signkeys_check ()) || (GNUNET_OK != exchange_denomkeys_check ()) ) { diff --git a/src/exchange-tools/taler-exchange-keyup.c b/src/exchange-tools/taler-exchange-keyup.c index 3413dfb42..ab2123a15 100644 --- a/src/exchange-tools/taler-exchange-keyup.c +++ b/src/exchange-tools/taler-exchange-keyup.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014, 2015 GNUnet e.V. + Copyright (C) 2014, 2015, 2016 GNUnet e.V. TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -876,10 +876,9 @@ int main (int argc, char *const *argv) { - static const struct GNUNET_GETOPT_CommandLineOption options[] = { - {'d', "exchange-dir", "DIR", - "exchange directory with keys to update", 1, - &GNUNET_GETOPT_set_filename, &exchange_directory}, + char *cfgfile = NULL; + const struct GNUNET_GETOPT_CommandLineOption options[] = { + GNUNET_GETOPT_OPTION_CFG_FILE (&cfgfile), GNUNET_GETOPT_OPTION_HELP ("Setup signing and denomination keys for a Taler exchange"), {'m', "master-key", "FILE", "master key file (private key)", 1, @@ -905,12 +904,17 @@ main (int argc, options, argc, argv) < 0) return 1; - if (NULL == exchange_directory) + kcfg = GNUNET_CONFIGURATION_create (); + if (GNUNET_SYSERR == GNUNET_CONFIGURATION_load (kcfg, + cfgfile)) { - fprintf (stderr, - "Exchange directory not given\n"); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + _("Malformed configuration file `%s', exit ...\n"), + cfgfile); + GNUNET_free_non_null (cfgfile); return 1; } + GNUNET_free_non_null (cfgfile); if (NULL != pretend_time_str) { if (GNUNET_OK != @@ -928,18 +932,26 @@ main (int argc, now = GNUNET_TIME_absolute_get (); } GNUNET_TIME_round_abs (&now); - - kcfg = TALER_config_load (exchange_directory); - if (NULL == kcfg) + if ( (NULL == masterkeyfile) && + (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_filename (kcfg, + "exchange", + "MASTER_PRIV_FILE", + &masterkeyfile)) ) { fprintf (stderr, - "Failed to load exchange configuration\n"); + "Master key file not given in neither configuration nor command-line\n"); return 1; } - if (NULL == masterkeyfile) + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_filename (kcfg, + "exchange", + "KEYDIR", + &exchange_directory)) { - fprintf (stderr, - "Master key file not given\n"); + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + "exchange", + "KEYDIR"); return 1; } eddsa_priv = GNUNET_CRYPTO_eddsa_key_create_from_file (masterkeyfile); diff --git a/src/exchange-tools/taler-exchange-reservemod.c b/src/exchange-tools/taler-exchange-reservemod.c index 03a0d17d5..3494e88a0 100644 --- a/src/exchange-tools/taler-exchange-reservemod.c +++ b/src/exchange-tools/taler-exchange-reservemod.c @@ -51,6 +51,7 @@ static struct TALER_EXCHANGEDB_Plugin *plugin; int main (int argc, char *const *argv) { + char *cfgfile = NULL; char *reserve_pub_str = NULL; char *add_str = NULL; struct TALER_Amount add_value; @@ -63,10 +64,8 @@ main (int argc, char *const *argv) {'a', "add", "DENOM", "value to add", 1, &GNUNET_GETOPT_set_string, &add_str}, - {'d', "exchange-dir", "DIR", - "exchange directory with keys to update", 1, - &GNUNET_GETOPT_set_filename, &exchange_directory}, - {'D', "details", "JSON", + GNUNET_GETOPT_OPTION_CFG_FILE (&cfgfile), + {'d', "details", "JSON", "details about the bank transaction which justify why we add this amount", 1, &GNUNET_GETOPT_set_string, &details}, GNUNET_GETOPT_OPTION_HELP ("Deposit funds into a Taler reserve"), @@ -87,10 +86,29 @@ main (int argc, char *const *argv) options, argc, argv) < 0) return 1; - if (NULL == exchange_directory) + cfg = GNUNET_CONFIGURATION_create (); + if (GNUNET_SYSERR == GNUNET_CONFIGURATION_load (cfg, + cfgfile)) { - fprintf (stderr, - "Exchange directory not given\n"); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + _("Malformed configuration file `%s', exit ...\n"), + cfgfile); + GNUNET_free_non_null (cfgfile); + GNUNET_free_non_null (add_str); + GNUNET_free_non_null (details); + GNUNET_free_non_null (reserve_pub_str); + return 1; + } + GNUNET_free_non_null (cfgfile); + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_filename (cfg, + "exchange", + "KEYDIR", + &exchange_directory)) + { + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + "exchange", + "KEYDIR"); GNUNET_free_non_null (add_str); GNUNET_free_non_null (details); GNUNET_free_non_null (reserve_pub_str); @@ -133,16 +151,6 @@ main (int argc, char *const *argv) return 1; } - cfg = TALER_config_load (exchange_directory); - if (NULL == cfg) - { - fprintf (stderr, - "Failed to load exchange configuration\n"); - GNUNET_free_non_null (add_str); - GNUNET_free_non_null (details); - GNUNET_free_non_null (reserve_pub_str); - return 1; - } ret = 1; if (NULL == (plugin = TALER_EXCHANGEDB_plugin_load (cfg))) diff --git a/src/exchange-tools/taler-exchange-wire.c b/src/exchange-tools/taler-exchange-wire.c index 5bb4835de..930086d39 100644 --- a/src/exchange-tools/taler-exchange-wire.c +++ b/src/exchange-tools/taler-exchange-wire.c @@ -46,6 +46,11 @@ static char *method; */ static char *output_filename; +/** + * Our configuration. + */ +static struct GNUNET_CONFIGURATION_Handle *cfg; + /** * The main function of the taler-exchange-sepa tool. This tool is used @@ -59,7 +64,9 @@ int main (int argc, char *const *argv) { - static const struct GNUNET_GETOPT_CommandLineOption options[] = { + char *cfgfile = NULL; + const struct GNUNET_GETOPT_CommandLineOption options[] = { + GNUNET_GETOPT_OPTION_CFG_FILE (&cfgfile), {'j', "json", "JSON", "account information in JSON format", 1, &GNUNET_GETOPT_set_string, &json_in}, @@ -95,10 +102,26 @@ main (int argc, options, argc, argv) < 0) return 1; - if (NULL == masterkeyfile) + cfg = GNUNET_CONFIGURATION_create (); + if (GNUNET_SYSERR == GNUNET_CONFIGURATION_load (cfg, + cfgfile)) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + _("Malformed configuration file `%s', exit ...\n"), + cfgfile); + GNUNET_free_non_null (cfgfile); + return 1; + } + GNUNET_free_non_null (cfgfile); + if ( (NULL == masterkeyfile) && + (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_filename (cfg, + "exchange-master", + "MASTER_PRIV_FILE", + &masterkeyfile)) ) { fprintf (stderr, - "Master key file not given\n"); + "Master key file not given in neither configuration nor command-line\n"); return 1; } eddsa_priv = GNUNET_CRYPTO_eddsa_key_create_from_file (masterkeyfile); diff --git a/src/exchange/Makefile.am b/src/exchange/Makefile.am index e815d911b..dc7225b0c 100644 --- a/src/exchange/Makefile.am +++ b/src/exchange/Makefile.am @@ -89,4 +89,6 @@ TESTS = \ EXTRA_DIST = \ test-taler-exchange-aggregator-postgres.conf \ + test_taler_exchange_httpd_home/.local/share/taler/exchange/offline-keys/master.priv \ + test_taler_exchange_httpd.conf \ exchange.conf diff --git a/src/exchange/exchange.conf b/src/exchange/exchange.conf index 6a4f03ac1..eab476ccd 100644 --- a/src/exchange/exchange.conf +++ b/src/exchange/exchange.conf @@ -1,13 +1,20 @@ +# This file is in the public domain. +# [exchange] # Currency supported by the exchange (can only be one) # CURRENCY = EUR -# Wire format supported by the exchange We use 'test' for testing of +# Where do we store the private keys the exchange needs at +# runtime? (Denomination and signing keys are then stored +# in respective subdirectories.) +KEYDIR = ${TALER_DATA_HOME}/exchange/live-keys/ + +# Wire format supported by the exchange. We use 'test' for testing of # the actual coin operations. -WIREFORMAT = test +# WIREFORMAT = test # HTTP port the exchange listens to -PORT = 8081 +# PORT = 8081 # Master public key used to sign the exchange's various keys # MASTER_PUBLIC_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG @@ -18,21 +25,5 @@ DB = postgres # Is this is a testcase, use transient DB actions? # TESTRUN = YES -[exchangedb-postgres] -DB_CONN_STR = "postgres:///taler" - - -[wire-incoming-test] -# What is the main website of the bank? -BANK_URI = "http://localhost:8082/" -# Into which account at the 'bank' should incoming -# wire transfers be made? -BANK_ACCOUNT_NUMBER = 2 - -[wire-outgoing-test] -# What is the main website of the bank? -BANK_URI = "http://localhost:8082/" - -# From which account at the 'bank' should outgoing -# wire transfers be made? -BANK_ACCOUNT_NUMBER = 3 +# Where do we store the offline master private key of the exchange? +MASTER_PRIV_FILE = ${TALER_DATA_HOME}/exchange/offline-keys/master.priv diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c index 25ddcf3f6..e4ba975a2 100644 --- a/src/exchange/taler-exchange-aggregator.c +++ b/src/exchange/taler-exchange-aggregator.c @@ -134,11 +134,6 @@ static char *exchange_currency_string; */ static char *exchange_wireformat; -/** - * Base directory of the exchange (global) - */ -static char *exchange_directory; - /** * The exchange's configuration (global) */ @@ -238,26 +233,20 @@ shutdown_task (void *cls) } TALER_EXCHANGEDB_plugin_unload (db_plugin); TALER_WIRE_plugin_unload (wire_plugin); + GNUNET_CONFIGURATION_destroy (cfg); + cfg = NULL; } /** - * Load configuration parameters for the exchange - * server into the corresponding global variables. + * Parse configuration parameters for the exchange server into the + * corresponding global variables. * - * @param exchange_directory the exchange's directory * @return #GNUNET_OK on success */ static int -exchange_serve_process_config (const char *exchange_directory) +exchange_serve_process_config () { - cfg = TALER_config_load (exchange_directory); - if (NULL == cfg) - { - fprintf (stderr, - "Failed to load exchange configuration\n"); - return GNUNET_SYSERR; - } if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, "exchange", @@ -311,7 +300,6 @@ exchange_serve_process_config (const char *exchange_directory) exchange_wireformat); return GNUNET_SYSERR; } - return GNUNET_OK; } @@ -958,10 +946,24 @@ run_transfers (void *cls) * First task. * * @param cls closure, NULL + * @param args remaining command-line arguments + * @param cfgfile name of the configuration file used (for saving, can be NULL!) + * @param c configuration */ static void -run (void *cls) +run (void *cls, + char *const *args, + const char *cfgfile, + const struct GNUNET_CONFIGURATION_Handle *c) { + cfg = GNUNET_CONFIGURATION_dup (c); + if (GNUNET_OK != exchange_serve_process_config ()) + { + GNUNET_CONFIGURATION_destroy (cfg); + cfg = NULL; + global_ret = 1; + return; + } task = GNUNET_SCHEDULER_add_now (&run_transfers, NULL); GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, @@ -982,13 +984,9 @@ main (int argc, char *const *argv) { static const struct GNUNET_GETOPT_CommandLineOption options[] = { - {'d', "exchange-dir", "DIR", - "exchange directory with configuration and keys for operating the exchange", 1, - &GNUNET_GETOPT_set_filename, &exchange_directory}, {'f', "format", "WIREFORMAT", "wireformat to use, overrides WIREFORMAT option in [exchange] section", 1, &GNUNET_GETOPT_set_filename, &exchange_wireformat}, - GNUNET_GETOPT_OPTION_HELP ("background process that aggregates and executes wire transfers to merchants"), {'t', "test", NULL, "run in test mode with temporary tables", 0, &GNUNET_GETOPT_set_one, &test_mode}, @@ -996,30 +994,17 @@ main (int argc, GNUNET_GETOPT_OPTION_END }; - GNUNET_assert (GNUNET_OK == - GNUNET_log_setup ("taler-exchange-aggregator", - "INFO", - NULL)); - if (0 >= - GNUNET_GETOPT_run ("taler-exchange-aggregator", - options, - argc, argv)) - return 1; - if (NULL == exchange_directory) - { - fprintf (stderr, - "Exchange directory not specified\n"); - return 1; - } + if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, + &argc, &argv)) + return 2; if (GNUNET_OK != - exchange_serve_process_config (exchange_directory)) - { + GNUNET_PROGRAM_run (argc, argv, + "taler-exchange-aggregator", + gettext_noop ("background process that aggregates and executes wire transfers to merchants"), + options, + &run, NULL)) return 1; - } - global_ret = GNUNET_OK; - GNUNET_SCHEDULER_run (&run, NULL); - - return (GNUNET_SYSERR == global_ret) ? 1 : 0; + return global_ret; } /* end of taler-exchange-aggregator.c */ diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index 3061443b5..a8e9b3b08 100644 --- a/src/exchange/taler-exchange-httpd.c +++ b/src/exchange/taler-exchange-httpd.c @@ -360,16 +360,20 @@ handle_mhd_request (void *cls, * @return #GNUNET_OK on success */ static int -exchange_serve_process_config (const char *exchange_directory) +exchange_serve_process_config () { unsigned long long port; char *TMH_master_public_key_str; - cfg = TALER_config_load (exchange_directory); - if (NULL == cfg) + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_filename (cfg, + "exchange", + "KEYDIR", + &TMH_exchange_directory)) { - fprintf (stderr, - "Failed to load exchange configuration\n"); + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + "exchange", + "KEYDIR"); return GNUNET_SYSERR; } if (GNUNET_OK != @@ -615,13 +619,12 @@ int main (int argc, char *const *argv) { - static const struct GNUNET_GETOPT_CommandLineOption options[] = { + char *cfgfile = NULL; + const struct GNUNET_GETOPT_CommandLineOption options[] = { {'C', "connection-close", NULL, "force HTTP connections to be closed after each request", 0, &GNUNET_GETOPT_set_one, &TMH_exchange_connection_close}, - {'d', "exchange-dir", "DIR", - "exchange directory with configuration and keys for operating the exchange", 1, - &GNUNET_GETOPT_set_filename, &TMH_exchange_directory}, + GNUNET_GETOPT_OPTION_CFG_FILE (&cfgfile), {'t', "timeout", "SECONDS", "after how long do connections timeout by default (in seconds)", 1, &GNUNET_GETOPT_set_uint, &connection_timeout}, @@ -645,15 +648,18 @@ main (int argc, options, argc, argv)) return 1; - if (NULL == TMH_exchange_directory) + cfg = GNUNET_CONFIGURATION_create (); + if (GNUNET_SYSERR == GNUNET_CONFIGURATION_load (cfg, cfgfile)) { - fprintf (stderr, - "Exchange directory not specified\n"); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + _("Malformed configuration file `%s', exit ...\n"), + cfgfile); + GNUNET_free_non_null (cfgfile); return 1; } - + GNUNET_free_non_null (cfgfile); if (GNUNET_OK != - exchange_serve_process_config (TMH_exchange_directory)) + exchange_serve_process_config ()) return 1; mydaemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, diff --git a/src/exchange/taler-exchange-httpd_keystate.c b/src/exchange/taler-exchange-httpd_keystate.c index dbb72fab2..c9db50895 100644 --- a/src/exchange/taler-exchange-httpd_keystate.c +++ b/src/exchange/taler-exchange-httpd_keystate.c @@ -650,9 +650,9 @@ TMH_KS_acquire_ (const char *location) TALER_EXCHANGEDB_signing_keys_iterate (TMH_exchange_directory, &reload_keys_sign_iter, key_state); - TALER_EXCHANGEDB_auditor_iterate (TMH_exchange_directory, - &reload_auditor_iter, - key_state); + TALER_EXCHANGEDB_auditor_iterate (cfg, + &reload_auditor_iter, + key_state); ks.purpose.size = htonl (sizeof (ks)); ks.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_KEY_SET); ks.list_issue_date = GNUNET_TIME_absolute_hton (key_state->reload_time); diff --git a/src/exchange/test_taler_exchange_aggregator.c b/src/exchange/test_taler_exchange_aggregator.c index 80c14ed67..594f972c1 100644 --- a/src/exchange/test_taler_exchange_aggregator.c +++ b/src/exchange/test_taler_exchange_aggregator.c @@ -570,8 +570,7 @@ interpreter (void *cls) NULL, NULL, NULL, "taler-exchange-aggregator", "taler-exchange-aggregator", - /* "-c", config_filename, */ - "-d", "test-exchange-home", + "-c", "test_taler_exchange_httpd.conf", "-t", /* enable temporary tables */ NULL); return; @@ -1523,6 +1522,9 @@ main (int argc, "test-taler-exchange-aggregator-%s", plugin_name); (void) GNUNET_asprintf (&config_filename, "%s.conf", testname); + /* these might get in the way */ + unsetenv ("XDG_DATA_HOME"); + unsetenv ("XDG_CONFIG_HOME"); GNUNET_log_setup ("test_taler_exchange_aggregator", "WARNING", NULL); diff --git a/src/exchange/test-exchange-home/config/exchange-common.conf b/src/exchange/test_taler_exchange_httpd.conf similarity index 54% rename from src/exchange/test-exchange-home/config/exchange-common.conf rename to src/exchange/test_taler_exchange_httpd.conf index 4078cbee5..0ce9dadd2 100644 --- a/src/exchange/test-exchange-home/config/exchange-common.conf +++ b/src/exchange/test_taler_exchange_httpd.conf @@ -1,3 +1,8 @@ +[PATHS] +# Persistant data storage for the testcase +TALER_TEST_HOME = test_taler_exchange_httpd_home/ + + [exchange] # Currency supported by the exchange (can only be one) CURRENCY = EUR @@ -19,6 +24,9 @@ DB = postgres # Is this is a testcase, use transient DB actions? TESTRUN = YES + + + [exchangedb-postgres] DB_CONN_STR = "postgres:///talercheck" @@ -37,3 +45,38 @@ BANK_URI = "http://localhost:8082/" # From which account at the 'bank' should outgoing # wire transfers be made? BANK_ACCOUNT_NUMBER = 3 + + +# Coins for the tests. +[coin_eur_ct_1] +value = EUR:0.01 +duration_overlap = 5 minutes +duration_withdraw = 7 days +duration_spend = 2 years +duration_legal = 3 years +fee_withdraw = EUR:0.00 +fee_deposit = EUR:0.00 +fee_refresh = EUR:0.01 +rsa_keysize = 1024 + +[coin_eur_ct_10] +value = EUR:0.10 +duration_overlap = 5 minutes +duration_withdraw = 7 days +duration_spend = 2 years +duration_legal = 3 years +fee_withdraw = EUR:0.01 +fee_deposit = EUR:0.01 +fee_refresh = EUR:0.03 +rsa_keysize = 1024 + +[coin_eur_1] +value = EUR:1 +duration_overlap = 5 minutes +duration_withdraw = 7 days +duration_spend = 2 years +duration_legal = 3 years +fee_withdraw = EUR:0.01 +fee_deposit = EUR:0.01 +fee_refresh = EUR:0.03 +rsa_keysize = 1024 diff --git a/src/exchange/test_taler_exchange_httpd.sh b/src/exchange/test_taler_exchange_httpd.sh index 727014243..2b55ef5f4 100755 --- a/src/exchange/test_taler_exchange_httpd.sh +++ b/src/exchange/test_taler_exchange_httpd.sh @@ -1,7 +1,7 @@ #!/bin/bash # # This file is part of TALER -# Copyright (C) 2015 GNUnet e.V. +# Copyright (C) 2015, 2016 Inria and GNUnet e.V. # # TALER is free software; you can redistribute it and/or modify it under the # terms of the GNU Affero General Public License as published by the Free Software @@ -19,15 +19,19 @@ # taler-exchange-httpd. Basically, the goal is to make sure that the # HTTP server survives (and produces the 'correct' error code). # -# We read the JSON snippets to POST from test_taler_exchange_httpd.data +# +# Clear environment from variables that override config. +export XDG_DATA_HOME= +export XDG_CONFIG_HOME= # # Setup keys. -taler-exchange-keyup -d test-exchange-home -m test-exchange-home/master.priv +taler-exchange-keyup -c test_taler_exchange_httpd.conf # Run Exchange HTTPD (in background) -taler-exchange-httpd -d test-exchange-home & +taler-exchange-httpd -c test_taler_exchange_httpd.conf & # Give HTTP time to start sleep 5 -# Run test... +# Finally run test... +# We read the JSON snippets to POST from test_taler_exchange_httpd.data cat test_taler_exchange_httpd.data | grep -v ^\# | awk '{ print "curl -d \47" $2 "\47 http://localhost:8081" $1 }' | bash # Stop HTTP server kill -TERM %% diff --git a/src/exchange/test-exchange-home/master.priv b/src/exchange/test_taler_exchange_httpd_home/.local/share/taler/exchange/offline-keys/master.priv similarity index 100% rename from src/exchange/test-exchange-home/master.priv rename to src/exchange/test_taler_exchange_httpd_home/.local/share/taler/exchange/offline-keys/master.priv diff --git a/src/exchangedb/Makefile.am b/src/exchangedb/Makefile.am index fff112994..0c6a73138 100644 --- a/src/exchangedb/Makefile.am +++ b/src/exchangedb/Makefile.am @@ -6,6 +6,17 @@ if USE_COVERAGE XLIB = -lgcov endif +pkgcfgdir = $(prefix)/share/taler/config.d/ + +pkgcfg_DATA = \ + exchangedb.conf \ + exchangedb-postgres.conf + +EXTRA_DIST = \ + exchangedb.conf \ + exchangedb-postgres.conf + + plugindir = $(libdir)/taler if HAVE_POSTGRESQL diff --git a/src/exchangedb/exchangedb-postgres.conf b/src/exchangedb/exchangedb-postgres.conf new file mode 100644 index 000000000..3de7474ff --- /dev/null +++ b/src/exchangedb/exchangedb-postgres.conf @@ -0,0 +1,2 @@ +[exchangedb-postgres] +DB_CONN_STR = "postgres:///taler" diff --git a/src/exchangedb/exchangedb.conf b/src/exchangedb/exchangedb.conf new file mode 100644 index 000000000..19277ed23 --- /dev/null +++ b/src/exchangedb/exchangedb.conf @@ -0,0 +1,7 @@ +# This file is in the public domain. +# +# Database-backend independent specification for the exchangedb module. +# +[exchangedb] +# Where do we expect to find information about auditors? +AUDITOR_BASE_DIR = ${TALER_DATA_HOME}/auditors/ diff --git a/src/exchangedb/exchangedb_keyio.c b/src/exchangedb/exchangedb_keyio.c index 4d4f78ed5..9f170f645 100644 --- a/src/exchangedb/exchangedb_keyio.c +++ b/src/exchangedb/exchangedb_keyio.c @@ -502,9 +502,7 @@ auditor_iter (void *cls, /** * Call @a it with information for each auditor found in the @a exchange_base_dir. * - * @param exchange_base_dir base directory for the exchange, - * the signing keys must be in the #TALER_EXCHANGEDB_DIR_DENOMINATION_KEYS - * subdirectory + * @param cfg configuration to use * @param it function to call with auditor information * @param it_cls closure for @a it * @return -1 on error, 0 if no files were found, otherwise @@ -513,23 +511,26 @@ auditor_iter (void *cls, * as maybe none of the files were well-formed) */ int -TALER_EXCHANGEDB_auditor_iterate (const char *exchange_base_dir, +TALER_EXCHANGEDB_auditor_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg, TALER_EXCHANGEDB_AuditorIterator it, void *it_cls) { - char *dir; struct AuditorIterateContext aic; int ret; + char *auditor_base_dir; - GNUNET_asprintf (&dir, - "%s" DIR_SEPARATOR_STR TALER_EXCHANGEDB_DIR_AUDITORS, - exchange_base_dir); + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_filename (cfg, + "exchangedb", + "AUDITOR_BASE_DIR", + &auditor_base_dir)) + return -1; aic.it = it; aic.it_cls = it_cls; - ret = GNUNET_DISK_directory_scan (dir, + ret = GNUNET_DISK_directory_scan (auditor_base_dir, &auditor_iter, &aic); - GNUNET_free (dir); + GNUNET_free (auditor_base_dir); return ret; } diff --git a/src/include/taler_exchangedb_lib.h b/src/include/taler_exchangedb_lib.h index e13df2d46..1f6445212 100644 --- a/src/include/taler_exchangedb_lib.h +++ b/src/include/taler_exchangedb_lib.h @@ -37,12 +37,6 @@ */ #define TALER_EXCHANGEDB_DIR_DENOMINATION_KEYS "denomkeys" -/** - * Subdirectory under the exchange's base directory which contains - * the exchange's auditing information. - */ -#define TALER_EXCHANGEDB_DIR_AUDITORS "auditors" - GNUNET_NETWORK_STRUCT_BEGIN @@ -234,9 +228,7 @@ typedef int /** * Call @a it with information for each auditor found in the @a exchange_base_dir. * - * @param exchange_base_dir base directory for the exchange, - * the signing keys must be in the #TALER_EXCHANGEDB_DIR_DENOMINATION_KEYS - * subdirectory + * @param cfg configuration to use * @param it function to call with auditor information * @param it_cls closure for @a it * @return -1 on error, 0 if no files were found, otherwise @@ -245,7 +237,7 @@ typedef int * as maybe none of the files were well-formed) */ int -TALER_EXCHANGEDB_auditor_iterate (const char *exchange_base_dir, +TALER_EXCHANGEDB_auditor_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg, TALER_EXCHANGEDB_AuditorIterator it, void *it_cls); diff --git a/src/include/taler_util.h b/src/include/taler_util.h index 425304152..0b1d40c85 100644 --- a/src/include/taler_util.h +++ b/src/include/taler_util.h @@ -95,17 +95,6 @@ TALER_b2s (const void *buf, #define TALER_B2S(obj) TALER_b2s (obj, sizeof (*obj)) -/** - * Load configuration by parsing all configuration - * files in the given directory. - * - * @param base_dir directory with the configuration files - * @return NULL on error, otherwise configuration - */ -struct GNUNET_CONFIGURATION_Handle * -TALER_config_load (const char *base_dir); - - /** * Obtain denomination amount from configuration file. * diff --git a/src/util/Makefile.am b/src/util/Makefile.am index 54f0f0e38..f52bc81c6 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -6,6 +6,15 @@ if USE_COVERAGE XLIB = -lgcov endif + +pkgcfgdir = $(prefix)/share/taler/config.d/ + +pkgcfg_DATA = \ + paths.conf + +EXTRA_DIST = \ + paths.conf + if WALLET_ONLY lib_LTLIBRARIES = \ libtalerutil_wallet.la diff --git a/src/util/paths.conf b/src/util/paths.conf new file mode 100644 index 000000000..03febb0e4 --- /dev/null +++ b/src/util/paths.conf @@ -0,0 +1,29 @@ +# This file is in the public domain. +# +[PATHS] +# The PATHS section is special, as filenames including $-expression are +# expanded using the values from PATHS or the system environment (PATHS +# is checked first). Taler also supports expanding $-expressions using +# defaults with the syntax "${VAR:-default}". Here, "default" can again +# be a $-expression. +# +# We usually want $HOME for $TALER_HOME, but we allow testcases to +# easily override this by setting $TALER_TEST_HOME. +# +TALER_HOME = ${TALER_TEST_HOME:-${HOME:-${USERPROFILE}}} + +# see XDG Base Directory Specification at +# http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html +# for how these should be used. + +# Persistant data storage +TALER_DATA_HOME = ${XDG_DATA_HOME:-$TALER_HOME/.local/share}/taler/ + +# Configuration files +TALER_CONFIG_HOME = ${XDG_CONFIG_HOME:-$TALER_HOME/.config}/taler/ + +# Cached data, no big deal if lost +TALER_CACHE_HOME = ${XDG_CACHE_HOME:-$TALER_HOME/.cache}/taler/ + +# Runtime data (always lost on system boot) +TALER_RUNTIME_DIR = ${TMPDIR:-${TMP:-/tmp}}/taler-system-runtime/ diff --git a/src/util/util.c b/src/util/util.c index 434ce8a9d..d5fa8c05c 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -89,31 +89,4 @@ TALER_config_get_denom (struct GNUNET_CONFIGURATION_Handle *cfg, } -/** - * Load configuration by parsing all configuration - * files in the given directory. - * - * @param base_dir directory with the configuration files - * @return NULL on error, otherwise configuration - */ -struct GNUNET_CONFIGURATION_Handle * -TALER_config_load (const char *base_dir) -{ - struct GNUNET_CONFIGURATION_Handle *cfg; - char *cfg_dir; - int res; - - res = GNUNET_asprintf (&cfg_dir, - "%s" DIR_SEPARATOR_STR "config", - base_dir); - GNUNET_assert (res > 0); - cfg = GNUNET_CONFIGURATION_create (); - res = GNUNET_CONFIGURATION_load_from (cfg, cfg_dir); - GNUNET_free (cfg_dir); - if (GNUNET_OK != res) - return NULL; - return cfg; -} - - /* end of util.c */ diff --git a/src/wire/Makefile.am b/src/wire/Makefile.am index fd59c8eb7..0ed5f7be9 100644 --- a/src/wire/Makefile.am +++ b/src/wire/Makefile.am @@ -6,6 +6,17 @@ if USE_COVERAGE XLIB = -lgcov endif +pkgcfgdir = $(prefix)/share/taler/config.d/ + +pkgcfg_DATA = \ + wire-sepa.conf \ + wire-test.conf + + +EXTRA_DIST = \ + wire-sepa.conf \ + wire-test.conf + plugindir = $(libdir)/taler plugin_LTLIBRARIES = \ diff --git a/src/wire/wire-sepa.conf b/src/wire/wire-sepa.conf new file mode 100644 index 000000000..0ee17db30 --- /dev/null +++ b/src/wire/wire-sepa.conf @@ -0,0 +1,7 @@ +# Configuration for SEPA wire plugin. + +[wire-incoming-sepa] +SEPA_RESPONSE_FILE = ${TALER_CONFIG_HOME}/sepa.json + +[wire-incoming-sepa] +SEPA_RESPONSE_FILE = ${TALER_CONFIG_HOME}/sepa.json diff --git a/src/wire/wire-test.conf b/src/wire/wire-test.conf new file mode 100644 index 000000000..f2a71e2e4 --- /dev/null +++ b/src/wire/wire-test.conf @@ -0,0 +1,14 @@ +[wire-incoming-test] +# What is the main website of the bank? +# BANK_URI = "http://localhost:8082/" +# Into which account at the 'bank' should incoming +# wire transfers be made? +# BANK_ACCOUNT_NUMBER = 2 + +[wire-outgoing-test] +# What is the main website of the bank? +# BANK_URI = "http://localhost:8082/" + +# From which account at the 'bank' should outgoing +# wire transfers be made? +# BANK_ACCOUNT_NUMBER = 3 From b018d4d5b0798bdad6002cb7bbd246247b3ebd4f Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 11 Apr 2016 02:37:56 +0200 Subject: [PATCH 79/91] implementing #4357, but test missing --- src/exchange-lib/Makefile.am | 1 + src/exchange-lib/test_exchange_api.c | 18 +- src/exchange-lib/test_exchange_api.conf | 9 +- .../.config/taler/test.json | 8 + src/exchange/taler-exchange-httpd_admin.c | 3 +- src/exchange/taler-exchange-httpd_deposit.c | 3 +- .../taler-exchange-httpd_validation.c | 18 +- .../taler-exchange-httpd_validation.h | 4 +- src/exchange/test_taler_exchange_aggregator.c | 4 +- src/exchange/test_taler_exchange_httpd.conf | 9 +- .../.config/taler/test.json | 8 + src/wire/plugin_wire_test.c | 231 ++++++++++++------ src/wire/wire-sepa.conf | 7 +- src/wire/wire-test.conf | 22 +- 14 files changed, 224 insertions(+), 121 deletions(-) create mode 100644 src/exchange-lib/test_exchange_api_home/.config/taler/test.json create mode 100644 src/exchange/test_taler_exchange_httpd_home/.config/taler/test.json diff --git a/src/exchange-lib/Makefile.am b/src/exchange-lib/Makefile.am index 58a903342..d953a7a86 100644 --- a/src/exchange-lib/Makefile.am +++ b/src/exchange-lib/Makefile.am @@ -62,5 +62,6 @@ test_exchange_api_LDADD = \ EXTRA_DIST = \ test_taler_exchange_api_home/.local/share/taler/exchange/offline-keys/master.priv \ + test_taler_exchange_api_home/.config/taler/test.json \ test_taler_exchange_api_home/.config/taler/sepa.json \ test_taler_exchange_api.conf diff --git a/src/exchange-lib/test_exchange_api.c b/src/exchange-lib/test_exchange_api.c index 68f4852be..3659e119e 100644 --- a/src/exchange-lib/test_exchange_api.c +++ b/src/exchange-lib/test_exchange_api.c @@ -2327,7 +2327,7 @@ run (void *cls) { .oc = OC_ADMIN_ADD_INCOMING, .label = "create-reserve-1", .expected_response_code = MHD_HTTP_OK, - .details.admin_add_incoming.wire = "{ \"type\":\"test\", \"bank\":\"source bank\", \"account_number\":42 }", + .details.admin_add_incoming.wire = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost:8082/\", \"account_number\":42 }", .details.admin_add_incoming.amount = "EUR:5.01" }, /* Withdraw a 5 EUR coin, at fee of 1 ct */ { .oc = OC_WITHDRAW_SIGN, @@ -2348,7 +2348,7 @@ run (void *cls) .expected_response_code = MHD_HTTP_OK, .details.deposit.amount = "EUR:5", .details.deposit.coin_ref = "withdraw-coin-1", - .details.deposit.wire_details = "{ \"type\":\"test\", \"bank\":\"dest bank\", \"account_number\":42 }", + .details.deposit.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost:8082/\", \"account_number\":42 }", .details.deposit.contract = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":1 } ] }", .details.deposit.transaction_id = 1 }, @@ -2365,7 +2365,7 @@ run (void *cls) .expected_response_code = MHD_HTTP_FORBIDDEN, .details.deposit.amount = "EUR:5", .details.deposit.coin_ref = "withdraw-coin-1", - .details.deposit.wire_details = "{ \"type\":\"test\", \"bank\":\"dest bank\", \"account_number\":43 }", + .details.deposit.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost:8082/\", \"account_number\":43 }", .details.deposit.contract = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":1 } ] }", .details.deposit.transaction_id = 1 }, /* Try to double-spend the 5 EUR coin at the same merchant (but different @@ -2375,7 +2375,7 @@ run (void *cls) .expected_response_code = MHD_HTTP_FORBIDDEN, .details.deposit.amount = "EUR:5", .details.deposit.coin_ref = "withdraw-coin-1", - .details.deposit.wire_details = "{ \"type\":\"test\", \"bank\":\"dest bank\", \"account_number\":42 }", + .details.deposit.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost:8082/\", \"account_number\":42 }", .details.deposit.contract = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":1 } ] }", .details.deposit.transaction_id = 2 }, /* Try to double-spend the 5 EUR coin at the same merchant (but different @@ -2385,7 +2385,7 @@ run (void *cls) .expected_response_code = MHD_HTTP_FORBIDDEN, .details.deposit.amount = "EUR:5", .details.deposit.coin_ref = "withdraw-coin-1", - .details.deposit.wire_details = "{ \"type\":\"test\", \"bank\":\"dest bank\", \"account_number\":42 }", + .details.deposit.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost:8082/\", \"account_number\":42 }", .details.deposit.contract = "{ \"items\":[{ \"name\":\"ice cream\", \"value\":2 } ] }", .details.deposit.transaction_id = 1 }, @@ -2395,7 +2395,7 @@ run (void *cls) { .oc = OC_ADMIN_ADD_INCOMING, .label = "refresh-create-reserve-1", .expected_response_code = MHD_HTTP_OK, - .details.admin_add_incoming.wire = "{ \"type\":\"test\", \"bank\":\"source bank\", \"account_number\":424 }", + .details.admin_add_incoming.wire = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost:8082/\", \"account_number\":424 }", .details.admin_add_incoming.amount = "EUR:5.01" }, /* Withdraw a 5 EUR coin, at fee of 1 ct */ { .oc = OC_WITHDRAW_SIGN, @@ -2410,7 +2410,7 @@ run (void *cls) .expected_response_code = MHD_HTTP_OK, .details.deposit.amount = "EUR:1", .details.deposit.coin_ref = "refresh-withdraw-coin-1", - .details.deposit.wire_details = "{ \"type\":\"test\", \"bank\":\"dest bank\", \"account_number\":42 }", + .details.deposit.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost:8082/\", \"account_number\":42 }", .details.deposit.contract = "{ \"items\" : [ { \"name\":\"ice cream\", \"value\":\"EUR:1\" } ] }", .details.deposit.transaction_id = 42421 }, @@ -2444,7 +2444,7 @@ run (void *cls) .details.deposit.amount = "EUR:1", .details.deposit.coin_ref = "refresh-reveal-1", .details.deposit.coin_idx = 0, - .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account_number\":42 }", + .details.deposit.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost:8082/\", \"account_number\":42 }", .details.deposit.contract = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":3 } ] }", .details.deposit.transaction_id = 2 }, @@ -2456,7 +2456,7 @@ run (void *cls) .details.deposit.amount = "EUR:0.1", .details.deposit.coin_ref = "refresh-reveal-1", .details.deposit.coin_idx = 4, - .details.deposit.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account_number\":42 }", + .details.deposit.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost:8082/\", \"account_number\":42 }", .details.deposit.contract = "{ \"items\": [ { \"name\":\"ice cream\", \"value\":3 } ] }", .details.deposit.transaction_id = 2 }, diff --git a/src/exchange-lib/test_exchange_api.conf b/src/exchange-lib/test_exchange_api.conf index e1e916bd2..281ac7361 100644 --- a/src/exchange-lib/test_exchange_api.conf +++ b/src/exchange-lib/test_exchange_api.conf @@ -29,14 +29,13 @@ TESTRUN = YES DB_CONN_STR = "postgres:///talercheck" [wire-incoming-test] -# What is the main website of the bank? -BANK_URI = "http://localhost/" -# Into which account at the 'bank' should (incoming) wire transfers be made? -BANK_ACCOUNT_NUMBER = 2 +# This is the response we give out for the /wire request. It provides +# wallets with the bank information for transfers to the exchange. +TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/test.json [wire-outgoing-test] # What is the main website of the bank? -BANK_URI = "http://localhost/" +BANK_URI = "http://localhost:8082/" # Into which account at the 'bank' should (incoming) wire transfers be made? BANK_ACCOUNT_NUMBER = 2 diff --git a/src/exchange-lib/test_exchange_api_home/.config/taler/test.json b/src/exchange-lib/test_exchange_api_home/.config/taler/test.json new file mode 100644 index 000000000..be5e92c11 --- /dev/null +++ b/src/exchange-lib/test_exchange_api_home/.config/taler/test.json @@ -0,0 +1,8 @@ +{ + "salt": "AZPRFVJ58NM6M7J5CZQPJAH3EW5DYM52AEZ9Y1C1ER3W94QV8D8TQKF6CK8MYQRA9QMSKDQTGZ306ZS9GQ0M6R01CJ20KPP49WFDZK8", + "name": "The exchange", + "account_number": 3, + "bank_uri": "http://localhost:8082/", + "type": "test", + "sig": "RPQXP9S4P8PQP7HEZQNRSZCT0ATNEP8GW0P5TPM34V5RX86FCD670V44R9NETSYDDKB8SZV7TKY9PAJYTY51D3VDWY9XXQ5BPFRXR28" +} \ No newline at end of file diff --git a/src/exchange/taler-exchange-httpd_admin.c b/src/exchange/taler-exchange-httpd_admin.c index cc0245cd6..29da2d441 100644 --- a/src/exchange/taler-exchange-httpd_admin.c +++ b/src/exchange/taler-exchange-httpd_admin.c @@ -145,7 +145,8 @@ TMH_ADMIN_handler_admin_add_incoming (struct TMH_RequestHandler *rh, return (GNUNET_SYSERR == res) ? MHD_NO : MHD_YES; } if (GNUNET_YES != - TMH_json_validate_wireformat (wire)) + TMH_json_validate_wireformat (wire, + GNUNET_NO)) { GNUNET_break_op (0); GNUNET_JSON_parse_free (spec); diff --git a/src/exchange/taler-exchange-httpd_deposit.c b/src/exchange/taler-exchange-httpd_deposit.c index 73e6463df..efef3d04e 100644 --- a/src/exchange/taler-exchange-httpd_deposit.c +++ b/src/exchange/taler-exchange-httpd_deposit.c @@ -165,7 +165,8 @@ parse_and_handle_deposit_request (struct MHD_Connection *connection, return MHD_YES; /* failure */ if (GNUNET_YES != - TMH_json_validate_wireformat (wire)) + TMH_json_validate_wireformat (wire, + GNUNET_NO)) { GNUNET_JSON_parse_free (spec); return TMH_RESPONSE_reply_arg_unknown (connection, diff --git a/src/exchange/taler-exchange-httpd_validation.c b/src/exchange/taler-exchange-httpd_validation.c index 61599fe1f..12244c518 100644 --- a/src/exchange/taler-exchange-httpd_validation.c +++ b/src/exchange/taler-exchange-httpd_validation.c @@ -153,10 +153,12 @@ TMH_VALIDATION_done () * a wire address. * * @param wire the JSON wire format object + * @param ours #GNUNET_YES if the signature should match our master key * @return #GNUNET_YES if correctly formatted; #GNUNET_NO if not */ int -TMH_json_validate_wireformat (const json_t *wire) +TMH_json_validate_wireformat (const json_t *wire, + int ours) { const char *stype; json_error_t error; @@ -175,7 +177,9 @@ TMH_json_validate_wireformat (const json_t *wire) stype)) return p->plugin->wire_validate (p->plugin->cls, wire, - &TMH_master_public_key); + (GNUNET_YES == ours) + ? &TMH_master_public_key + : NULL); return GNUNET_NO; } @@ -227,6 +231,16 @@ TMH_VALIDATION_get_wire_methods (const char *prefix) method = plugin->get_wire_details (plugin->cls, cfg, account_name); + if (GNUNET_YES != + TMH_json_validate_wireformat (method, + GNUNET_YES)) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Account details for method `%s' ill-formed. Disabling method\n", + p->type); + json_decref (method); + method = NULL; + } if (NULL != method) json_object_set_new (methods, p->type, diff --git a/src/exchange/taler-exchange-httpd_validation.h b/src/exchange/taler-exchange-httpd_validation.h index a5403edd4..bd04994ef 100644 --- a/src/exchange/taler-exchange-httpd_validation.h +++ b/src/exchange/taler-exchange-httpd_validation.h @@ -47,10 +47,12 @@ TMH_VALIDATION_done (void); * a wire address. * * @param wire the JSON wire format object + * @param ours #GNUNET_YES if the signature should match our master key * @return #GNUNET_YES if correctly formatted; #GNUNET_NO if not */ int -TMH_json_validate_wireformat (const json_t *wire); +TMH_json_validate_wireformat (const json_t *wire, + int ours); /** * Check if we support the given wire method. diff --git a/src/exchange/test_taler_exchange_aggregator.c b/src/exchange/test_taler_exchange_aggregator.c index 594f972c1..a799316f3 100644 --- a/src/exchange/test_taler_exchange_aggregator.c +++ b/src/exchange/test_taler_exchange_aggregator.c @@ -481,9 +481,7 @@ do_deposit (struct Command *cmd) return GNUNET_SYSERR; } fake_coin (&deposit.coin); - /* Build JSON for wire details; - note that this simple method may fail in the future if we implement - and enforce signature checking on test-wire account details */ + /* Build JSON for wire details */ deposit.wire = json_pack ("{s:s, s:s, s:I}", "type", "test", "bank_uri", "http://localhost:8082/", diff --git a/src/exchange/test_taler_exchange_httpd.conf b/src/exchange/test_taler_exchange_httpd.conf index 0ce9dadd2..5b49c0824 100644 --- a/src/exchange/test_taler_exchange_httpd.conf +++ b/src/exchange/test_taler_exchange_httpd.conf @@ -31,20 +31,13 @@ TESTRUN = YES DB_CONN_STR = "postgres:///talercheck" -[wire-incoming-test] -# What is the main website of the bank? -BANK_URI = "http://localhost:8082/" -# Into which account at the 'bank' should incoming -# wire transfers be made? -BANK_ACCOUNT_NUMBER = 2 - [wire-outgoing-test] # What is the main website of the bank? BANK_URI = "http://localhost:8082/" # From which account at the 'bank' should outgoing # wire transfers be made? -BANK_ACCOUNT_NUMBER = 3 +EXCHANGE_ACCOUNT_NUMBER = 3 # Coins for the tests. diff --git a/src/exchange/test_taler_exchange_httpd_home/.config/taler/test.json b/src/exchange/test_taler_exchange_httpd_home/.config/taler/test.json new file mode 100644 index 000000000..be5e92c11 --- /dev/null +++ b/src/exchange/test_taler_exchange_httpd_home/.config/taler/test.json @@ -0,0 +1,8 @@ +{ + "salt": "AZPRFVJ58NM6M7J5CZQPJAH3EW5DYM52AEZ9Y1C1ER3W94QV8D8TQKF6CK8MYQRA9QMSKDQTGZ306ZS9GQ0M6R01CJ20KPP49WFDZK8", + "name": "The exchange", + "account_number": 3, + "bank_uri": "http://localhost:8082/", + "type": "test", + "sig": "RPQXP9S4P8PQP7HEZQNRSZCT0ATNEP8GW0P5TPM34V5RX86FCD670V44R9NETSYDDKB8SZV7TKY9PAJYTY51D3VDWY9XXQ5BPFRXR28" +} \ No newline at end of file diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c index bde3c4442..d467b7bdd 100644 --- a/src/wire/plugin_wire_test.c +++ b/src/wire/plugin_wire_test.c @@ -34,27 +34,32 @@ struct TestClosure { - /** - * Handle to the bank for sending funds to the bank. - */ - struct TALER_BANK_Context *bank; - /** * Which currency do we support? */ char *currency; /** - * Number of the account that the exchange has at the bank for outgoing - * transfers. + * URI of our bank. */ - unsigned long long exchange_account_outgoing_no; + char *bank_uri; + + /** + * Handle to the bank for sending funds to the bank. + */ + struct TALER_BANK_Context *bank; /** * Handle to the bank task, or NULL. */ struct GNUNET_SCHEDULER_Task *bt; + /** + * Number of the account that the exchange has at the bank for + * outgoing transfers. + */ + unsigned long long exchange_account_outgoing_no; + }; @@ -216,7 +221,12 @@ test_amount_round (void *cls, uint32_t delta; if (NULL == tc->currency) + { + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + "exchange", + "CURRENCY"); return GNUNET_SYSERR; /* not configured with currency */ + } if (0 != strcasecmp (amount->currency, tc->currency)) { @@ -232,58 +242,6 @@ test_amount_round (void *cls, } -/** - * Obtain wire transfer details in the plugin-specific format - * from the configuration. - * - * @param cls closure - * @param cfg configuration with details about wire accounts - * @param account_name which section in the configuration should we parse - * @return NULL if @a cfg fails to have valid wire details for @a account_name - */ -static json_t * -test_get_wire_details (void *cls, - const struct GNUNET_CONFIGURATION_Handle *cfg, - const char *account_name) -{ - json_t *ret; - char *bank_uri; - unsigned long long account_number; - - if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_string (cfg, - account_name, - "BANK_URI", - &bank_uri)) - { - /* oopsie, configuration error */ - GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - account_name, - "BANK_URI"); - return NULL; - } - if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_number (cfg, - account_name, - "BANK_ACCOUNT_NUMBER", - &account_number)) - { - /* oopsie, configuration error */ - GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - account_name, - "BANK_ACCOUNT_NUMBER"); - GNUNET_free (bank_uri); - return NULL; - } - ret = json_pack ("{s:s, s:I, s:s}", - "type", "test", - "account_number", (json_int_t) account_number, - "bank_uri", bank_uri); - GNUNET_free (bank_uri); - return ret; -} - - /** * Compute purpose for signing. * @@ -331,17 +289,23 @@ test_wire_validate (void *cls, const json_t *wire, const struct TALER_MasterPublicKeyP *master_pub) { + struct TestClosure *tc = cls; json_error_t error; json_int_t account_no; + const char *bank_uri; + const char *sig_s; + struct TALER_MasterWireDetailsPS wsd; + struct TALER_MasterSignatureP sig; if (0 != json_unpack_ex ((json_t *) wire, &error, 0, - "{s:I}", - "account_number", &account_no)) + "{s:I, s:s}", + "account_number", &account_no, + "bank_uri", &bank_uri)) { - GNUNET_break (0); + GNUNET_break_op (0); return GNUNET_SYSERR; } if ( (account_no < 0) || @@ -350,14 +314,119 @@ test_wire_validate (void *cls, GNUNET_break (0); return GNUNET_SYSERR; } - /* FIXME: should check signature here in the future! - (note: right now the sig is not properly provided - by the exchange due to the way account data is - specified in the configuration) */ + if ( (NULL != tc->bank_uri) && + (0 != strcmp (bank_uri, + tc->bank_uri)) ) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Wire specifies bank URI %s, but this exchange only supports %s\n", + bank_uri, + tc->bank_uri); + return GNUNET_NO; + } + if (NULL == master_pub) + { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Skipping signature check as master public key not given\n"); + return GNUNET_OK; + } + if (0 != + json_unpack_ex ((json_t *) wire, + &error, + 0, + "{s:s}", + "sig", &sig_s)) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Signature check required, but signature is missing\n"); + return GNUNET_NO; + } + compute_purpose (account_no, + bank_uri, + &wsd); + if (GNUNET_OK != + GNUNET_STRINGS_string_to_data (sig_s, + strlen (sig_s), + &sig, + sizeof (sig))) + { + GNUNET_break (0); + return GNUNET_SYSERR; + } + if (GNUNET_OK != + GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MASTER_TEST_DETAILS, + &wsd.purpose, + &sig.eddsa_signature, + &master_pub->eddsa_pub)) + { + GNUNET_break (0); + return GNUNET_SYSERR; + } return GNUNET_YES; } +/** + * Obtain wire transfer details in the plugin-specific format + * from the configuration. + * + * @param cls closure + * @param cfg configuration with details about wire accounts + * @param account_name which section in the configuration should we parse + * @return NULL if @a cfg fails to have valid wire details for @a account_name + */ +static json_t * +test_get_wire_details (void *cls, + const struct GNUNET_CONFIGURATION_Handle *cfg, + const char *account_name) +{ + struct TestClosure *tc = cls; + char *test_wire_file; + json_error_t err; + json_t *ret; + + /* Fetch reply */ + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_filename (cfg, + account_name, + "TEST_RESPONSE_FILE", + &test_wire_file)) + { + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + account_name, + "TEST_RESPONSE_FILE"); + return NULL; + } + ret = json_load_file (test_wire_file, + JSON_REJECT_DUPLICATES, + &err); + if (NULL == ret) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Failed to parse JSON in %s: %s (%s:%u)\n", + test_wire_file, + err.text, + err.source, + err.line); + GNUNET_free (test_wire_file); + return NULL; + } + if (GNUNET_YES != test_wire_validate (tc, + ret, + NULL)) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Failed to validate TEST wire data in %s\n", + test_wire_file); + GNUNET_free (test_wire_file); + json_decref (ret); + return NULL; + } + GNUNET_free (test_wire_file); + return ret; +} + + GNUNET_NETWORK_STRUCT_BEGIN /** * Format we used for serialized transaction data. @@ -460,11 +529,11 @@ test_prepare_wire_transfer (void *cls, struct TALER_WIRE_PrepareHandle *pth; if (GNUNET_YES != - test_wire_validate (cls, + test_wire_validate (tc, wire, NULL)) { - GNUNET_break (0); + GNUNET_break_op (0); return NULL; } pth = GNUNET_new (struct TALER_WIRE_PrepareHandle); @@ -624,7 +693,11 @@ test_execute_wire_transfer (void *cls, struct BufFormatP bf; if (NULL == tc->bank) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Bank not initialized, cannot do transfers!\n"); return NULL; /* not initialized with configuration, cannot do transfers */ + } if ( (buf_size <= sizeof (struct BufFormatP)) || ('\0' != buf[buf_size -1]) ) { @@ -645,7 +718,7 @@ test_execute_wire_transfer (void *cls, return NULL; } GNUNET_assert (GNUNET_YES == - test_wire_validate (NULL, + test_wire_validate (tc, wire, NULL)); if (0 != @@ -714,7 +787,6 @@ libtaler_plugin_wire_test_init (void *cls) struct GNUNET_CONFIGURATION_Handle *cfg = cls; struct TestClosure *tc; struct TALER_WIRE_Plugin *plugin; - char *uri; tc = GNUNET_new (struct TestClosure); if (NULL != cfg) @@ -723,7 +795,7 @@ libtaler_plugin_wire_test_init (void *cls) GNUNET_CONFIGURATION_get_value_string (cfg, "wire-outgoing-test", "BANK_URI", - &uri)) + &tc->bank_uri)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, "wire-outgoing-test", @@ -734,13 +806,13 @@ libtaler_plugin_wire_test_init (void *cls) if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (cfg, "wire-outgoing-test", - "BANK_ACCOUNT_NUMBER", + "EXCHANGE_ACCOUNT_NUMBER", &tc->exchange_account_outgoing_no)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "wire-incoming-test", - "BANK_ACCOUNT_NUMBER"); - GNUNET_free (uri); + "wire-outgoing-test", + "EXCHANGE_ACCOUNT_NUMBER"); + GNUNET_free (tc->bank_uri); GNUNET_free (tc); return NULL; } @@ -753,16 +825,16 @@ libtaler_plugin_wire_test_init (void *cls) GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, "exchange", "CURRENCY"); - GNUNET_free (uri); + GNUNET_free (tc->bank_uri); GNUNET_free (tc); return NULL; } - tc->bank = TALER_BANK_init (uri); - GNUNET_free (uri); + tc->bank = TALER_BANK_init (tc->bank_uri); if (NULL == tc->bank) { GNUNET_break (0); GNUNET_free (tc->currency); + GNUNET_free (tc->bank_uri); GNUNET_free (tc); return NULL; } @@ -804,6 +876,7 @@ libtaler_plugin_wire_test_done (void *cls) tc->bank = NULL; } GNUNET_free_non_null (tc->currency); + GNUNET_free_non_null (tc->bank_uri); GNUNET_free (tc); GNUNET_free (plugin); return NULL; diff --git a/src/wire/wire-sepa.conf b/src/wire/wire-sepa.conf index 0ee17db30..7321a2be6 100644 --- a/src/wire/wire-sepa.conf +++ b/src/wire/wire-sepa.conf @@ -1,7 +1,10 @@ # Configuration for SEPA wire plugin. [wire-incoming-sepa] +# This is the response we give out for the /wire request. It provides +# wallets with the bank information for transfers to the exchange. SEPA_RESPONSE_FILE = ${TALER_CONFIG_HOME}/sepa.json -[wire-incoming-sepa] -SEPA_RESPONSE_FILE = ${TALER_CONFIG_HOME}/sepa.json +[wire-outgoing-sepa] +# This section should contain the options required for making outgoing +# SEPA transfers. Not yet supported (need libebics). diff --git a/src/wire/wire-test.conf b/src/wire/wire-test.conf index f2a71e2e4..98e486acb 100644 --- a/src/wire/wire-test.conf +++ b/src/wire/wire-test.conf @@ -1,14 +1,16 @@ +# This file is in the public domain. +# [wire-incoming-test] -# What is the main website of the bank? -# BANK_URI = "http://localhost:8082/" -# Into which account at the 'bank' should incoming -# wire transfers be made? -# BANK_ACCOUNT_NUMBER = 2 +# This is the response we give out for the /wire request. It provides +# wallets with the bank information for transfers to the exchange. +TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/test.json [wire-outgoing-test] -# What is the main website of the bank? -# BANK_URI = "http://localhost:8082/" +# For outgoing transfers, we need to know the exchange's +# account number at the bank. +EXCHANGE_ACCOUNT_NUMBER = 2 -# From which account at the 'bank' should outgoing -# wire transfers be made? -# BANK_ACCOUNT_NUMBER = 3 +# For transfers made by the exchange, we need to know +# the URI of the bank (where the /admin/add/incoming API +# is avaialble). +# BANK_URI = https://bank.demo.taler.net/ From af91cd87d6fb7d2a142557038222121e4911a921 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 11 Apr 2016 13:01:20 +0200 Subject: [PATCH 80/91] use libtalerwire instead of duplicating logic --- src/exchange-tools/Makefile.am | 1 + src/exchange-tools/taler-exchange-wire.c | 19 +++++-------------- src/exchange/Makefile.am | 3 ++- .../taler-exchange-httpd_validation.c | 19 +++++-------------- 4 files changed, 13 insertions(+), 29 deletions(-) diff --git a/src/exchange-tools/Makefile.am b/src/exchange-tools/Makefile.am index d283979c8..631f3af20 100644 --- a/src/exchange-tools/Makefile.am +++ b/src/exchange-tools/Makefile.am @@ -45,6 +45,7 @@ taler_exchange_wire_SOURCES = \ taler-exchange-wire.c taler_exchange_wire_LDADD = \ $(LIBGCRYPT_LIBS) \ + $(top_builddir)/src/wire/libtalerwire.la \ $(top_builddir)/src/util/libtalerutil.la \ -lgnunetjson \ -lgnunetutil \ diff --git a/src/exchange-tools/taler-exchange-wire.c b/src/exchange-tools/taler-exchange-wire.c index 930086d39..a826657fb 100644 --- a/src/exchange-tools/taler-exchange-wire.c +++ b/src/exchange-tools/taler-exchange-wire.c @@ -23,6 +23,7 @@ #include #include "taler_crypto_lib.h" #include "taler_wire_plugin.h" +#include "taler_wire_lib.h" #include "taler_signatures.h" @@ -90,7 +91,6 @@ main (int argc, json_error_t err; char *json_out; struct GNUNET_HashCode salt; - char *lib_name; struct TALER_WIRE_Plugin *plugin; GNUNET_assert (GNUNET_OK == @@ -159,20 +159,15 @@ main (int argc, GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE, &salt, sizeof (salt)); - (void) GNUNET_asprintf (&lib_name, - "libtaler_plugin_wire_%s", - method); - plugin = GNUNET_PLUGIN_load (lib_name, - NULL); + plugin = TALER_WIRE_plugin_load (cfg, + method); if (NULL == plugin) { - GNUNET_free (lib_name); GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Wire transfer method `%s' not supported\n", method); return 1; } - plugin->library_name = lib_name; if (GNUNET_OK != plugin->sign_wire_details (plugin->cls, j, @@ -182,14 +177,10 @@ main (int argc, { /* sign function should have logged applicable errors */ json_decref (j); - GNUNET_PLUGIN_unload (lib_name, - plugin); - GNUNET_free (lib_name); + TALER_WIRE_plugin_unload (plugin); return 1; } - GNUNET_PLUGIN_unload (lib_name, - plugin); - GNUNET_free (lib_name); + TALER_WIRE_plugin_unload (plugin); GNUNET_free (eddsa_priv); /* add signature and salt to JSON message */ diff --git a/src/exchange/Makefile.am b/src/exchange/Makefile.am index dc7225b0c..a283e78b8 100644 --- a/src/exchange/Makefile.am +++ b/src/exchange/Makefile.am @@ -42,9 +42,10 @@ taler_exchange_httpd_SOURCES = \ taler-exchange-httpd_validation.c taler-exchange-httpd_validation.h taler_exchange_httpd_LDADD = \ $(LIBGCRYPT_LIBS) \ + $(top_builddir)/src/wire/libtalerwire.la \ $(top_builddir)/src/json/libtalerjson.la \ - $(top_builddir)/src/util/libtalerutil.la \ $(top_builddir)/src/exchangedb/libtalerexchangedb.la \ + $(top_builddir)/src/util/libtalerutil.la \ -lmicrohttpd \ -lgnunetutil \ -lgnunetjson \ diff --git a/src/exchange/taler-exchange-httpd_validation.c b/src/exchange/taler-exchange-httpd_validation.c index 12244c518..bc18767ed 100644 --- a/src/exchange/taler-exchange-httpd_validation.c +++ b/src/exchange/taler-exchange-httpd_validation.c @@ -23,6 +23,7 @@ #include #include "taler-exchange-httpd.h" #include "taler-exchange-httpd_validation.h" +#include "taler_wire_lib.h" #include "taler_wire_plugin.h" @@ -76,7 +77,6 @@ TMH_VALIDATION_init (const struct GNUNET_CONFIGURATION_Handle *cfg) { struct Plugin *p; char *wireformats; - char *lib_name; const char *token; /* Find out list of supported wire formats */ @@ -97,24 +97,19 @@ TMH_VALIDATION_init (const struct GNUNET_CONFIGURATION_Handle *cfg) token = strtok (NULL, " ")) { - (void) GNUNET_asprintf (&lib_name, - "libtaler_plugin_wire_%s", - token); p = GNUNET_new (struct Plugin); p->type = GNUNET_strdup (token); - p->plugin = GNUNET_PLUGIN_load (lib_name, - (void *) cfg); + p->plugin = TALER_WIRE_plugin_load (cfg, + token); if (NULL == p->plugin) { GNUNET_free (p); GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to load plugin %s\n", - lib_name); - GNUNET_free (lib_name); + token); TMH_VALIDATION_done (); return GNUNET_SYSERR; } - p->plugin->library_name = lib_name; GNUNET_CONTAINER_DLL_insert (wire_head, wire_tail, p); @@ -131,17 +126,13 @@ void TMH_VALIDATION_done () { struct Plugin *p; - char *lib_name; while (NULL != (p = wire_head)) { GNUNET_CONTAINER_DLL_remove (wire_head, wire_tail, p); - lib_name = p->plugin->library_name; - GNUNET_assert (NULL == GNUNET_PLUGIN_unload (lib_name, - p->plugin)); - GNUNET_free (lib_name); + TALER_WIRE_plugin_unload (p->plugin); GNUNET_free (p->type); GNUNET_free (p); } From aee99021a7c889614fcdd9677393315c80133f7a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 11 Apr 2016 13:02:58 +0200 Subject: [PATCH 81/91] reduce unnecessary #includes --- src/exchange-tools/taler-exchange-wire.c | 1 - src/exchange/taler-exchange-httpd_validation.c | 1 - 2 files changed, 2 deletions(-) diff --git a/src/exchange-tools/taler-exchange-wire.c b/src/exchange-tools/taler-exchange-wire.c index a826657fb..c57e45f09 100644 --- a/src/exchange-tools/taler-exchange-wire.c +++ b/src/exchange-tools/taler-exchange-wire.c @@ -22,7 +22,6 @@ #include #include #include "taler_crypto_lib.h" -#include "taler_wire_plugin.h" #include "taler_wire_lib.h" #include "taler_signatures.h" diff --git a/src/exchange/taler-exchange-httpd_validation.c b/src/exchange/taler-exchange-httpd_validation.c index bc18767ed..830120a31 100644 --- a/src/exchange/taler-exchange-httpd_validation.c +++ b/src/exchange/taler-exchange-httpd_validation.c @@ -24,7 +24,6 @@ #include "taler-exchange-httpd.h" #include "taler-exchange-httpd_validation.h" #include "taler_wire_lib.h" -#include "taler_wire_plugin.h" /** From 58373f2a92536be08db1fc7e9c4dc872e382c2c4 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 11 Apr 2016 13:16:12 +0200 Subject: [PATCH 82/91] adding new test, still failing --- src/wire/Makefile.am | 15 ++++- src/wire/test_wire_plugin.c | 106 ++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+), 2 deletions(-) create mode 100644 src/wire/test_wire_plugin.c diff --git a/src/wire/Makefile.am b/src/wire/Makefile.am index 0ed5f7be9..107ceb379 100644 --- a/src/wire/Makefile.am +++ b/src/wire/Makefile.am @@ -76,10 +76,12 @@ libtalerwire_la_LDFLAGS = \ AM_TESTS_ENVIRONMENT=export TALER_PREFIX=$${TALER_PREFIX:-@libdir@};export PATH=$${TALER_PREFIX:-@prefix@}/bin:$$PATH; TESTS = \ - test_sepa_wireformat + test_sepa_wireformat \ + test_wire_plugin check_PROGRAMS= \ - test_sepa_wireformat + test_sepa_wireformat \ + test_wire_plugin @@ -90,3 +92,12 @@ test_sepa_wireformat_LDADD = \ -ljansson \ libtalerwire.la \ $(top_builddir)/src/util/libtalerutil.la + + +test_wire_plugin_SOURCES = \ + test_wire_plugin.c +test_wire_plugin_LDADD = \ + -lgnunetutil \ + -ljansson \ + libtalerwire.la \ + $(top_builddir)/src/util/libtalerutil.la diff --git a/src/wire/test_wire_plugin.c b/src/wire/test_wire_plugin.c new file mode 100644 index 000000000..9f61b21fe --- /dev/null +++ b/src/wire/test_wire_plugin.c @@ -0,0 +1,106 @@ +/* + This file is part of TALER + (C) 2015, 2016 GNUnet e.V. and Inria + + TALER is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + TALER; see the file COPYING. If not, If not, see +*/ +/** + * @file wire/test_wire_plugin.c + * @brief Tests for wire plugins + * @author Christian Grothoff + * @author Sree Harsha Totakura + */ +#include "platform.h" +#include "taler_util.h" +#include "taler_wire_lib.h" +#include "taler_wire_plugin.h" + + +/** + * Definitions for a test with a plugin. + */ +struct TestBlock { + + /** + * Name of the plugin to test. + */ + const char *plugin_name; + + /** + * JSON template expected by the plugin for an account definition. + */ + const char *json_proto; + +}; + + +/** + * List of plugins and (unsigned) JSON account definitions + * to use for the tests. + */ +static struct TestBlock tests[] = { + { "sepa", "{ \"iban\":3 }" }, + { "test", "{ \"bank_uri\":3 }" }, + { NULL, NULL } +}; + + +int +main (int argc, + const char *const argv[]) +{ + json_t *wire; + json_error_t error; + int ret; + struct GNUNET_CONFIGURATION_Handle *cfg; + struct TALER_WIRE_Plugin *plugin; + const struct TestBlock *test; + unsigned int i; + + GNUNET_log_setup ("test-wire-plugin", + "WARNING", + NULL); + cfg = GNUNET_CONFIGURATION_create (); + GNUNET_CONFIGURATION_set_value_string (cfg, + "exchange", + "currency", + "EUR"); + ret = GNUNET_OK; + for (i=0;NULL != (test = &tests[i])->plugin_name;i++) + { + plugin = TALER_WIRE_plugin_load (cfg, + test->plugin_name); + GNUNET_assert (NULL != plugin); + wire = json_loads (test->json_proto, 0, NULL); + GNUNET_assert (NULL != wire); + // FIXME: do test... + json_decref (wire); + TALER_WIRE_plugin_unload (plugin); + if (GNUNET_OK != ret) + { + fprintf (stdout, + "%s FAILED\n", + test->plugin_name); + break; + } + else + { + fprintf (stdout, + "%s PASS\n", + test->plugin_name); + } + } + GNUNET_CONFIGURATION_destroy (cfg); + if (GNUNET_NO == ret) + return 1; + return 0; +} From a7f2496795a80dca6fbbfb5a20f0ee4b7a72650e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 11 Apr 2016 15:59:24 +0200 Subject: [PATCH 83/91] adding wire plugin tests, resolving #4357 --- .gitignore | 1 + src/wire/Makefile.am | 4 +- src/wire/plugin_wire_sepa.c | 3 + src/wire/test_wire_plugin.c | 108 +++++++++++++++++++++++++--- src/wire/test_wire_plugin.conf | 21 ++++++ src/wire/test_wire_plugin_key.priv | 1 + src/wire/test_wire_plugin_sepa.json | 8 +++ src/wire/test_wire_plugin_test.json | 7 ++ 8 files changed, 143 insertions(+), 10 deletions(-) create mode 100644 src/wire/test_wire_plugin.conf create mode 100644 src/wire/test_wire_plugin_key.priv create mode 100644 src/wire/test_wire_plugin_sepa.json create mode 100644 src/wire/test_wire_plugin_test.json diff --git a/.gitignore b/.gitignore index fc31e919e..20d4b52c2 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,7 @@ src/exchange-tools/taler-exchange-wire src/exchangedb/perf-exchangedb src/json/test_json src/wire/test_sepa_wireformat +src/wire/test_wire_plugin src/pq/test_pq src/util/test_amount src/util/test_crypto diff --git a/src/wire/Makefile.am b/src/wire/Makefile.am index 107ceb379..debb27828 100644 --- a/src/wire/Makefile.am +++ b/src/wire/Makefile.am @@ -15,7 +15,8 @@ pkgcfg_DATA = \ EXTRA_DIST = \ wire-sepa.conf \ - wire-test.conf + wire-test.conf \ + test_wire_plugin.conf plugindir = $(libdir)/taler @@ -97,6 +98,7 @@ test_sepa_wireformat_LDADD = \ test_wire_plugin_SOURCES = \ test_wire_plugin.c test_wire_plugin_LDADD = \ + -lgnunetjson \ -lgnunetutil \ -ljansson \ libtalerwire.la \ diff --git a/src/wire/plugin_wire_sepa.c b/src/wire/plugin_wire_sepa.c index e0a3426c2..6f01167d9 100644 --- a/src/wire/plugin_wire_sepa.c +++ b/src/wire/plugin_wire_sepa.c @@ -539,6 +539,9 @@ sepa_get_wire_details (void *cls, "SEPA_RESPONSE_FILE", &sepa_wire_file)) { + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING, + account_name, + "SEPA_RESPONSE_FILE"); return NULL; } ret = json_load_file (sepa_wire_file, diff --git a/src/wire/test_wire_plugin.c b/src/wire/test_wire_plugin.c index 9f61b21fe..27b4366c1 100644 --- a/src/wire/test_wire_plugin.c +++ b/src/wire/test_wire_plugin.c @@ -23,6 +23,8 @@ #include "taler_util.h" #include "taler_wire_lib.h" #include "taler_wire_plugin.h" +#include +#include /** @@ -48,32 +50,120 @@ struct TestBlock { * to use for the tests. */ static struct TestBlock tests[] = { - { "sepa", "{ \"iban\":3 }" }, - { "test", "{ \"bank_uri\":3 }" }, + { "sepa", "{ \"type\":\"sepa\", \"iban\":\"DE67830654080004822650\", \"name\":\"GNUnet e.V.\", \"bic\":\"GENODEF1SLR\" }" }, + { "test", "{ \"type\":\"test\", \"bank_uri\":\"http://localhost/\", \"account_number\":42 }" }, { NULL, NULL } }; +/** + * Private key used to sign wire details. + */ +static struct TALER_MasterPrivateKeyP priv_key; + +/** + * Public key matching #priv_key. + */ +static struct TALER_MasterPublicKeyP pub_key; + +/** + * Our configuration. + */ +static struct GNUNET_CONFIGURATION_Handle *cfg; + + +/** + * Run the test. + * + * @param name of the test + * @param plugin plugin to test + * @param wire wire details for testing + * @return #GNUNET_OK on success + */ +static int +run_test (const char *name, + struct TALER_WIRE_Plugin *plugin, + json_t *wire) +{ + struct GNUNET_HashCode salt; + struct TALER_MasterSignatureP sig; + json_t *lwire; + + GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE, + &salt, + sizeof (salt)); + if (GNUNET_OK != + plugin->sign_wire_details (plugin->cls, + wire, + &priv_key, + &salt, + &sig)) + { + GNUNET_break (0); + return GNUNET_SYSERR; + } + json_object_set_new (wire, + "salt", + GNUNET_JSON_from_data (&salt, + sizeof (salt))); + json_object_set_new (wire, + "sig", + GNUNET_JSON_from_data (&sig, + sizeof (sig))); + if (GNUNET_OK != + plugin->wire_validate (plugin->cls, + wire, + &pub_key)) + { + GNUNET_break (0); + return GNUNET_SYSERR; + } + /* load wire details from file */ + lwire = plugin->get_wire_details (plugin->cls, + cfg, + name); + if (NULL == lwire) + { + GNUNET_break (0); + return GNUNET_SYSERR; + } + if (GNUNET_OK != + plugin->wire_validate (plugin->cls, + lwire, + &pub_key)) + { + GNUNET_break (0); + json_decref (lwire); + return GNUNET_SYSERR; + } + json_decref (lwire); + return GNUNET_OK; +} + + int main (int argc, const char *const argv[]) { json_t *wire; - json_error_t error; int ret; - struct GNUNET_CONFIGURATION_Handle *cfg; struct TALER_WIRE_Plugin *plugin; const struct TestBlock *test; unsigned int i; + struct GNUNET_CRYPTO_EddsaPrivateKey *pk; GNUNET_log_setup ("test-wire-plugin", "WARNING", NULL); cfg = GNUNET_CONFIGURATION_create (); - GNUNET_CONFIGURATION_set_value_string (cfg, - "exchange", - "currency", - "EUR"); + GNUNET_assert (GNUNET_OK == + GNUNET_CONFIGURATION_load (cfg, + "test_wire_plugin.conf")); + pk = GNUNET_CRYPTO_eddsa_key_create_from_file ("test_wire_plugin_key.priv"); + priv_key.eddsa_priv = *pk; + GNUNET_free (pk); + GNUNET_CRYPTO_eddsa_key_get_public (&priv_key.eddsa_priv, + &pub_key.eddsa_pub); ret = GNUNET_OK; for (i=0;NULL != (test = &tests[i])->plugin_name;i++) { @@ -82,7 +172,7 @@ main (int argc, GNUNET_assert (NULL != plugin); wire = json_loads (test->json_proto, 0, NULL); GNUNET_assert (NULL != wire); - // FIXME: do test... + ret = run_test (test->plugin_name, plugin, wire); json_decref (wire); TALER_WIRE_plugin_unload (plugin); if (GNUNET_OK != ret) diff --git a/src/wire/test_wire_plugin.conf b/src/wire/test_wire_plugin.conf new file mode 100644 index 000000000..ece816954 --- /dev/null +++ b/src/wire/test_wire_plugin.conf @@ -0,0 +1,21 @@ +# This file is in the public domain. +# +[test] +# This is the response we give out for the /wire request. It provides +# wallets with the bank information for transfers to the exchange. +TEST_RESPONSE_FILE = test_wire_plugin_test.json + +[sepa] +# This is the response we give out for the /wire request. It provides +# wallets with the bank information for transfers to the exchange. +SEPA_RESPONSE_FILE = test_wire_plugin_sepa.json + + +[wire-outgoing-test] +# For transfers made by the exchange, we need to know +# the URI of the bank (where the /admin/add/incoming API +# is avaialble). +BANK_URI = http://localhost/ + +[exchange] +CURRENCY = "EUR" diff --git a/src/wire/test_wire_plugin_key.priv b/src/wire/test_wire_plugin_key.priv new file mode 100644 index 000000000..26b4f26f6 --- /dev/null +++ b/src/wire/test_wire_plugin_key.priv @@ -0,0 +1 @@ +?Sgb@Js; %aKȉs_Hў \ No newline at end of file diff --git a/src/wire/test_wire_plugin_sepa.json b/src/wire/test_wire_plugin_sepa.json new file mode 100644 index 000000000..175345f0c --- /dev/null +++ b/src/wire/test_wire_plugin_sepa.json @@ -0,0 +1,8 @@ +{ + "salt": "32V01R7K4T02S74PZZMVXRQ1K7FR948RBNB9BJ5Z101HEQFH7CW7J82006GY3BPTGQ4FM775PSSRD3K9MY97HSNVVCGEVBPVSAQ2710", + "type": "sepa", + "iban": "DE67830654080004822650", + "sig": "K48GPPM715ZXX0DC597WESD5ECT3R0B3TAFQMB68SBF4K5CZ5KCE9NESN1JX412SPZ82PSV7JAPVJFXDDTZ63YV4295S5RC28E4221G", + "name": "GNUnet e.V.", + "bic": "GENODEF1SLR" +} \ No newline at end of file diff --git a/src/wire/test_wire_plugin_test.json b/src/wire/test_wire_plugin_test.json new file mode 100644 index 000000000..6fe6b2359 --- /dev/null +++ b/src/wire/test_wire_plugin_test.json @@ -0,0 +1,7 @@ +{ + "type": "test", + "bank_uri": "http://localhost/", + "sig": "KX1CMHNFH1WE10244AEF07AXHJCF9PZDZVNZBC9P4EJEQ1MH1Y3C2TWF08VTQMK4N5TCV0V1VTGWSV0WB8TB9YQRZW87F5A6KCEZ81R", + "account_number": 42, + "salt": "EZV905MQPVAZEMGC6SEZQF2Z75P6ZKTN8TX00JHN11S7J81DQ78G8Z551K6TGR9WHPP0JW1X9J9X9CVRY48JTHBCP6Q4XKJ6R2G18G0" +} \ No newline at end of file From a2bb69910a4a10453d66f37f02eaefb6bb511c35 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 11 Apr 2016 19:27:18 +0200 Subject: [PATCH 84/91] refactor /wire/deposit response generation to do all JSON logic in httpd_responses.c --- src/exchange/taler-exchange-httpd_db.c | 66 ++++++++++++------- src/exchange/taler-exchange-httpd_responses.c | 29 ++++++-- src/exchange/taler-exchange-httpd_responses.h | 47 ++++++++++++- 3 files changed, 111 insertions(+), 31 deletions(-) diff --git a/src/exchange/taler-exchange-httpd_db.c b/src/exchange/taler-exchange-httpd_db.c index 7698b92bb..1d9e79daa 100644 --- a/src/exchange/taler-exchange-httpd_db.c +++ b/src/exchange/taler-exchange-httpd_db.c @@ -1579,6 +1579,16 @@ struct WtidTransactionContext */ struct GNUNET_HashCode h_wire; + /** + * Head of DLL with details for /wire/deposit response. + */ + struct TMH_WireDepositDetail *wdd_head; + + /** + * Head of DLL with details for /wire/deposit response. + */ + struct TMH_WireDepositDetail *wdd_tail; + /** * JSON array with details about the individual deposits. */ @@ -1621,6 +1631,7 @@ handle_transaction_data (void *cls, { struct WtidTransactionContext *ctx = cls; struct TALER_Amount delta; + struct TMH_WireDepositDetail *wdd; if (GNUNET_SYSERR == ctx->is_valid) return; @@ -1671,17 +1682,15 @@ handle_transaction_data (void *cls, return; } } - /* NOTE: We usually keep JSON stuff out of the _DB file, and this - is also ugly if we ever add signatures over this data. (#4135) */ - json_array_append (ctx->deposits, - json_pack ("{s:o, s:o, s:o, s:I, s:o}", - "deposit_value", TALER_JSON_from_amount (deposit_value), - "deposit_fee", TALER_JSON_from_amount (deposit_fee), - "H_contract", GNUNET_JSON_from_data (h_contract, - sizeof (struct GNUNET_HashCode)), - "transaction_id", (json_int_t) transaction_id, - "coin_pub", GNUNET_JSON_from_data (coin_pub, - sizeof (struct TALER_CoinSpendPublicKeyP)))); + wdd = GNUNET_new (struct TMH_WireDepositDetail); + wdd->deposit_value = *deposit_value; + wdd->deposit_fee = *deposit_fee; + wdd->h_contract = *h_contract; + wdd->transaction_id = transaction_id; + wdd->coin_pub = *coin_pub; + GNUNET_CONTAINER_DLL_insert (ctx->wdd_head, + ctx->wdd_tail, + wdd); } @@ -1700,6 +1709,7 @@ TMH_DB_execute_wire_deposits (struct MHD_Connection *connection, int ret; struct WtidTransactionContext ctx; struct TALER_EXCHANGEDB_Session *session; + struct TMH_WireDepositDetail *wdd; if (NULL == (session = TMH_plugin->get_session (TMH_plugin->cls, TMH_test_mode))) @@ -1708,7 +1718,6 @@ TMH_DB_execute_wire_deposits (struct MHD_Connection *connection, return TMH_RESPONSE_reply_internal_db_error (connection); } ctx.is_valid = GNUNET_NO; - ctx.deposits = json_array (); ret = TMH_plugin->lookup_wire_transfer (TMH_plugin->cls, session, wtid, @@ -1717,26 +1726,35 @@ TMH_DB_execute_wire_deposits (struct MHD_Connection *connection, if (GNUNET_SYSERR == ret) { GNUNET_break (0); - json_decref (ctx.deposits); - return TMH_RESPONSE_reply_internal_db_error (connection); + ret = TMH_RESPONSE_reply_internal_db_error (connection); + goto cleanup; } if (GNUNET_SYSERR == ctx.is_valid) { GNUNET_break (0); - json_decref (ctx.deposits); - return TMH_RESPONSE_reply_internal_db_error (connection); + ret = TMH_RESPONSE_reply_internal_db_error (connection); + goto cleanup; } if (GNUNET_NO == ctx.is_valid) { - json_decref (ctx.deposits); - return TMH_RESPONSE_reply_arg_unknown (connection, - "wtid"); + ret = TMH_RESPONSE_reply_arg_unknown (connection, + "wtid"); + goto cleanup; } - return TMH_RESPONSE_reply_wire_deposit_details (connection, - &ctx.total, - &ctx.merchant_pub, - &ctx.h_wire, - ctx.deposits); + ret = TMH_RESPONSE_reply_wire_deposit_details (connection, + &ctx.total, + &ctx.merchant_pub, + &ctx.h_wire, + ctx.wdd_head); + cleanup: + while (NULL != (wdd = ctx.wdd_head)) + { + GNUNET_CONTAINER_DLL_remove (ctx.wdd_head, + ctx.wdd_tail, + wdd); + GNUNET_free (wdd); + } + return ret; } diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c index a47b29cae..6c839b382 100644 --- a/src/exchange/taler-exchange-httpd_responses.c +++ b/src/exchange/taler-exchange-httpd_responses.c @@ -1133,13 +1133,13 @@ TMH_RESPONSE_reply_deposit_wtid (struct MHD_Connection *connection, MHD_HTTP_OK, "{s:o, s:o, s:o, s:o, s:o, s:o}", "wtid", GNUNET_JSON_from_data (wtid, - sizeof (*wtid)), + sizeof (*wtid)), "execution_time", GNUNET_JSON_from_time_abs (exec_time), "coin_contribution", TALER_JSON_from_amount (coin_contribution), "exchange_sig", GNUNET_JSON_from_data (&sig, - sizeof (sig)), + sizeof (sig)), "exchange_pub", GNUNET_JSON_from_data (&pub, - sizeof (pub))); + sizeof (pub))); } @@ -1151,7 +1151,7 @@ TMH_RESPONSE_reply_deposit_wtid (struct MHD_Connection *connection, * @param total total amount that was transferred * @param merchant_pub public key of the merchant * @param h_wire destination account - * @param deposits details about the combined deposits + * @param wdd_head linked list with details about the combined deposits * @return MHD result code */ int @@ -1159,8 +1159,27 @@ TMH_RESPONSE_reply_wire_deposit_details (struct MHD_Connection *connection, const struct TALER_Amount *total, const struct TALER_MerchantPublicKeyP *merchant_pub, const struct GNUNET_HashCode *h_wire, - json_t *deposits) + const struct TMH_WireDepositDetail *wdd_head) { + const struct TMH_WireDepositDetail *wdd_pos; + json_t *deposits; + + deposits = json_array (); + + /* NOTE: We usually keep JSON stuff out of the _DB file, and this + is also ugly if we ever add signatures over this data. (#4135) */ + for (wdd_pos = wdd_head; NULL != wdd_pos; wdd_pos = wdd_pos->next) + { + json_array_append (deposits, + json_pack ("{s:o, s:o, s:o, s:I, s:o}", + "deposit_value", TALER_JSON_from_amount (&wdd_pos->deposit_value), + "deposit_fee", TALER_JSON_from_amount (&wdd_pos->deposit_fee), + "H_contract", GNUNET_JSON_from_data (&wdd_pos->h_contract, + sizeof (struct GNUNET_HashCode)), + "transaction_id", (json_int_t) wdd_pos->transaction_id, + "coin_pub", GNUNET_JSON_from_data (&wdd_pos->coin_pub, + sizeof (struct TALER_CoinSpendPublicKeyP)))); + } /* FIXME: #4135: signing not implemented here */ return TMH_RESPONSE_reply_json_pack (connection, MHD_HTTP_OK, diff --git a/src/exchange/taler-exchange-httpd_responses.h b/src/exchange/taler-exchange-httpd_responses.h index 817273a58..c7139bf20 100644 --- a/src/exchange/taler-exchange-httpd_responses.h +++ b/src/exchange/taler-exchange-httpd_responses.h @@ -297,6 +297,49 @@ TMH_RESPONSE_reply_deposit_wtid (struct MHD_Connection *connection, struct GNUNET_TIME_Absolute exec_time); +/** + * Detail for /wire/deposit response. + */ +struct TMH_WireDepositDetail +{ + + /** + * We keep deposit details in a DLL. + */ + struct TMH_WireDepositDetail *next; + + /** + * We keep deposit details in a DLL. + */ + struct TMH_WireDepositDetail *prev; + + /** + * Hash of the contract + */ + struct GNUNET_HashCode h_contract; + + /** + * Merchant's transaction ID. + */ + uint64_t transaction_id; + + /** + * Coin's public key. + */ + struct TALER_CoinSpendPublicKeyP coin_pub; + + /** + * Total value of the coin. + */ + struct TALER_Amount deposit_value; + + /** + * Fees charged by the exchange for the deposit. + */ + struct TALER_Amount deposit_fee; +}; + + /** * A merchant asked for transaction details about a wire transfer. * Provide them. Generates the 200 reply. @@ -305,7 +348,7 @@ TMH_RESPONSE_reply_deposit_wtid (struct MHD_Connection *connection, * @param total total amount that was transferred * @param merchant_pub public key of the merchant * @param h_wire destination account - * @param deposits details about the combined deposits + * @param wdd_head linked list with details about the combined deposits * @return MHD result code */ int @@ -313,7 +356,7 @@ TMH_RESPONSE_reply_wire_deposit_details (struct MHD_Connection *connection, const struct TALER_Amount *total, const struct TALER_MerchantPublicKeyP *merchant_pub, const struct GNUNET_HashCode *h_wire, - json_t *deposits); + const struct TMH_WireDepositDetail *wdd_head); /** From ce9dd3365dd70fb360f192dfead552aae539ca3e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 11 Apr 2016 19:54:54 +0200 Subject: [PATCH 85/91] implement signing of /wire/deposit replies (#4135) --- src/exchange-lib/exchange_api_wire_deposits.c | 11 ++- src/exchange/taler-exchange-httpd_db.c | 2 + src/exchange/taler-exchange-httpd_responses.c | 37 +++++++-- src/include/taler_signatures.h | 75 +++++++++++++++++++ 4 files changed, 117 insertions(+), 8 deletions(-) diff --git a/src/exchange-lib/exchange_api_wire_deposits.c b/src/exchange-lib/exchange_api_wire_deposits.c index 0112f8565..5b661920d 100644 --- a/src/exchange-lib/exchange_api_wire_deposits.c +++ b/src/exchange-lib/exchange_api_wire_deposits.c @@ -101,8 +101,12 @@ handle_wire_deposits_finished (void *cls, struct TALER_Amount total_amount; struct TALER_MerchantPublicKeyP merchant_pub; unsigned int num_details; + struct TALER_ExchangePublicKeyP pub; + struct TALER_ExchangeSignatureP sig; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_fixed_auto ("H_wire", &h_wire), + GNUNET_JSON_spec_fixed_auto ("exchange_pub", &pub), + GNUNET_JSON_spec_fixed_auto ("exchange_sig", &sig), GNUNET_JSON_spec_fixed_auto ("merchant_pub", &merchant_pub), TALER_JSON_spec_amount ("total_amount", &total_amount), GNUNET_JSON_spec_json ("details", &details_j), @@ -148,6 +152,7 @@ handle_wire_deposits_finished (void *cls, } if (0 == response_code) break; + /* FIXME: check signature (#4135) */ wdh->cb (wdh->cb_cls, response_code, json, @@ -208,9 +213,9 @@ handle_wire_deposits_finished (void *cls, */ struct TALER_EXCHANGE_WireDepositsHandle * TALER_EXCHANGE_wire_deposits (struct TALER_EXCHANGE_Handle *exchange, - const struct TALER_WireTransferIdentifierRawP *wtid, - TALER_EXCHANGE_WireDepositsCallback cb, - void *cb_cls) + const struct TALER_WireTransferIdentifierRawP *wtid, + TALER_EXCHANGE_WireDepositsCallback cb, + void *cb_cls) { struct TALER_EXCHANGE_WireDepositsHandle *wdh; struct TALER_EXCHANGE_Context *ctx; diff --git a/src/exchange/taler-exchange-httpd_db.c b/src/exchange/taler-exchange-httpd_db.c index 1d9e79daa..f63334bfd 100644 --- a/src/exchange/taler-exchange-httpd_db.c +++ b/src/exchange/taler-exchange-httpd_db.c @@ -1718,6 +1718,8 @@ TMH_DB_execute_wire_deposits (struct MHD_Connection *connection, return TMH_RESPONSE_reply_internal_db_error (connection); } ctx.is_valid = GNUNET_NO; + ctx.wdd_head = NULL; + ctx.wdd_tail = NULL; ret = TMH_plugin->lookup_wire_transfer (TMH_plugin->cls, session, wtid, diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c index 6c839b382..f8ff67228 100644 --- a/src/exchange/taler-exchange-httpd_responses.c +++ b/src/exchange/taler-exchange-httpd_responses.c @@ -1163,13 +1163,26 @@ TMH_RESPONSE_reply_wire_deposit_details (struct MHD_Connection *connection, { const struct TMH_WireDepositDetail *wdd_pos; json_t *deposits; + struct TALER_WireDepositDetailP dd; + struct GNUNET_HashContext *hash_context; + struct TALER_WireDepositDataPS wdp; + struct TALER_ExchangePublicKeyP pub; + struct TALER_ExchangeSignatureP sig; deposits = json_array (); - - /* NOTE: We usually keep JSON stuff out of the _DB file, and this - is also ugly if we ever add signatures over this data. (#4135) */ + hash_context = GNUNET_CRYPTO_hash_context_start (); for (wdd_pos = wdd_head; NULL != wdd_pos; wdd_pos = wdd_pos->next) { + dd.h_contract = wdd_pos->h_contract; + dd.transaction_id = GNUNET_htonll (wdd_pos->transaction_id); + dd.coin_pub = wdd_pos->coin_pub; + TALER_amount_hton (&dd.deposit_value, + &wdd_pos->deposit_value); + TALER_amount_hton (&dd.deposit_fee, + &wdd_pos->deposit_fee); + GNUNET_CRYPTO_hash_context_read (hash_context, + &dd, + sizeof (struct TALER_WireDepositDetailP)); json_array_append (deposits, json_pack ("{s:o, s:o, s:o, s:I, s:o}", "deposit_value", TALER_JSON_from_amount (&wdd_pos->deposit_value), @@ -1180,7 +1193,17 @@ TMH_RESPONSE_reply_wire_deposit_details (struct MHD_Connection *connection, "coin_pub", GNUNET_JSON_from_data (&wdd_pos->coin_pub, sizeof (struct TALER_CoinSpendPublicKeyP)))); } - /* FIXME: #4135: signing not implemented here */ + wdp.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE_DEPOSIT); + wdp.purpose.size = htonl (sizeof (struct TALER_WireDepositDataPS)); + TALER_amount_hton (&wdp.total, + total); + wdp.merchant_pub = *merchant_pub; + wdp.h_wire = *h_wire; + GNUNET_CRYPTO_hash_context_finish (hash_context, + &wdp.h_details); + TMH_KS_sign (&wdp.purpose, + &pub, + &sig); return TMH_RESPONSE_reply_json_pack (connection, MHD_HTTP_OK, "{s:o, s:o, s:o, s:o}", @@ -1189,7 +1212,11 @@ TMH_RESPONSE_reply_wire_deposit_details (struct MHD_Connection *connection, sizeof (struct TALER_MerchantPublicKeyP)), "h_wire", GNUNET_JSON_from_data (h_wire, sizeof (struct GNUNET_HashCode)), - "deposits", deposits); + "deposits", deposits, + "exchange_sig", GNUNET_JSON_from_data (&sig, + sizeof (sig)), + "exchange_pub", GNUNET_JSON_from_data (&pub, + sizeof (pub))); } diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h index 587cdcee5..bd892e793 100644 --- a/src/include/taler_signatures.h +++ b/src/include/taler_signatures.h @@ -112,6 +112,11 @@ */ #define TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE 1036 +/** + * Signature where the Exchange confirms the /wire/deposit response. + */ +#define TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE_DEPOSIT 1037 + /*********************/ /* Wallet signatures */ @@ -834,6 +839,76 @@ struct TALER_DepositTrackPS }; +/** + * @brief Format internally used for packing the detailed information + * to generate the signature for /wire/deposit signatures. + */ +struct TALER_WireDepositDetailP +{ + + /** + * Hash of the contract + */ + struct GNUNET_HashCode h_contract; + + /** + * Merchant's transaction ID in NBO. + */ + uint64_t transaction_id GNUNET_PACKED; + + /** + * Coin's public key. + */ + struct TALER_CoinSpendPublicKeyP coin_pub; + + /** + * Total value of the coin. + */ + struct TALER_AmountNBO deposit_value; + + /** + * Fees charged by the exchange for the deposit. + */ + struct TALER_AmountNBO deposit_fee; + +}; + + +/** + * @brief Format used to generate the signature for /wire/deposit + * replies. + */ +struct TALER_WireDepositDataPS +{ + /** + * Purpose header for the signature over the contract with + * purpose #TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE_DEPOSIT. + */ + struct GNUNET_CRYPTO_EccSignaturePurpose purpose; + + /** + * Total amount that was transferred. + */ + struct TALER_AmountNBO total; + + /** + * Public key of the merchant (for all aggregated transactions). + */ + struct TALER_MerchantPublicKeyP merchant_pub; + + /** + * Hash of wire details of the merchant. + */ + struct GNUNET_HashCode h_wire; + + /** + * Hash of the individual deposits that were aggregated, + * each in the format of a `struct TALER_WireDepositDetailP`. + */ + struct GNUNET_HashCode h_details; + +}; + /** * The contract sent by the merchant to the wallet. */ From cb987575c17bd7c570d83b516dae86b4eabfe0d2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 11 Apr 2016 20:16:58 +0200 Subject: [PATCH 86/91] check exchange signature on /wire/deposit response (#4135) --- src/exchange-lib/exchange_api_common.c | 7 ++- src/exchange-lib/exchange_api_common.h | 6 +-- src/exchange-lib/exchange_api_context.c | 10 ++-- src/exchange-lib/exchange_api_wire_deposits.c | 49 +++++++++++++++++-- 4 files changed, 55 insertions(+), 17 deletions(-) diff --git a/src/exchange-lib/exchange_api_common.c b/src/exchange-lib/exchange_api_common.c index 6d2408d93..aacbb4a2a 100644 --- a/src/exchange-lib/exchange_api_common.c +++ b/src/exchange-lib/exchange_api_common.c @@ -38,9 +38,9 @@ */ int TALER_EXCHANGE_verify_coin_history_ (const char *currency, - const struct TALER_CoinSpendPublicKeyP *coin_pub, - json_t *history, - struct TALER_Amount *total) + const struct TALER_CoinSpendPublicKeyP *coin_pub, + json_t *history, + struct TALER_Amount *total) { size_t len; size_t off; @@ -119,7 +119,6 @@ TALER_EXCHANGE_verify_coin_history_ (const char *currency, return GNUNET_SYSERR; } - // FIXME: check sig! TALER_amount_ntoh (&dr_amount, &dr->amount_with_fee); if (0 != TALER_amount_cmp (&dr_amount, diff --git a/src/exchange-lib/exchange_api_common.h b/src/exchange-lib/exchange_api_common.h index 49f486b00..2a521ceb2 100644 --- a/src/exchange-lib/exchange_api_common.h +++ b/src/exchange-lib/exchange_api_common.h @@ -34,8 +34,8 @@ */ int TALER_EXCHANGE_verify_coin_history_ (const char *currency, - const struct TALER_CoinSpendPublicKeyP *coin_pub, - json_t *history, - struct TALER_Amount *total); + const struct TALER_CoinSpendPublicKeyP *coin_pub, + json_t *history, + struct TALER_Amount *total); /* end of exchange_api_common.h */ diff --git a/src/exchange-lib/exchange_api_context.c b/src/exchange-lib/exchange_api_context.c index 544719001..8d6746a17 100644 --- a/src/exchange-lib/exchange_api_context.c +++ b/src/exchange-lib/exchange_api_context.c @@ -327,11 +327,11 @@ TALER_EXCHANGE_perform (struct TALER_EXCHANGE_Context *ctx) */ void TALER_EXCHANGE_get_select_info (struct TALER_EXCHANGE_Context *ctx, - fd_set *read_fd_set, - fd_set *write_fd_set, - fd_set *except_fd_set, - int *max_fd, - long *timeout) + fd_set *read_fd_set, + fd_set *write_fd_set, + fd_set *except_fd_set, + int *max_fd, + long *timeout) { long to; int m; diff --git a/src/exchange-lib/exchange_api_wire_deposits.c b/src/exchange-lib/exchange_api_wire_deposits.c index 5b661920d..49a50f640 100644 --- a/src/exchange-lib/exchange_api_wire_deposits.c +++ b/src/exchange-lib/exchange_api_wire_deposits.c @@ -101,12 +101,12 @@ handle_wire_deposits_finished (void *cls, struct TALER_Amount total_amount; struct TALER_MerchantPublicKeyP merchant_pub; unsigned int num_details; - struct TALER_ExchangePublicKeyP pub; - struct TALER_ExchangeSignatureP sig; + struct TALER_ExchangePublicKeyP exchange_pub; + struct TALER_ExchangeSignatureP exchange_sig; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_fixed_auto ("H_wire", &h_wire), - GNUNET_JSON_spec_fixed_auto ("exchange_pub", &pub), - GNUNET_JSON_spec_fixed_auto ("exchange_sig", &sig), + GNUNET_JSON_spec_fixed_auto ("exchange_pub", &exchange_pub), + GNUNET_JSON_spec_fixed_auto ("exchange_sig", &exchange_sig), GNUNET_JSON_spec_fixed_auto ("merchant_pub", &merchant_pub), TALER_JSON_spec_amount ("total_amount", &total_amount), GNUNET_JSON_spec_json ("details", &details_j), @@ -126,7 +126,11 @@ handle_wire_deposits_finished (void *cls, { struct TALER_WireDepositDetails details[num_details]; unsigned int i; + struct GNUNET_HashContext *hash_context; + struct TALER_WireDepositDetailP dd; + struct TALER_WireDepositDataPS wdp; + hash_context = GNUNET_CRYPTO_hash_context_start (); for (i=0;ih_contract; + dd.transaction_id = GNUNET_htonll (detail->transaction_id); + dd.coin_pub = detail->coin_pub; + TALER_amount_hton (&dd.deposit_value, + &detail->coin_value); + TALER_amount_hton (&dd.deposit_fee, + &detail->coin_fee); + GNUNET_CRYPTO_hash_context_read (hash_context, + &dd, + sizeof (struct TALER_WireDepositDetailP)); + } + /* Check signature */ + wdp.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE_DEPOSIT); + wdp.purpose.size = htonl (sizeof (struct TALER_WireDepositDataPS)); + TALER_amount_hton (&wdp.total, + &total_amount); + wdp.merchant_pub = merchant_pub; + wdp.h_wire = h_wire; + GNUNET_CRYPTO_hash_context_finish (hash_context, + &wdp.h_details); + if ( (0 == response_code /* avoid crypto if things are already wrong */) && + (GNUNET_OK != + TALER_EXCHANGE_test_signing_key (TALER_EXCHANGE_get_keys (wdh->exchange), + &exchange_pub)) ) + { + GNUNET_break_op (0); + response_code = 0; + } + if ( (0 == response_code /* avoid crypto if things are already wrong */) && + (GNUNET_OK != + TALER_EXCHANGE_test_signing_key (TALER_EXCHANGE_get_keys (wdh->exchange), + &exchange_pub)) ) + { + GNUNET_break_op (0); + response_code = 0; } if (0 == response_code) break; - /* FIXME: check signature (#4135) */ wdh->cb (wdh->cb_cls, response_code, json, From 21ea107cc0c34bf16b57833808352cd4e032fa8d Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 11 Apr 2016 21:10:20 +0200 Subject: [PATCH 87/91] newline --- src/bank-lib/test_bank_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bank-lib/test_bank_api.c b/src/bank-lib/test_bank_api.c index cc1086e73..de16958a3 100644 --- a/src/bank-lib/test_bank_api.c +++ b/src/bank-lib/test_bank_api.c @@ -528,7 +528,7 @@ main (int argc, } /* give child time to start and bind against the socket */ fprintf (stderr, - "Waiting for taler-bank-manage to be ready"); + "Waiting for taler-bank-manage to be ready\n"); cnt = 0; do { From 7e648c042ca57a7104618cfbe405a58127a12784 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 11 Apr 2016 23:44:09 +0200 Subject: [PATCH 88/91] account numbers start at 1 --- src/bank-lib/test_bank_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bank-lib/test_bank_api.c b/src/bank-lib/test_bank_api.c index de16958a3..890f413b5 100644 --- a/src/bank-lib/test_bank_api.c +++ b/src/bank-lib/test_bank_api.c @@ -474,8 +474,8 @@ run (void *cls) { .oc = OC_ADMIN_ADD_INCOMING, .label = "deposit-1", .expected_response_code = MHD_HTTP_OK, - .details.admin_add_incoming.credit_account_no = 0, - .details.admin_add_incoming.debit_account_no = 1, + .details.admin_add_incoming.credit_account_no = 1, + .details.admin_add_incoming.debit_account_no = 2, .details.admin_add_incoming.amount = "EUR:5.01" }, { .oc = OC_END } From 9f9d41dd06ed5911b9abdf3017171d411f4dc8a6 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 11 Apr 2016 23:58:02 +0200 Subject: [PATCH 89/91] set currency to default bank currency for test case --- src/bank-lib/test_bank_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bank-lib/test_bank_api.c b/src/bank-lib/test_bank_api.c index 890f413b5..1fdeaf3cc 100644 --- a/src/bank-lib/test_bank_api.c +++ b/src/bank-lib/test_bank_api.c @@ -476,7 +476,7 @@ run (void *cls) .expected_response_code = MHD_HTTP_OK, .details.admin_add_incoming.credit_account_no = 1, .details.admin_add_incoming.debit_account_no = 2, - .details.admin_add_incoming.amount = "EUR:5.01" }, + .details.admin_add_incoming.amount = "PUDOS:5.01" }, { .oc = OC_END } }; From c234a8bed842c8be3aaded936e620e7f5d32e5cb Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 13 Apr 2016 15:58:02 +0200 Subject: [PATCH 90/91] Create taler-config wrapper around gnunet-config The wrapper uses LD_PRELOAD to make sure that paths are adjusted for taler. --- src/util/Makefile.am | 12 ++++++++++++ src/util/taler-config.in | 10 ++++++++++ 2 files changed, 22 insertions(+) create mode 100644 src/util/taler-config.in diff --git a/src/util/Makefile.am b/src/util/Makefile.am index f52bc81c6..22bc788b8 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -15,6 +15,18 @@ pkgcfg_DATA = \ EXTRA_DIST = \ paths.conf +dist_bin_SCRIPTS = taler-config + +# See https://www.gnu.org/software/autoconf/manual/autoconf-2.63/html_node/Installation-Directory-Variables.html +# for and explanation and why this ugliness is necessary. +edit = sed -e 's|@libdir[@]|$(libdir)|g' +taler-config: Makefile $(srcdir)/taler-config.in + rm -f $@ $@.tmp + $(edit) '$(srcdir)/$@.in' >$@.tmp + chmod +x $@.tmp + chmod a-w $@.tmp + mv $@.tmp $@ + if WALLET_ONLY lib_LTLIBRARIES = \ libtalerutil_wallet.la diff --git a/src/util/taler-config.in b/src/util/taler-config.in new file mode 100644 index 000000000..eb4114c82 --- /dev/null +++ b/src/util/taler-config.in @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +if ! type gnunet-config >/dev/null; then + echo "$0 needs gnunet-config to be installed" + exit 1 +fi + +# FIXME: not very portable ... +export LD_PRELOAD=@libdir@/libtalerutil.so +exec gnunet-config "$@" From 3098c0a9e0b18a436e484ef693cdebeb16d4c131 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 14 Apr 2016 01:19:32 +0200 Subject: [PATCH 91/91] new taler-bank-manage invocation --- src/bank-lib/test_bank_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bank-lib/test_bank_api.c b/src/bank-lib/test_bank_api.c index 1fdeaf3cc..4d6b9700c 100644 --- a/src/bank-lib/test_bank_api.c +++ b/src/bank-lib/test_bank_api.c @@ -518,7 +518,7 @@ main (int argc, NULL, NULL, NULL, "taler-bank-manage", "taler-bank-manage", - "--bareserver", "8081", + "serve-http", "--port", "8081", NULL); if (NULL == bankd) {