-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue transactions are not (or slowly) accepted in the blockchain #49
Comments
First every transaction has at least one input which spends a previous output, otherwise there's no way of knowing who signed it. Second it looks like you may be generating simultaneous |
This is the case, could you please explain why this is a problem? What is the reason these transactions are rejected? |
They are double spends against each other, i.e. two transactions trying to spend the same UTXO. See the 'Approaches for writing' section of this page for possible workarounds: https://www.multichain.com/developers/clustering-high-availability/ |
Thanks for the fast reply! |
I understand the impact of using UTXO of the transactions better now. When sending from a single node, all transactions use the correct UTXO of the previous transaction, so they will eventually get accepted on the blockchain. When sending a lot of issue transactions (e.g. 720 per hour, or one transaction every 5 seconds) I see that it takes a very long time for these to eventually get accepted in a block, in some cases the node that generates them even becomes unresponsive to API requests after a certain amount of time. A graph of the I am sending the issue transactions via node 9201 in this case. Transactions where created from 12:00 to approx. 15:00. I am not familiar with how multichain implements the mining process but I have the following thoughts:
|
sending transactions at a rate of 60 per 15 minutes (sending 1 transaction every second for the first minute and then wait 14 minutes) seems to work quite smoothly. If I do this every 10 minutes instead of 15 minutes, I get the above behavior and the system gets stuck eventually. |
The ideal solution for this issue would be to make multichain work as expected, however if there are limitations that can not be changed, I am thinking about how I can distribute assets in a better way. I do want to have a single transaction per output address, so I want to avoid a single issue transaction that directly creates an output for the target address. I want to add metadata to every transaction to make the issue more transparent. I would create the following schema, but that is currently not possible with the multichain API: That would issue all outputs for the admin transaction that performs the issue, then I would generate multiple send transactions that distribute the assets to the target addresses. The multichain API currently only allows me to generate a transaction which issues multiple outputs to different addresses, not to the same address. Is this even possible in general (i.e. if I would create the raw transaction myself)? Or would I hit other problems with this model? |
What you describe is not the expected behavior. Which version of MultiChain are you using, and can you please post the output of |
Multichain Version:
|
Thanks – nothing unusual I can see in the blockchain parameters. Just to confirm, you are sending all the issue transactions from one node, and no other node is generating transactions at the same time? I ask because you should be able to send 100s of issue transactions per second, sustained, under normal circumstances. |
that is correct, only one node is creating the issue transactions. There might be a few non-issue transactions coming from other nodes using The issuemore rpc call usually takes a few millisecond to finish but after sending a certain amount of transactions it gets slower and slower sometimes taking > 5 minutes to respond.
How long do you expect the time for these transactions to show up in a block under normal circumstances? We have |
OK, thanks. One more thing – please show the output of |
|
btw, in the stable situation with 60 tx every 15minutes, this is how blocks are created typically (the generation of transactions started at 7:45, running for ~1 minute):
it seems to work fine at the beginning, but then 33 tx need 5 minutes to get accepted in a block while inbetween empty blocks are created. |
OK, your |
there is one asset and the number of issuances is roughly equal to the txcount in the wallet, currently 145556. The problems started way earylier than this number. A month ago we had about 10000 issuances and the problem already existed back then. |
OK, well I suspect that's the problem. We didn't design the "follow-on issuance" feature to be used at these sorts of volumes. I'll confirm back with the dev team that this is the issue and if there's something we can do about it. In the short term, your best workaround is to adjust your workflow somewhat. Instead of issuing new units every time, issuing them every once in a while to the same address that is used for the issuances, and distribute them from there in |
So... I've confirmed that this is the underlying cause of your performance problems. Please see the suggestion in the previous post. |
I am generating a lot of issue transactions using
issuemorefrom
API call.This was working okay when the chain was small, but now I see that nearly all of them are getting rejected with debug.log showing:
An example API call:
As far as I understand a coin issue has no inputs to spend so it should not fail. I would consider this a bug in the implementation, or is there something I do not understand correctly?
The text was updated successfully, but these errors were encountered: