Transaction bigger than 3484817 test_net forbidden

In some cases, I can not send money if the amount is bigger than 3484814 test_net. It happens me twice:

  • Once after I haven’t used Sakia for a while. Probably the blobk-chain was up-to-date
  • The second time just after an other payment.

Additional question: how many time is required between two payments?

After an other check, I get the error message:
Only 3490540 available in 5 sources.

It is difficult to copy-paste the error message, because it is just a furtive pop-up windows. Is it possible to get the log of Sakia?

PS: I’m using Sakia 0.20.2 under Ubuntu 14.04

Hi,
I can confirm that there is a problem. I’ve tried to send you all my TN (just for fun - we’re on a test network!) and got the message « Transfert Error: Error: only 2,369,674 TN available » (I have 14,000,000 TN). So there must be a problem, probably related to the new base switch - I did send almost all my DU corresponding to 12 MTN a week ago in one single transaction before the switch to the new base.
Besides, the failed transactions show up in Sakia as if they did happen, but I believe that a failed transfer shouldn’t even appear in the list of transactions.

As for the the time between two payments, I don’t think there is any restriction on that, but I’m not a reference on the subject. :slight_smile:

I’m also using version 0.20.2.

I will need logs for this problem. There is probably something wrong because of the rule :

Each output AmountBase must be equal to the maximum AmountBase of all inputs


Consequence: if a transaction carries inputs with a different AmountBase, these coins will be transformed into a higher UnitBase if they make round output amounts for this higher base.

Which means that we cannot send a base 0 amount with base 1 inputs. (ie, cannot send 11x10⁰ TN with a dividend valued by 11x10¹, because it would make a change noted 1x10⁰, which is smaller than the base ten of the outputs… For more information, take a look at Thought about big numbers)

Which means that :

  • A transaction sending 3484817 should not work if most of your universal dividends were generated with a base 1
  • But a transaction sending 3484810 should work

Well, when you look at the amount 3484817, 7 TN looks like pennies to me, so you should just send a rounded value :wink:

The error message should be changed to “Not enough change available” I guess. With an explanation and a suggestion of a new transaction maybe ?

1 Like

I did try to send the exact number 14,000,000 TN which is quite round. :slight_smile:
I don’t understand why I have 2 MTN available only for transactions when I actually have 14 MTN. Shouldn’t we be able to grab all currencies from different bases and put them in an output, provided the ones from lower bases can be rounded to the highest base? (at least that’s what I understood)

@jytou oui en fait l’arrondi ne suffit pas : il faut que le total des sources consommées tombent soit exactement compatoble avec la base de la plus haute source.

Du coup, comment faire pour avoir un zéro en dernier digit quand tu assembles ces montants de sources.

Pas simple niveau algorithme ! il faudrait trouver la bonne combinaison de sources (si elle existe !) pour que leur somme, en base 0, donne un zéro sur le dernier digit…

Du coup, @inso, dans Cesium, je tente plusieurs approches successives : soit base 1 uniquement, sinon base 0 uniquement, puis un mix (sources en base 1 completées de base 0 en cherchant à tomber juste) et enfin message d’erreur indiquant que les sources ne suffisent pas (mais je vais utiliser “change” comme tu le proposes).

Je faire développer une fonction pour faire le change : envoi d’une TX avec les sources de bases inférieures vers soi-même, et le reste vers l’adresse du noeud auquel on est connecté. Si le noeud est nous même, ca enverra le reste à la public key de remuniter !
Ca vous parait ok ?

1 Like

Oui effectivement, la solution est de renvoyer le reste en base inférieure… mais n’allez-vous pas avoir un problème de calcul interne (pas assez de chiffres significatifs) à un moment donné (c’est bien là toute l’utilité de ces bases)? À moins bien sûr d’avoir recours à de l’équivalent du BigInt (où on conserve donc tous les chiffres significatifs)… est-ce que ça n’aurait pas aussi l’inconvénient de faire circuler infiniment de la «petite monnaie» de plus en plus négligeable?

Du coup, en faisant les calculs, je m’aperçois que le maximum que je peux envoyer d’un coup est la somme de mes sources en base 0. En imaginant que je les épuise «presque» toutes, je devrais pouvoir arriver à un point où il ne me reste presque plus rien en base 0 et ce serait le maximum que je pourrais dépenser d’un coup? Il va falloir que j’essaie…

Bon bah tout ça m’a permis d’avancer. La version 0.1.23 de Cesium fonctionne pas trop mal : si le montant est trop élevé, il t’indique le montant max. Du coup c’est très simple : l’utilisateur n’a qu’à découper son paiement en deux fois, et ca fonctionne ! De plus, j’ai fait en en sorte que les paiements dans la base inféieure à celle de la blockchain soient envoyés au destinataire avec un digit “zéro” à la fin, et que le reste (<10) revienne à l’utilisateur : du coup le destinataire n’aura pas de problème pour réutiliser ce montant directement dans la base courante.

En plus, ca redonne de toutes petites sources (< 10 unités) à l’émetteur : très pratique pour compléter d’autres sources en base 0 afin d’obtenir les derniers digits “zéro”.

bref ca roule ! :wink:

A vous de tester ! mais attention ensuite les prochains tests seront dans une vingtaine de jours ^^ (au prochain roulement de base).

I just sent a payment with Sakia of the exact sum I had in base 0 minus one source. And now when I try to make another payment, it says I have 2000 left in 1 sources, which was expected. There should be a way of dealing with this. Let me try to make a payment with Cesium from there. :slight_smile: It did work with Cesium, I’m looking forward to see what my sources will look like after that (and kimamila you’re rich now :stuck_out_tongue: ).

1 Like

Although the transaction succeeded and the amounts are correct in Cesium, Sakia has a problem with that transaction. The amount was 6.2212 UD but Sakia shows 622.11 mDU which is incorrect.