How do I automatically reject transactions with specific metadata?

+3 votes

I'm trying to build an application using MultiChain, using it as a append-only archive, as described here. How can I prevent nodes from adding entries with certain metadata? How can I make other nodes reject all transactions containing specific metadata? At least majority of the nodes run same code for validation, so rejecting doesn't create consensus problems.

asked Jun 29, 2016 by archive.append

1 Answer

+2 votes
This is a good question, but unfortunately there is no way currently to do this. We've had quite a few requests relating to filtering transactions for validity so it's something we'll look into enabling in future.
answered Jun 29, 2016 by MultiChain
I'd also love to see this, some kind of hook where a developer could provide a function that would return true/false would be phenomenal.
Noted. Could you write this as a plug-in that is compiled?
Can you point me at some source or docs on how to write plugins for MultiChain? I'm not seeing anything in my initial look.
Sorry for the misunderstanding - it's not possible now, I was just asking if this would be an approach you could work with, so we can plan future versions.
Ah, yes -- I think a plugin model would make sense here. I'd think I'd want to be able to define a function that accepted a transaction and as much other context as possible (info on the mining node, maybe some info on the current block or something) and then could make a decision on whether or not to pick up this transaction. I realize you're not open-sourced yet, but out of curiosity, what language would this be in?
MultiChain is written in C, so the quickest way would be just to modify the source code in C once it's open. After that, we could have a more formal plugin interface that could work with multiple languages.
Okay -- I like the idea of using metadata rather than smart-contracts in transactions, but I'd like some internal mechanism for validation before accepting the transaction (rather than an external process to listen for already-completed transactions and taking compensating actions after-the-fact).

I suppose an alternative would be to effectively "proxy" incoming transactions and forwarding them along to MultiChain only if they meet a given set of criteria.
Hi jharris,

I'm curious, any updates on this? Even I was looking for a plugin like this one to be a substitute for smart contracts.
The feature, and how it might look, are still under active discussion. But we have no concrete date yet for implementing this.
Ok cool, I'll also look into this and see if something could be implemented.