New node first connection event/callback?

+1 vote
Hello,

I fell upon the infamous "No unspent outputs are available" when trying to publish to a stream without having received a previous transaction.

I know one validated node on the network needs to send an empty transaction to the new node in order to allow it to publish, but I can't figure out which event received by the validated node would be best suited for that purpose.

Also, I plan to have the command being something like "multichaind send [ip_address] 0", but would it be wise/efficient to do so from a multichaind process?

Thanks you very much in advance for any help.
asked Feb 7, 2018 by 13013

1 Answer

0 votes
 
Best answer
So it sounds like this is a network where anyone can connect, send and write to the stream. If so you should think carefully about the problem of spam – if anyone can connect and can publish data without paying any transaction fees, then anyone anonymous can immediately fill your blockchain with spam, under many different addresses, and there is no way to stop them.

If you're really sure this is a safe way to go, then you should create some off-chain process by which new nodes send a notification to an existing node to request an empty transaction output for them to spend. There isn't currently a feature within MultiChain to do this (for the reason stated in the previous paragraph).
answered Feb 7, 2018 by MultiChain
selected Feb 8, 2018 by 13013
It's just a prototype on an internal network, with admin rights set to any member of the chain. Nothing close to any real production code. There is no safety concern at all in that case.

I came at about the same conclusion as yours yesterday, only hoping that there might have been an other option I wouldn't have thought or know of.

I understand the security reason behind the required transaction fee for a real public network, but this will be a consideration way quite down the line at this stage for us.

Thanks anyway for your answer, it is greatly appreciated.
Thanks for your reply. As a workaround during development, you can look for lines containing the string "mchn: Connection from" in the chain's debug.log file. That will tell you about new incoming connections and you can then automatically grant permissions.
...